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