diff options
| author | William A. Kennington III <wak@google.com> | 2018-07-17 14:40:14 -0700 |
|---|---|---|
| committer | William A. Kennington III <wak@google.com> | 2018-07-17 14:40:14 -0700 |
| commit | 321ed0114076aee9f556926362555fa285ab04f0 (patch) | |
| tree | d0b862c1ccc7cd1ed0274d142d3de3eac4e3a786 | |
| parent | d6d53140b419584f48ebfb22761e002bdf56d08f (diff) | |
| download | sdeventplus-321ed0114076aee9f556926362555fa285ab04f0.tar.gz sdeventplus-321ed0114076aee9f556926362555fa285ab04f0.zip | |
configure: Make examples optional
| -rw-r--r-- | configure.ac | 5 | ||||
| -rw-r--r-- | example/Makefile.am | 4 |
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 |

