From 452a35c1c57060c06df7e873697f55e4f5c64ca4 Mon Sep 17 00:00:00 2001 From: Paul Giblock Date: Thu, 22 May 2008 02:03:01 +0000 Subject: [PATCH] correctly detect presence of fluidsynth, I think git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1010 0778d3d1-df1d-0410-868b-ea421aaaa00d --- ChangeLog | 11 ++++++++-- configure.in | 40 ++++++++++++++++++++++++++++++++++ plugins/Makefile.am | 6 ++++- plugins/sf2_player/Makefile.am | 2 +- 4 files changed, 55 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index ac0c779cf..db7c7ee91 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-05-21 Paul Giblock + + * plugins/sf2_player/Makefile.am: + * plugins/Makefile.am: + * configure.in: + Add fluidsynth detection to configure + 2008-05-20 Paul Giblock * plugins/vestige/select_file.png: @@ -23,12 +30,12 @@ Fix placement of tooltop in styled knobs * src/gui/widgets/knob.cpp: - Minor graphical enhacement for styled knobs + Minor graphical enhancement for styled knobs * src/gui/piano_roll.cpp: * include/piano_roll.h: * data/themes/default/record_accompany.png: - - Fix annoying but where changing patterns would scroll to bar 2 instead + - Fix annoying bug where changing patterns would scroll to bar 2 instead of bar 1 - Add record-with-accompaniment feature because it was easier to just add a toolbutton then to strip out the code. At least now there is some diff --git a/configure.in b/configure.in index f616e5e6d..aa099f8ae 100644 --- a/configure.in +++ b/configure.in @@ -396,6 +396,24 @@ AC_LANG_POP(C++) AM_CONDITIONAL(SINGERBOT_SUPPORT, test ! -z "$FESTIVAL_SUPPORT" ) +# Check for fluidsynth +AC_ARG_WITH(fluidsynth, + AS_HELP_STRING([--without-fluidsynth], [disable support for Soundfont plugins]), , + [ with_fluidsynth=yes ]) +AH_TEMPLATE(HAVE_FLUIDSYNTH_H, [Define to 1 if you have the header file.]) +if test "x$with_fluidsynth" = "xyes" ; then + FLUIDSYNTH_SUPPORT="true" + AC_CHECK_HEADER([fluidsynth.h], HAVE_FLUIDSYNTH_H="true", FLUIDSYNTH_SUPPORT="") + AC_CHECK_LIB([fluidsynth], [new_fluid_synth], HAVE_FLUIDSYNTH="true", FLUIDSYNTH_SUPPORT="") +fi +if test ! -z "$FLUIDSYNTH_SUPPORT" ; then + AC_DEFINE(HAVE_FLUIDSYNTH_H) + AC_SUBST(fluidsynth_includes, [/usr/include]) + AC_SUBST(fluidsynth_lib, [/usr/lib]) +fi +AM_CONDITIONAL(FLUIDSYNTH_SUPPORT, test ! -z "$FLUIDSYNTH_SUPPORT") + + # libsndfile-stuff AC_ARG_WITH(libsf, AS_HELP_STRING([--without-libsf], @@ -907,6 +925,28 @@ else fi +if test -z "$FLUIDSYNTH_SUPPORT" ; then + if test "x$with_fluidsynth" = "xyes" ; then + echo " ========================" + echo " === LMMS - WARNING =======================================================" + echo " ========================" + echo " =" + echo " = You don't seem to have Fluidsynth development files." + echo " = The SoundFont2 Player plugin will be ignored." + echo " = Consider installing fluidsynth for the full power of LMMS." + echo " =" + echo " = To remove this warning, please pass" + echo " = " + echo " = --without-fluidsynth" + echo " =" + with_warnings="true" + fi +else + PLUGINS_TO_BUILD="$PLUGINS_TO_BUILD\n\t\* SoundFont2 Player plugin" +fi + + + if test ! -z "$WINECXX" ; then PLUGINS_TO_BUILD="$PLUGINS_TO_BUILD\n\t\* LMMS VST Support Layer (LVSL) for built-in VST-plugin usage" else diff --git a/plugins/Makefile.am b/plugins/Makefile.am index 90dfb5f56..8c22e2f01 100644 --- a/plugins/Makefile.am +++ b/plugins/Makefile.am @@ -10,6 +10,10 @@ if SINGERBOT_SUPPORT SINGERBOT_DIR=singerbot endif +if FLUIDSYNTH_SUPPORT +SF2PLAYER_DIR=sf2_player +endif + SUBDIRS = \ audio_file_processor \ bass_booster \ @@ -23,7 +27,7 @@ SUBDIRS = \ midi_import \ organic \ patman \ - sf2_player \ + $(SF2PLAYER_DIR) \ $(SINGERBOT_DIR) \ stereo_enhancer \ stereo_matrix \ diff --git a/plugins/sf2_player/Makefile.am b/plugins/sf2_player/Makefile.am index d77c83fc2..810b27315 100644 --- a/plugins/sf2_player/Makefile.am +++ b/plugins/sf2_player/Makefile.am @@ -34,6 +34,6 @@ CLEANFILES = $(MOC_FILES) ${UIC_FILES} ./embedded_resources.h pkglib_LTLIBRARIES = libsf2player.la libsf2player_la_SOURCES = sf2_player.cpp sf2_player.h patches_dialog.cpp patches_dialog.h ui_patches_dialog.h -libsf2player_la_LDFLAGS = -L /usr/lib -lfluidsynth +libsf2player_la_LDFLAGS = -L@fluidsynth_lib@ -lfluidsynth $(libsf2player_la_SOURCES): ./embedded_resources.h