Make building/installing examples optional
authorDavid Seifert <soap@gentoo.org>
Fri, 13 Jan 2017 17:42:29 +0000 (18:42 +0100)
committerErik de Castro Lopo <erikd@mega-nerd.com>
Sun, 15 Jan 2017 01:34:03 +0000 (12:34 +1100)
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
Makefile.am
configure.ac

index a325e3a..38aea04 100644 (file)
 
 ACLOCAL_AMFLAGS = -I m4
 
-SUBDIRS = doc include m4 man src examples test build objs microbench
+SUBDIRS = doc include m4 man src test build objs microbench
+
+if EXAMPLES
+SUBDIRS += examples
+endif
 
 EXTRA_DIST = \
        COPYING.FDL \
index 67e53cf..a3e0fad 100644 (file)
@@ -360,6 +360,11 @@ AC_DEFINE_UNQUOTED([FLAC__HAS_OGG],$FLAC__HAS_OGG,[define if you have the ogg li
 AC_SUBST(FLAC__HAS_OGG)
 AC_SUBST(OGG_PACKAGE)
 
+dnl Build examples?
+AC_ARG_ENABLE([examples],
+       AS_HELP_STRING([--disable-examples], [Don't build and install examples]))
+AM_CONDITIONAL([EXAMPLES], [test "x$enable_examples" != "xno"])
+
 dnl check for i18n(internationalization); these are from libiconv/gettext
 AM_ICONV
 AM_LANGINFO_CODESET