Closes Trac #1571
svn path=/trunk/vorbis/; revision=17018
AUTOMAKE_OPTIONS = 1.6 foreign dist-zip dist-bzip2
-SUBDIRS = m4 include vq lib examples test doc
+SUBDIRS = m4 include vq lib test doc
+
+if BUILD_EXAMPLES
+SUBDIRS += examples
+endif
m4datadir = $(datadir)/aclocal
m4data_DATA = vorbis.m4
AM_CONDITIONAL(BUILD_DOCS, [test "x$enable_docs" = xyes])
+AC_ARG_ENABLE(examples,
+ AS_HELP_STRING([--enable-examples], [build the examples]))
+
+AM_CONDITIONAL(BUILD_EXAMPLES, [test "x$enable_examples" = xyes])
+
dnl --------------------------------------------------
dnl Set build flags based on environment
dnl --------------------------------------------------
INCLUDES = -I$(top_srcdir)/include @OGG_CFLAGS@
-noinst_PROGRAMS = test
+check_PROGRAMS = test
-check: $(noinst_PROGRAMS)
+check: $(check_PROGRAMS)
./test$(EXEEXT)
test_SOURCES = util.c util.h write_read.c write_read.h test.c