1 dnl Process this file with autoconf to produce a configure script.
3 AC_INIT(nekobee, 0.1.x, gordon@gjcp.net)
5 AC_CONFIG_SRCDIR(src/nekobee-dssi.c)
7 AM_CONFIG_HEADER(config.h)
23 AC_ARG_WITH(gtk2, AC_HELP_STRING([--with-gtk2], [use GTK+ 2.0 default=yes]),
24 [ if test $withval = "yes"; then try_gtk2=yes ;
25 else try_gtk2=no ; fi ], try_gtk2=yes)
27 dnl First look for GTK+ 2.x, unless '--without-gtk2' was specified.
28 if test "x${try_gtk2}" = 'xyes'; then
29 AM_PATH_GTK_2_0(2.0.0, with_gtk='yes (version 2.0)', with_gtk=no)
31 AM_CONDITIONAL(BUILD_GUI, test "x${with_gtk}" != 'xno')
32 echo "GTK support: $with_gtk"
34 dnl Require DSSI and liblo
35 PKG_CHECK_MODULES(MODULE, dssi >= 0.9 liblo >= 0.12)
37 PKG_CHECK_MODULES(LV2_DEPS, lv2core >= 1, LV2_ENABLED="yes", LV2_ENABLED="no")
39 if test "$LV2_ENABLED" = "yes"; then
40 AC_MSG_CHECKING([whether to allow LV2])
42 AC_HELP_STRING([--without-lv2],[disable LV2 interface]),
43 [if test "$withval" = "no"; then LV2_ENABLED="no"; fi],[])
44 AC_MSG_RESULT($LV2_ENABLED)
47 if test "$LV2_ENABLED" == "yes"; then
48 AC_MSG_CHECKING(where to install LV2 plugins)
50 AC_HELP_STRING([--with-lv2-dir],[install LV2 calf.lv2 bundle to DIR (default=$prefix/lib/lv2/)]),
52 [with_lv2_dir="$prefix/lib/lv2/"])
53 AC_MSG_RESULT($with_lv2_dir)
54 AC_SUBST(with_lv2_dir)
57 AM_CONDITIONAL(USE_LV2, test "$LV2_ENABLED" = "yes")
59 if test "$LV2_ENABLED" = "yes"; then
60 AC_DEFINE(USE_LV2, 1, [LV2 support])
63 AC_MSG_CHECKING([where to install DSSI plugins])
64 AC_ARG_WITH(dssi-dir, AS_HELP_STRING([--with-dssi-dir=DIR], [the directory that
65 DSSI plugins should be installed in]), [dssidir=$withval], [dssidir=$libdir/dssi
67 AC_MSG_RESULT($dssidir)
70 dnl Use lotsa flags if we have gcc.
71 dnl !FIX! the '-finline-limit=5000' is apparently a problem for gcc 2.9x?
72 CFLAGS="$CFLAGS $MODULE_CFLAGS"
73 LDFLAGS="$LDFLAGS $MODULE_LIBS"
75 if test "x$GCC" = "xyes"; then
77 *[\ \ ]-Wall[\ \ ]*) ;;
78 *) CFLAGS="$CFLAGS -Wall" ;;
81 *[\ \ ]-O[1-9][\ \ ]*) ;;
82 *) CFLAGS="$CFLAGS -O2" ;;
85 *[\ \ ]-ffast-math[\ \ ]*) ;;
86 *) CFLAGS="$CFLAGS -fomit-frame-pointer -funroll-loops -finline-functions -ffast-math -finline-limit=5000 -Winline" ;;