Add patch to disable building examples by default, test Makefile.am fix
authorMonty <xiphmont@xiph.org>
Wed, 24 Mar 2010 09:08:33 +0000 (09:08 +0000)
committerMonty <xiphmont@xiph.org>
Wed, 24 Mar 2010 09:08:33 +0000 (09:08 +0000)
Closes Trac #1571

svn path=/trunk/vorbis/; revision=17018

Makefile.am
configure.ac
test/Makefile.am

index 1ac8620..89efb5d 100644 (file)
@@ -2,7 +2,11 @@
 
 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
index ccb34f1..70ee762 100644 (file)
@@ -89,6 +89,11 @@ fi
 
 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 --------------------------------------------------
index 128bf21..5f7e32a 100644 (file)
@@ -4,9 +4,9 @@ AUTOMAKE_OPTIONS = foreign
 
 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