cannam@97: cannam@97: AC_INIT(vamp-plugin-sdk, 2.4, cannam@all-day-breakfast.com) cannam@97: cannam@97: AC_CONFIG_SRCDIR(vamp/vamp.h) cannam@97: AC_PROG_CXX cannam@97: AC_HEADER_STDC cannam@97: AC_C_BIGENDIAN cannam@97: cannam@97: if pkg-config --modversion vamp-sdk >/dev/null 2>&1; then cannam@97: echo "WARNING: A version of the Vamp plugin SDK is already installed." cannam@97: echo " Expect worries and sorrows if you install a new version" cannam@97: echo " without removing the old one first. (Continuing)" cannam@97: fi cannam@97: cannam@97: AC_SEARCH_LIBS([dlopen],[dl]) cannam@97: cannam@97: dnl See if the user wants to build programs, or just the SDK cannam@97: AC_ARG_ENABLE(programs, [AS_HELP_STRING([--enable-programs], cannam@97: [enable building of example host and RDF generator [default=yes]])], cannam@97: PROGS_ARGUMENT=$enableval, cannam@97: PROGS_ARGUMENT="yes") cannam@97: cannam@97: dnl if the user wants progs, then we need to check for libsndfile cannam@97: if test "x$PROGS_ARGUMENT" = "xyes" ; then cannam@97: PKG_CHECK_MODULES([SNDFILE],[sndfile],have_sndfile="yes",have_sndfile="no") cannam@97: if test "x$have_sndfile" = "xyes" ; then cannam@97: dnl all good, build everything cannam@97: TARGETS="sdk plugins host rdfgen test" cannam@97: else cannam@97: dnl no libsndfile - can't build host! cannam@97: AC_MSG_ERROR([libsndfile not found - cannot build example Vamp host! cannam@97: If you don't want to build the host, configure with --disable-programs.]) cannam@97: fi cannam@97: else cannam@97: dnl user didn't want programs - so we won't build them cannam@97: TARGETS="sdk plugins" cannam@97: fi cannam@97: cannam@97: AC_SUBST(SNDFILE_CFLAGS) cannam@97: AC_SUBST(SNDFILE_LIBS) cannam@97: AC_SUBST(TARGETS) cannam@97: cannam@97: changequote(,)dnl cannam@97: if test "x$GCC" = "xyes"; then cannam@97: case " $CXXFLAGS " in cannam@97: *[\ \ ]-fPIC\ -Wall[\ \ ]*) ;; cannam@97: *) CXXFLAGS="$CXXFLAGS -fPIC -Wall" ;; cannam@97: esac cannam@97: fi cannam@97: changequote([,])dnl cannam@97: cannam@97: AC_SUBST(CXXFLAGS) cannam@97: AC_OUTPUT([Makefile]) cannam@97: