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