summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam A. Kennington III <wak@google.com>2018-07-17 14:40:14 -0700
committerWilliam A. Kennington III <wak@google.com>2018-07-17 14:40:14 -0700
commit321ed0114076aee9f556926362555fa285ab04f0 (patch)
treed0b862c1ccc7cd1ed0274d142d3de3eac4e3a786
parentd6d53140b419584f48ebfb22761e002bdf56d08f (diff)
downloadsdeventplus-321ed0114076aee9f556926362555fa285ab04f0.tar.gz
sdeventplus-321ed0114076aee9f556926362555fa285ab04f0.zip
configure: Make examples optional
-rw-r--r--configure.ac5
-rw-r--r--example/Makefile.am4
2 files changed, 9 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 0d1f16d..f0e2e86 100644
--- a/configure.ac
+++ b/configure.ac
@@ -54,6 +54,11 @@ AC_CHECK_LIB([systemd], [sd_event_default], [], [
])
AX_RESTORE_FLAGS_WITH_PREFIX(OLD, [LDFLAGS])
+# Make it possible for users to choose to disable examples
+AC_ARG_ENABLE([examples], AC_HELP_STRING([--disable-examples],
+ [Build example programs]))
+AM_CONDITIONAL([BUILD_EXAMPLES], [test "x$enable_examples" != "xno"])
+
# Make it possible for users to choose if they want test support
# explicitly or not at all
AC_ARG_ENABLE([tests], AC_HELP_STRING([--disable-tests],
diff --git a/example/Makefile.am b/example/Makefile.am
index 3d8e3cf..fa40acb 100644
--- a/example/Makefile.am
+++ b/example/Makefile.am
@@ -1,5 +1,9 @@
noinst_PROGRAMS =
+if BUILD_EXAMPLES
+
noinst_PROGRAMS += follow
follow_SOURCES = follow.cpp
follow_LDADD = $(SDEVENTPLUS_LIBS)
+
+endif
OpenPOWER on IntegriCloud