[flac-dev] [PATCH 4/5] configure.ac: Allow examples to be disabled

Hugo Beauzée-Luyssen hugo at beauzee.fr
Fri Jan 6 12:53:38 UTC 2017


---
 configure.ac         | 3 +++
 examples/Makefile.am | 2 ++
 2 files changed, 5 insertions(+)

diff --git a/configure.ac b/configure.ac
index 9c852157..57cdcd4d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -366,6 +366,9 @@ AM_CONDITIONAL([FLaC__HAS_BIN], [test "${enable_bin}" != "no"])
 AC_ARG_ENABLE([benchmark], AC_HELP_STRING([--disable-benchmark], [Do not build the flac benchmark]))
 AM_CONDITIONAL([FLaC__HAS_BENCHMARK], [test "${enable_benchmark}" != "no"])
 
+AC_ARG_ENABLE([examples], AC_HELP_STRING([--disable-examples], [Do not build the code examples]))
+AM_CONDITIONAL([FLaC__HAS_EXAMPLES], [test "${enable_examples}" != "no"])
+
 dnl check for i18n(internationalization); these are from libiconv/gettext
 AM_ICONV
 AM_LANGINFO_CODESET
diff --git a/examples/Makefile.am b/examples/Makefile.am
index efad1616..24744f26 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -20,7 +20,9 @@ if FLaC__WITH_CPPLIBS
 CPPLIBS_DIRS = cpp
 endif
 
+if FLaC__HAS_EXAMPLES
 SUBDIRS = c $(CPPLIBS_DIRS)
+endif
 
 EXTRA_DIST = \
 	Makefile.lite \
-- 
2.11.0



More information about the flac-dev mailing list