aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am7
-rw-r--r--configure.ac1
-rw-r--r--example/m4/configure.m412
3 files changed, 17 insertions, 3 deletions
diff --git a/Makefile.am b/Makefile.am
index 4f3e00208..9038203a9 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -15,8 +15,11 @@ SUBDIRS = \
test \
$(PLATFORM_TEST_DIR) \
helper/test \
- doc \
- example
+ doc
+
+if WITH_EXAMPLES
+SUBDIRS += example
+endif
@DX_RULES@
diff --git a/configure.ac b/configure.ac
index a187fba72..99f5ef439 100644
--- a/configure.ac
+++ b/configure.ac
@@ -398,6 +398,7 @@ AC_MSG_RESULT([
debug: ${enable_debug}
cunit: ${cunit_support}
static tests linkage: ${enable_static_applications}
+ with_examples: ${with_examples}
test_vald: ${test_vald}
test_perf: ${test_perf}
test_perf_proc: ${test_perf_proc}
diff --git a/example/m4/configure.m4 b/example/m4/configure.m4
index cbac09140..ee4f44bae 100644
--- a/example/m4/configure.m4
+++ b/example/m4/configure.m4
@@ -1,5 +1,15 @@
##########################################################################
-# Enable/disable test-example
+# Build and install example applications
+##########################################################################
+AC_ARG_WITH([examples],
+ [AS_HELP_STRING([--without-examples],
+ [don't build and install example applications])],
+ [],
+ [with_examples=yes])
+AM_CONDITIONAL([WITH_EXAMPLES], [test x$with_examples != xno])
+
+##########################################################################
+# Test examples during 'make check'
##########################################################################
AC_ARG_ENABLE([test-example],
[AS_HELP_STRING([--enable-test-example], [run basic test against examples])],