To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / configure.ac
History | View | Annotate | Download (1.75 KB)
| 1 | 252:b03f1aefcd6a | cannam | |
|---|---|---|---|
| 2 | 539:15a89a89aa9b | Chris | AC_INIT(vamp-plugin-sdk, 2.10, cannam@all-day-breakfast.com) |
| 3 | 252:b03f1aefcd6a | cannam | |
| 4 | AC_CONFIG_SRCDIR(vamp/vamp.h) |
||
| 5 | AC_PROG_CXX |
||
| 6 | AC_HEADER_STDC |
||
| 7 | AC_C_BIGENDIAN |
||
| 8 | |||
| 9 | 526:459cddd7e64a | Chris | # We now require C++11 |
| 10 | AX_CXX_COMPILE_STDCXX_11(noext) |
||
| 11 | |||
| 12 | 252:b03f1aefcd6a | cannam | if pkg-config --modversion vamp-sdk >/dev/null 2>&1; then |
| 13 | echo "WARNING: A version of the Vamp plugin SDK is already installed." |
||
| 14 | echo " Expect worries and sorrows if you install a new version" |
||
| 15 | echo " without removing the old one first. (Continuing)" |
||
| 16 | fi |
||
| 17 | |||
| 18 | AC_SEARCH_LIBS([dlopen],[dl]) |
||
| 19 | |||
| 20 | 277:6d355f1b7eaf | cannam | dnl See if the user wants to build programs, or just the SDK |
| 21 | AC_ARG_ENABLE(programs, [AS_HELP_STRING([--enable-programs], |
||
| 22 | [enable building of example host and RDF generator [default=yes]])], |
||
| 23 | PROGS_ARGUMENT=$enableval, |
||
| 24 | PROGS_ARGUMENT="yes") |
||
| 25 | |||
| 26 | dnl if the user wants progs, then we need to check for libsndfile |
||
| 27 | if test "x$PROGS_ARGUMENT" = "xyes" ; then |
||
| 28 | 278:bdedb6114fc6 | cannam | PKG_CHECK_MODULES([SNDFILE],[sndfile],have_sndfile="yes",have_sndfile="no") |
| 29 | 277:6d355f1b7eaf | cannam | if test "x$have_sndfile" = "xyes" ; then |
| 30 | dnl all good, build everything |
||
| 31 | TARGETS="sdk plugins host rdfgen test" |
||
| 32 | else |
||
| 33 | dnl no libsndfile - can't build host! |
||
| 34 | 313:b570254e70a0 | Chris | AC_MSG_ERROR([libsndfile not found - cannot build example Vamp host! |
| 35 | If you don't want to build the host, configure with --disable-programs.]) |
||
| 36 | 277:6d355f1b7eaf | cannam | fi |
| 37 | else |
||
| 38 | dnl user didn't want programs - so we won't build them |
||
| 39 | TARGETS="sdk plugins" |
||
| 40 | fi |
||
| 41 | |||
| 42 | 252:b03f1aefcd6a | cannam | AC_SUBST(SNDFILE_CFLAGS) |
| 43 | AC_SUBST(SNDFILE_LIBS) |
||
| 44 | 278:bdedb6114fc6 | cannam | AC_SUBST(TARGETS) |
| 45 | 252:b03f1aefcd6a | cannam | |
| 46 | changequote(,)dnl |
||
| 47 | if test "x$GCC" = "xyes"; then |
||
| 48 | case " $CXXFLAGS " in |
||
| 49 | *[\ \ ]-fPIC\ -Wall[\ \ ]*) ;; |
||
| 50 | 398:7d59dd1ba5de | Chris | *) CXXFLAGS="$CXXFLAGS -fPIC -Wall -Wextra" ;; |
| 51 | 252:b03f1aefcd6a | cannam | esac |
| 52 | 375:cff0f07178d6 | Chris | case " $CFLAGS " in |
| 53 | *[\ \ ]-fPIC\ -Wall[\ \ ]*) ;; |
||
| 54 | 398:7d59dd1ba5de | Chris | *) CFLAGS="$CFLAGS -fPIC -Wall -Wextra" ;; |
| 55 | 375:cff0f07178d6 | Chris | esac |
| 56 | 526:459cddd7e64a | Chris | CXXFLAGS="$CXXFLAGS -std=c++11" |
| 57 | 252:b03f1aefcd6a | cannam | fi |
| 58 | changequote([,])dnl |
||
| 59 | |||
| 60 | 278:bdedb6114fc6 | cannam | AC_SUBST(CXXFLAGS) |
| 61 | 375:cff0f07178d6 | Chris | AC_SUBST(CFLAGS) |
| 62 | 252:b03f1aefcd6a | cannam | AC_OUTPUT([Makefile]) |