[libbluray-devel] commit: add configure option to disable building examples (john )

git at videolan.org git at videolan.org
Sat Sep 11 18:38:01 CEST 2010


libbluray | branch: master | john <john at anonymous.org> | Fri Sep 10 17:50:19 2010 -0700| [d4c058999a651c1a304e4d6612f0d1669a391861] | committer: john 

add configure option to disable building examples

> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=d4c058999a651c1a304e4d6612f0d1669a391861
---

 configure.ac             |    9 +++++++++
 src/examples/Makefile.am |    4 ++++
 2 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/configure.ac b/configure.ac
index f8a921e..44436e9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -68,6 +68,12 @@ AC_ARG_ENABLE([optimizations],
   [use_optimizations=$enableval],
   [use_optimizations=yes])
 
+AC_ARG_ENABLE([examples],
+  [AS_HELP_STRING([--enable-examples],
+  [build examples (default is yes)])],
+  [use_examples=$enableval],
+  [use_examples=yes])
+
 AC_ARG_ENABLE([debug],
   [AS_HELP_STRING([--enable-debug],
   [enable debugging information (default is yes)])],
@@ -201,6 +207,9 @@ if [[ $use_debug = "yes" ]]; then
     SET_DEBUG_OPTS="$SET_DEBUG_OPTS -g"
 fi
 
+# use examples
+AM_CONDITIONAL([USING_EXAMPLES], [ test $use_examples = "yes" ])
+
 # use bdjava
 if [[ $use_bdjava = "yes" ]]; then
   case $target_cpu in
diff --git a/src/examples/Makefile.am b/src/examples/Makefile.am
index 9ab73c9..ca101f4 100644
--- a/src/examples/Makefile.am
+++ b/src/examples/Makefile.am
@@ -8,6 +8,8 @@ AM_CFLAGS = -std=c99 $(SET_FEATURES) $(SET_WARNINGS) $(SET_OPTIMIZATIONS) \
 	$(SET_DEBUG_OPTS) $(SET_INCLUDES)
 CFLAGS=$(shell test -z "$$CFLAGS" || echo "$$CFLAGS")
 
+if USING_EXAMPLES
+
 noinst_PROGRAMS=bdsplice mpls_dump clpi_dump index_dump mobj_dump sound_dump \
     libbluray_test list_titles hdmv_test
 
@@ -68,3 +70,5 @@ noinst_PROGRAMS+= bdj_test
 bdj_test_SOURCES = bdj_test.c
 bdj_test_LDADD = $(BLURAY_LIB)
 endif
+
+endif



More information about the libbluray-devel mailing list