# HG changeset patch # User cannam # Date 1234440118 0 # Node ID 6d355f1b7eaf095a9efbed8cb8d87eac996b8da4 # Parent e03f9d0a8dc4ac1a84bb3166a7559ff1064555ec * Patch from Richard Ash to make building the host optional, so you can at least build the SDK even if you don't have libsndfile diff -r e03f9d0a8dc4 -r 6d355f1b7eaf Makefile.in --- a/Makefile.in Thu Feb 12 12:00:37 2009 +0000 +++ b/Makefile.in Thu Feb 12 12:01:58 2009 +0000 @@ -34,7 +34,7 @@ # clean -- remove binary targets # distclean -- remove all targets # -default: all +default: @TARGETS@ # Compile flags # diff -r e03f9d0a8dc4 -r 6d355f1b7eaf configure.ac --- a/configure.ac Thu Feb 12 12:00:37 2009 +0000 +++ b/configure.ac Thu Feb 12 12:01:58 2009 +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" +fi + AC_SUBST(SNDFILE_CFLAGS) AC_SUBST(SNDFILE_LIBS)