1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-04 17:49:45 +02:00
audacity/lib-src/libvamp/optional-progs.patch
2010-01-24 09:19:39 +00:00

54 lines
1.6 KiB
Diff

Index: Makefile.in
===================================================================
RCS file: /cvsroot/audacity/lib-src/libvamp/Makefile.in,v
retrieving revision 1.4
diff -u -r1.4 Makefile.in
--- Makefile.in 29 Dec 2008 22:00:31 -0000 1.4
+++ Makefile.in 23 Jan 2009 23:11:52 -0000
@@ -34,7 +34,7 @@
# clean -- remove binary targets
# distclean -- remove all targets
#
-default: all
+default: @TARGETS@
# Compile flags
#
Index: configure.ac
===================================================================
RCS file: /cvsroot/audacity/lib-src/libvamp/configure.ac,v
retrieving revision 1.1
diff -u -r1.1 configure.ac
--- configure.ac 29 Dec 2008 22:00:31 -0000 1.1
+++ configure.ac 23 Jan 2009 23:11:52 -0000
@@ -14,7 +14,28 @@
AC_SEARCH_LIBS([dlopen],[dl])
-PKG_CHECK_MODULES([SNDFILE],[sndfile])
+dnl See if the user wants to build programs, or just the SDK
+AC_ARG_ENABLE(programs, [AS_HELP_STRING([--enable-programs],
+ [enable building of example host and RDF generator [default=yes]])],
+ PROGS_ARGUMENT=$enableval,
+ PROGS_ARGUMENT="yes")
+
+dnl if the user wants progs, then we need to check for libsndfile
+if test "x$PROGS_ARGUMENT" = "xyes" ; then
+ PKG_CHECK_MODULES([SNDFILE],[sndfile],
+ have_sndfile="yes", have_sndfile="no")
+ if test "x$have_sndfile" = "xyes" ; then
+ dnl all good, build everything
+ TARGETS="sdk plugins host rdfgen test"
+ else
+ dnl no libsndfile - can't build host!
+ AC_MSG_ERROR([libsndfile not found - cannot build example Vamp host!])
+ fi
+else
+ dnl user didn't want programs - so we won't build them
+ TARGETS="sdk plugins test"
+fi
+
AC_SUBST(SNDFILE_CFLAGS)
AC_SUBST(SNDFILE_LIBS)