diff options
author | Lionel Landwerlin <llandwerlin@gmail.com> | 2012-06-07 11:30:48 +0100 |
---|---|---|
committer | Tim-Philipp Müller <tim.muller@collabora.co.uk> | 2012-06-26 23:12:56 +0100 |
commit | 8b3708ea8cf591c891bad2b9655b14923640d0bf (patch) | |
tree | 1086ef261887812f019af5495208fc36b52502cb | |
parent | 2c532aa821e540a460b2daed66a5190345002a96 (diff) |
configure: add --disable-tools and --disable-benchmarks options
Add option to avoid build binaries. When building for platforms like
android, you might want to not link any "final" binary, mostly because
it requires special link flags or other parts of code that aren't
in the C library.
https://bugzilla.gnome.org/show_bug.cgi?id=677621
-rw-r--r-- | Makefile.am | 6 | ||||
-rw-r--r-- | configure.ac | 28 | ||||
-rw-r--r-- | tests/Makefile.am | 8 |
3 files changed, 40 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am index 671aec1ee..c8fe12a8e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -7,12 +7,16 @@ aclocaldir = $(datadir)/aclocal aclocal_DATA = gst-element-check-@GST_API_VERSION@.m4 SUBDIRS = pkgconfig \ - gst libs plugins tools tests \ + gst libs plugins tests \ docs \ po \ m4 \ common +if BUILD_TOOLS +SUBDIRS += tools +endif + # These are all the possible subdirs DIST_SUBDIRS = pkgconfig \ gst libs plugins tools tests \ diff --git a/configure.ac b/configure.ac index b74defa56..b434c9b07 100644 --- a/configure.ac +++ b/configure.ac @@ -164,6 +164,32 @@ else AC_MSG_WARN([Sissy ! By asking to not build the tests known to fail, you hereby waive your right to customer support. If you do not agree with this EULA, please press Ctrl-C before the next line is printed. By allowing the next line to be printed, you expressly acknowledge your acceptance of this EULA.]) fi +dnl building of benchmarks +AC_ARG_ENABLE(benchmarks, + AC_HELP_STRING([--disable-benchmarks], [disable building benchmarks apps]), + [ + case "${enableval}" in + yes) BUILD_BENCHMARKS=yes ;; + no) BUILD_BENCHMARKS=no ;; + *) AC_MSG_ERROR(bad value ${enableval} for --disable-benchmarks) ;; + esac + ], +[BUILD_BENCHMARKS=yes]) dnl Default value +AM_CONDITIONAL(BUILD_BENCHMARKS, test "x$BUILD_BENCHMARKS" = "xyes") + +dnl building of tools +AC_ARG_ENABLE(tools, + AC_HELP_STRING([--disable-tools], [disable building tools]), + [ + case "${enableval}" in + yes) BUILD_TOOLS=yes ;; + no) BUILD_TOOLS=no ;; + *) AC_MSG_ERROR(bad value ${enableval} for --disable-tools) ;; + esac + ], +[BUILD_TOOLS=yes]) dnl Default value +AM_CONDITIONAL(BUILD_TOOLS, test "x$BUILD_TOOLS" = "xyes") + dnl poison destroyed objects AC_ARG_ENABLE(poisoning, AC_HELP_STRING([--enable-poisoning], @@ -844,7 +870,9 @@ Configuration Debug : ${USE_DEBUG} Profiling : ${USE_PROFILING} + Building benchmarks : ${BUILD_BENCHMARKS} Building examples : ${BUILD_EXAMPLES} Building test apps : ${BUILD_TESTS} Building tests that fail : ${BUILD_FAILING_TESTS} + Building tools : ${BUILD_TOOLS} " diff --git a/tests/Makefile.am b/tests/Makefile.am index 23ff192b7..e5909fd97 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,5 +1,11 @@ EXTRA_DIST = README +if BUILD_BENCHMARKS +SUBDIRS_BENCHMARKS = benchmarks +else +SUBDIRS_BENCHMARKS = +endif + if BUILD_TESTS ## SUBDIRS_TESTS = tests testsuite ## FIXME: write tests from scratch @@ -21,7 +27,7 @@ SUBDIRS_EXAMPLES = endif SUBDIRS = \ - benchmarks \ + $(SUBDIRS_BENCHMARKS) \ $(SUBDIRS_CHECK) \ misc \ $(SUBDIRS_TESTS) \ |