annotate configure.ac @ 277:6d355f1b7eaf

* 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
author cannam
date Thu, 12 Feb 2009 12:01:58 +0000
parents b03f1aefcd6a
children bdedb6114fc6
rev   line source
cannam@252 1
cannam@252 2 AC_INIT(vamp-plugin-sdk, 2.0, cannam@all-day-breakfast.com)
cannam@252 3
cannam@252 4 AC_CONFIG_SRCDIR(vamp/vamp.h)
cannam@252 5 AC_PROG_CXX
cannam@252 6 AC_HEADER_STDC
cannam@252 7 AC_C_BIGENDIAN
cannam@252 8
cannam@252 9 if pkg-config --modversion vamp-sdk >/dev/null 2>&1; then
cannam@252 10 echo "WARNING: A version of the Vamp plugin SDK is already installed."
cannam@252 11 echo " Expect worries and sorrows if you install a new version"
cannam@252 12 echo " without removing the old one first. (Continuing)"
cannam@252 13 fi
cannam@252 14
cannam@252 15 AC_SEARCH_LIBS([dlopen],[dl])
cannam@252 16
cannam@277 17 dnl See if the user wants to build programs, or just the SDK
cannam@277 18 AC_ARG_ENABLE(programs, [AS_HELP_STRING([--enable-programs],
cannam@277 19 [enable building of example host and RDF generator [default=yes]])],
cannam@277 20 PROGS_ARGUMENT=$enableval,
cannam@277 21 PROGS_ARGUMENT="yes")
cannam@277 22
cannam@277 23 dnl if the user wants progs, then we need to check for libsndfile
cannam@277 24 if test "x$PROGS_ARGUMENT" = "xyes" ; then
cannam@277 25 PKG_CHECK_MODULES([SNDFILE],[sndfile],
cannam@277 26 have_sndfile="yes", have_sndfile="no")
cannam@277 27 if test "x$have_sndfile" = "xyes" ; then
cannam@277 28 dnl all good, build everything
cannam@277 29 TARGETS="sdk plugins host rdfgen test"
cannam@277 30 else
cannam@277 31 dnl no libsndfile - can't build host!
cannam@277 32 AC_MSG_ERROR([libsndfile not found - cannot build example Vamp host!])
cannam@277 33 fi
cannam@277 34 else
cannam@277 35 dnl user didn't want programs - so we won't build them
cannam@277 36 TARGETS="sdk plugins"
cannam@277 37 fi
cannam@277 38
cannam@252 39 AC_SUBST(SNDFILE_CFLAGS)
cannam@252 40 AC_SUBST(SNDFILE_LIBS)
cannam@252 41
cannam@252 42 changequote(,)dnl
cannam@252 43 if test "x$GCC" = "xyes"; then
cannam@252 44 case " $CXXFLAGS " in
cannam@252 45 *[\ \ ]-fPIC\ -Wall[\ \ ]*) ;;
cannam@252 46 *) CXXFLAGS="$CXXFLAGS -fPIC -Wall" ;;
cannam@252 47 esac
cannam@252 48 fi
cannam@252 49 changequote([,])dnl
cannam@252 50
cannam@252 51 AC_OUTPUT([Makefile])
cannam@252 52