dnl -------------------------------------------------- dnl configure.in for Swami dnl -------------------------------------------------- AC_INIT(src/gui/main.c) SWAMI_VERSION_MAJOR=0 SWAMI_VERSION_MINOR=9 SWAMI_VERSION_MICRO=4 SWAMI_VERSION=$SWAMI_VERSION_MAJOR.$SWAMI_VERSION_MINOR.$SWAMI_VERSION_MICRO SWAMI_VERSION=${SWAMI_VERSION} AC_SUBST(SWAMI_VERSION_MAJOR) AC_SUBST(SWAMI_VERSION_MINOR) AC_SUBST(SWAMI_VERSION_MICRO) AM_INIT_AUTOMAKE(swami, $SWAMI_VERSION) AM_CONFIG_HEADER(src/include/config.h) CFLAGS="$CFLAGS -Wall" dnl - Program checks AC_PROG_CC AC_PROG_INSTALL AC_HEADER_STDC AC_LIBTOOL_WIN32_DLL AM_PROG_LIBTOOL dnl Machine specific checks and defines case "${host_os}" in darwin*) AC_DEFINE(DARWIN, 1, [Define if building for Mac OS X Darwin]) ;; mingw*) MINGW32=1 CFLAGS="$CFLAGS -mms-bitfields" WIN32_LDFLAGS="-no-undefined" SWAMI_DLL_EXPORT="-DSWAMI_DLL_EXPORT" PLUGINS_DLL_IMPORT="-DSWAMI_DLL_IMPORT" INSTP_DLL_EXPORT="-DINSTP_DLL_EXPORT" AC_DEFINE(MINGW32, 1, [Define if using the MinGW32 environment]) ;; esac AC_SUBST(MINGW32) AC_SUBST(WIN32_LDFLAGS) AC_SUBST(SWAMI_DLL_EXPORT) AC_SUBST(PLUGINS_DLL_IMPORT) AC_SUBST(INSTP_DLL_EXPORT) dnl - Check for debugging AC_DEBUGGING dnl - Check for popt lib used by src/swamigui/main.c, "true" is a dummy cmd AC_CHECK_LIB(popt, poptStrippedArgv, true, AC_MSG_ERROR([popt 1.5 or newer is required - make sure you have the popt development installed.])) dnl - Check for GTK AM_PATH_GTK(1.2.0, , AC_MSG_ERROR([Failed to find sufficient GTK library]), gthread) dnl - Check for FluidSynth PKG_CHECK_MODULES(FLUIDSYNTH, fluidsynth >= 1.0.0, FLUIDSYNTH_SUPPORT=1, FLUIDSYNTH_SUPPORT=0) AC_SUBST(FLUIDSYNTH_CFLAGS) AC_SUBST(FLUIDSYNTH_LIBS) AM_CONDITIONAL(FLUIDSYNTH_SUPPORT, test "$FLUIDSYNTH_SUPPORT" = "1") dnl - Do libsndfile check PKG_CHECK_MODULES(LIBSNDFILE, sndfile >= 1.0.0, LIBSNDFILE_SUPPORT=1, LIBSNDFILE_SUPPORT=0) AC_SUBST(LIBSNDFILE_CFLAGS) AC_SUBST(LIBSNDFILE_LIBS) AM_CONDITIONAL(LIBSNDFILE_SUPPORT, test "$LIBSNDFILE_SUPPORT" = "1") dnl - Do audiofile check AC_ARG_ENABLE(audiofile, [ --disable-audiofile Disable libaudiofile support (default=auto)], enable_audiofile="$enableval", enable_audiofile="yes") if test "x$enable_audiofile" != "xno"; then AM_PATH_AUDIOFILE(0.2.0, AUDIOFILE_SUPPORT=1, AUDIOFILE_SUPPORT=0) fi AM_CONDITIONAL(AUDIOFILE_SUPPORT, test "$AUDIOFILE_SUPPORT" = "1") dnl Gnome canvas stuff AC_ARG_ENABLE(gnome-canvas, [ --disable-gnome-canvas Disable gnome canvas support (default=auto)], enable_gnome_canvas="$enableval", enable_gnome_canvas="yes") CANVAS_SUPPORT=0 if test "x$enable_gnome_canvas" != "xno" -a "$GNOME_CONFIG" != "no" \ -a "$MINGW32" != "1" ; then AC_PATH_PROG(GNOME_CONFIG, gnome-config, no) if test "$GNOME_CONFIG" != "no"; then AC_MSG_CHECKING(if $GNOME_CONFIG works) if $GNOME_CONFIG --libs-only-l gnome >/dev/null 2>&1; then AC_MSG_RESULT(yes) CANVAS_LIBS="`$GNOME_CONFIG --libs gnomeui`" CANVAS_CFLAGS="`$GNOME_CONFIG --cflags gnomeui`" CANVAS_SUPPORT=1 fi fi fi AM_CONDITIONAL(CANVAS_SUPPORT, test "$CANVAS_SUPPORT" = "1") if test "$CANVAS_SUPPORT" = "1" ; then AC_DEFINE(CANVAS_SUPPORT, 1, [Define to include canvas support]) fi AC_SUBST(CANVAS_CFLAGS) AC_SUBST(CANVAS_LIBS) dnl libpng detection (Swami intro splash image) PKG_CHECK_MODULES(PNG, libpng, PNG_SUPPORT=1, PNG_SUPPORT=0) AM_CONDITIONAL(PNG_SUPPORT, test "$PNG_SUPPORT" = "1") AC_ARG_ENABLE(splash, [ --disable-splash Don't compile Swami splash intro image], disable_splash="yes") splash_enabled="" if test "${disable_splash}" != "yes" -a "$PNG_SUPPORT" = "1" ; then splash_enabled="yes" AC_DEFINE(SPLASH, 1, [Define to compile splash intro image functions]) else PNG_CFLAGS= PNG_LIBS= fi AM_CONDITIONAL(BUILD_SPLASH, test "x$splash_enabled" = "xyes" -a "$MINGW32" != "1") AC_SUBST(PNG_CFLAGS) AC_SUBST(PNG_LIBS) dnl *** Plugin stuff *** dnl Set location of plugin directory if test "x${prefix}" = "xNONE"; then PLUGINS_DIR=${ac_default_prefix}/lib/swami else PLUGINS_DIR=${prefix}/lib/swami fi AC_DEFINE_UNQUOTED(PLUGINS_DIR, "$PLUGINS_DIR", [Define the plugin directory]) AC_SUBST(PLUGINS_DIR) dnl Set location of uninstalled plugin directory PLUGINS_BUILDDIR=`pwd` AC_DEFINE_UNQUOTED(PLUGINS_BUILDDIR, "$PLUGINS_BUILDDIR", [Define the uninstalled plugin directory]) AC_SUBST(PLUGINS_BUILDDIR) AC_ARG_ENABLE(plugin-builddir, [--enable-plugin-builddir] [Use plugins in build tree (for developers)], [case "${enableval}" in yes) PLUGINS_USE_BUILDDIR=yes ;; no) PLUGINS_USE_BUILDDIR=no ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-plugin-builddir) ;; esac], [PLUGINS_USE_BUILDDIR=no]) dnl Default value dnl Check SWAMI_DEVELOPER envornment variable, and use plugin builddir if set if test "x${SWAMI_DEVELOPER}" != "x"; then PLUGINS_USE_BUILDDIR=yes fi if test "x$PLUGINS_USE_BUILDDIR" = xyes; then AC_DEFINE(PLUGINS_USE_BUILDDIR, 1, [Define if plugins should be loaded from the build tree - helpful to developers]) fi AC_OUTPUT([ Makefile m4/Makefile src/Makefile src/libswami/Makefile src/libswami/version.h src/libinstpatch/Makefile src/libinstpatch/src/Makefile src/libinstpatch/doc/Makefile src/gui/Makefile src/gui/pixmaps/Makefile src/gui/tools/Makefile src/gui/widgets/Makefile src/plugins/Makefile src/include/Makefile package/Makefile]) _SUMMARY_ENABLED= _SUMMARY_DISABLED= FEATURE_SUMMARY([ fluidsynth - Soft synth wavetable plugin], ["${FLUIDSYNTH_SUPPORT}" = "1"]) FEATURE_SUMMARY([ audiofile - Sound file library plugin], ["${AUDIOFILE_SUPPORT}" = "1"]) FEATURE_SUMMARY([ libsndfile - Sound file library plugin], ["${LIBSNDFILE_SUPPORT}" = "1"]) FEATURE_SUMMARY([ Splash image], ["x${splash_enabled}" = "xyes"]) FEATURE_SUMMARY([ GnomeCanvas - Graphical envelope editor], ["${CANVAS_SUPPORT}" = "1"]) FEATURE_SUMMARY([ Debugging (compiler flags)], ["${disable_debug}" != "yes"]) echo echo "**************************************************************" echo "Enabled features (Feature name - Swami usage):" echo -e -n "$_SUMMARY_ENABLED" echo echo "Disabled features:" echo -e -n "$_SUMMARY_DISABLED" echo if test "x$PLUGINS_USE_BUILDDIR" = xyes; then echo "++ Using build tree for loading plugins" fi echo "**************************************************************" echo