cannam@252
|
1
|
Chris@349
|
2 AC_INIT(vamp-plugin-sdk, 2.5, cannam@all-day-breakfast.com)
|
cannam@252
|
3
|
cannam@252
|
4 AC_CONFIG_SRCDIR(vamp/vamp.h)
|
cannam@252
|
5 AC_PROG_CXX
|
cannam@252
|
6 AC_HEADER_STDC
|
cannam@252
|
7 AC_C_BIGENDIAN
|
cannam@252
|
8
|
cannam@252
|
9 if pkg-config --modversion vamp-sdk >/dev/null 2>&1; then
|
cannam@252
|
10 echo "WARNING: A version of the Vamp plugin SDK is already installed."
|
cannam@252
|
11 echo " Expect worries and sorrows if you install a new version"
|
cannam@252
|
12 echo " without removing the old one first. (Continuing)"
|
cannam@252
|
13 fi
|
cannam@252
|
14
|
cannam@252
|
15 AC_SEARCH_LIBS([dlopen],[dl])
|
cannam@252
|
16
|
cannam@277
|
17 dnl See if the user wants to build programs, or just the SDK
|
cannam@277
|
18 AC_ARG_ENABLE(programs, [AS_HELP_STRING([--enable-programs],
|
cannam@277
|
19 [enable building of example host and RDF generator [default=yes]])],
|
cannam@277
|
20 PROGS_ARGUMENT=$enableval,
|
cannam@277
|
21 PROGS_ARGUMENT="yes")
|
cannam@277
|
22
|
cannam@277
|
23 dnl if the user wants progs, then we need to check for libsndfile
|
cannam@277
|
24 if test "x$PROGS_ARGUMENT" = "xyes" ; then
|
cannam@278
|
25 PKG_CHECK_MODULES([SNDFILE],[sndfile],have_sndfile="yes",have_sndfile="no")
|
cannam@277
|
26 if test "x$have_sndfile" = "xyes" ; then
|
cannam@277
|
27 dnl all good, build everything
|
cannam@277
|
28 TARGETS="sdk plugins host rdfgen test"
|
cannam@277
|
29 else
|
cannam@277
|
30 dnl no libsndfile - can't build host!
|
Chris@313
|
31 AC_MSG_ERROR([libsndfile not found - cannot build example Vamp host!
|
Chris@313
|
32 If you don't want to build the host, configure with --disable-programs.])
|
cannam@277
|
33 fi
|
cannam@277
|
34 else
|
cannam@277
|
35 dnl user didn't want programs - so we won't build them
|
cannam@277
|
36 TARGETS="sdk plugins"
|
cannam@277
|
37 fi
|
cannam@277
|
38
|
cannam@252
|
39 AC_SUBST(SNDFILE_CFLAGS)
|
cannam@252
|
40 AC_SUBST(SNDFILE_LIBS)
|
cannam@278
|
41 AC_SUBST(TARGETS)
|
cannam@252
|
42
|
cannam@252
|
43 changequote(,)dnl
|
cannam@252
|
44 if test "x$GCC" = "xyes"; then
|
cannam@252
|
45 case " $CXXFLAGS " in
|
cannam@252
|
46 *[\ \ ]-fPIC\ -Wall[\ \ ]*) ;;
|
cannam@252
|
47 *) CXXFLAGS="$CXXFLAGS -fPIC -Wall" ;;
|
cannam@252
|
48 esac
|
Chris@375
|
49 case " $CFLAGS " in
|
Chris@375
|
50 *[\ \ ]-fPIC\ -Wall[\ \ ]*) ;;
|
Chris@375
|
51 *) CFLAGS="$CFLAGS -fPIC -Wall" ;;
|
Chris@375
|
52 esac
|
cannam@252
|
53 fi
|
cannam@252
|
54 changequote([,])dnl
|
cannam@252
|
55
|
cannam@278
|
56 AC_SUBST(CXXFLAGS)
|
Chris@375
|
57 AC_SUBST(CFLAGS)
|
cannam@252
|
58 AC_OUTPUT([Makefile])
|
cannam@252
|
59
|