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