1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132
|
# configure.in for patchage
AC_INIT(patchage, 0.2.3, drobilla@connect.carleton.ca)
AC_CONFIG_SRCDIR(src/main.cpp)
AC_CONFIG_SRCDIR(src/canvas/PatchBayArea.cpp)
AC_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE
# Checks for compilers
AC_PROG_CXX
AC_PROG_RANLIB
# Check for headers
AC_HEADER_STDC
AC_CHECK_HEADER(stdlib.h)
# Check pedantic other stuff autoscan says I should :)
AC_C_CONST
AC_C_INLINE
AC_HEADER_STDBOOL
# Check for pthreads
AC_CHECK_LIB(pthread, pthread_create, [],
AC_MSG_ERROR([*** Patchage requires POSIX threads support]))
AC_CHECK_HEADER(pthread.h)
# Check for Jack
PKG_CHECK_MODULES(JACK, jack >= 0.80.0)
# Check for ALSA
enable_alsa="yes"
AC_ARG_ENABLE(alsa,
[AS_HELP_STRING(--disable-alsa, [Disable Alsa MIDI driver])],
[ enable_alsa="$enableval" ]
)
if test "$enable_alsa" = "yes"; then
AC_CHECK_LIB(asound, snd_seq_open, ALSA_FOUND="yes", ALSA_FOUND="no", -lm -ldl -lpthread)
if test "$ALSA_FOUND" = "yes"; then
AC_DEFINE(HAVE_ALSA, 1, [whether or not we have alsa])
ALSA_CFLAGS=""
ALSA_LIBS="-lasound -lm -ldl -lpthread"
AC_SUBST(ALSA_CFLAGS)
AC_SUBST(ALSA_LIBS)
fi
else
ALSA_FOUND="no"
fi
AM_CONDITIONAL(ALSA, test "$ALSA_FOUND" = "yes")
# LASH config option
build_lash="yes"
AC_ARG_ENABLE(lash,
[AS_HELP_STRING(--enable-lash, [Enable LASH session management support (true by default)])],
[ if test x$enable_lash = xno ; then build_lash=no ; fi ])
have_lash="no"
if test "$build_lash" = "yes"; then
PKG_CHECK_MODULES(LASH, lash-1.0 >= 0.5.0, have_lash="yes", have_lash="no")
fi
if test "$have_lash" = "yes"; then
AC_DEFINE(HAVE_LASH, 1, [Has lash.h])
AC_SUBST(LASH_CFLAGS)
AC_SUBST(LASH_LIBS)
else
AC_MSG_WARN([LASH not found, session support will not be built.])
fi
AM_CONDITIONAL(WITH_LASH, [test "$have_lash" = "yes"])
# Check for debugging flag
debug="no"
AC_ARG_ENABLE(debug,
[AS_HELP_STRING(--enable-debug, [Enable debugging (false)])],
[debug="$enableval"])
if test "$debug" = "yes"; then
CXXFLAGS="-O0 -g"
CFLAGS="$CXXFLAGS"
fi
# Check for warnings flag
warnings="no"
AC_ARG_ENABLE(warnings,
[AS_HELP_STRING(--enable-warnings, [Enable warnings compiler flags (false)])],
[warnings="$enableval"])
if test "$warnings" = "yes"; then
CXXFLAGS="$CXXFLAGS -ansi -pedantic -Wall -Woverloaded-virtual -Wsign-promo -Wconversion"
CFLAGS="$CXXFLAGS"
fi
# Check for assertion flag
assert="no"
AC_ARG_ENABLE(assert,
[AS_HELP_STRING(--enable-assert,Enable assertions (false - performance penalty))],
[assert="$enableval" ])
if test "$assert" = "no"; then
CXXFLAGS="$CXXFLAGS -DNDEBUG"
else
CXXFLAGS="$CXXFLAGS -DDEBUG"
fi
# Bolt on a few specific flags to CXXFLAGS that should always be used
CXXFLAGS="$CXXFLAGS -pipe"
# Set nice wide error messages so I can actually read bug reports. :)
CXXFLAGS="$CXXFLAGS -fmessage-length=139 -fdiagnostics-show-location=every-line"
CFLAGS="$CXXFLAGS"
# Check for GTKMM
PKG_CHECK_MODULES(GTKMM, gtkmm-2.4)
AC_SUBST(GTKMM_CFLAGS)
AC_SUBST(GTKMM_LIBS)
# Check for gnomecanvasmm
PKG_CHECK_MODULES(GNOMECANVASMM, libgnomecanvasmm-2.6)
AC_SUBST(GNOMECANVASMM_CFLAGS)
AC_SUBST(GNOMECANVASMM_LIBS)
# Check for libglademm
PKG_CHECK_MODULES(LIBGLADEMM, libglademm-2.4)
AC_SUBST(LIBGLADEMM_CFLAGS)
AC_SUBST(LIBGLADEMM_LIBS)
# Write it!
AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([src/Makefile])
AC_CONFIG_FILES([src/canvas/Makefile])
AC_OUTPUT
|