--- linuxsampler/trunk/configure.in 2007/09/30 21:51:14 1363 +++ linuxsampler/trunk/configure.in 2007/10/01 13:38:37 1364 @@ -295,6 +295,27 @@ AM_CONDITIONAL(HAVE_COREMIDI, test $have_coremidi = "1") AC_DEFINE_UNQUOTED(HAVE_COREMIDI,$have_coremidi,[Define to 1 if you have CoreMIDI installed.]) +# have we found at least one MIDI input and one audio output driver ? +if test "$have_midi_input_driver" = "false"; then + echo "No supported MIDI input system found!" + echo "Sorry, LinuxSampler only supports the following MIDI drivers at the moment:" + echo "ALSA, MIDIShare, CoreMIDI." + echo "If you think you have one of those available on your system, make sure you" + echo "also have the respective development (header) files installed." + exit -1; +fi +if test "$have_audio_output_driver" = "false"; then + echo "No supported audio output system found!" + echo "Sorry, LinuxSampler only supports ALSA, JACK and ARTS as audio output" + echo "driver at the moment!" + exit -1; +fi + + + +########################################################################### +# Checks for various DLL libraries + # Check presence of libgig libgig_version="3.1.1" PKG_CHECK_MODULES(GIG, gig >= $libgig_version, HAVE_GIG=true, HAVE_GIG=false) @@ -308,38 +329,38 @@ AC_SUBST(GIG_CFLAGS) AC_SUBST(GIG_LIBS) -# Check presence of sqlite3 -sqlite_version="3.3" -PKG_CHECK_MODULES(SQLITE3, sqlite3 >= $sqlite_version, HAVE_SQLITE3=true, HAVE_SQLITE3=false) -AC_SUBST(SQLITE3_LIBS) -AC_SUBST(SQLITE3_CFLAGS) -if test $HAVE_SQLITE3 = false; then - HAVE_SQLITE3=0; - instruments_db_support="no" - echo "*** Required sqlite version not found!" - echo "*** You need to have sqlite version ${sqlite_version} or higher" - echo "*** for instruments database support to be enabled." - echo "*** Support for instruments DB will be disabled!" +# Instruments DB feature (requires SQLite 3.3) +AC_ARG_ENABLE(instruments-db, + [ --disable-instruments-db + Disable compilation of the sampler's instruments + database feature. You need to have SQLite 3.3 + or younger installed for this feature.], + [config_instruments_db="$enableval"], + [config_instruments_db="yes"] +) +HAVE_SQLITE3=0; +if test "$config_instruments_db" = "yes"; then + # Check presence of sqlite3 + sqlite_version="3.3" + PKG_CHECK_MODULES(SQLITE3, sqlite3 >= $sqlite_version, HAVE_SQLITE3=true, HAVE_SQLITE3=false) + AC_SUBST(SQLITE3_LIBS) + AC_SUBST(SQLITE3_CFLAGS) + if test $HAVE_SQLITE3 = false; then + HAVE_SQLITE3=0 + config_instruments_db="no" + echo "*** Required sqlite version not found!" + echo "*** You need to have sqlite version ${sqlite_version} or higher" + echo "*** for instruments database support to be enabled." + echo "*** Support for instruments DB will be disabled!" + else + HAVE_SQLITE3=1 + fi else - HAVE_SQLITE3=1 - instruments_db_support="yes" + echo "Instruments DB feature disabled by configure script parameter" fi AM_CONDITIONAL(HAVE_SQLITE3, test $HAVE_SQLITE3 = 1) -AC_DEFINE_UNQUOTED(HAVE_SQLITE3,$HAVE_SQLITE3,[Define to 1 if you have SQLITE3 installed.]) +AC_DEFINE_UNQUOTED(HAVE_SQLITE3,$HAVE_SQLITE3,[Define to 1 if you want the instruments DB feature and have SQLITE3 installed.]) -if test "$have_midi_input_driver" = "false"; then - echo "No supported MIDI input system found!" - echo "Sorry, LinuxSampler only supports the following MIDI drivers at the moment:" - echo "ALSA, MIDIShare, CoreMIDI." - echo "If you think you have one of those available on your system, make sure you" - echo "also have the respective development (header) files installed." - exit -1; -fi -if test "$have_audio_output_driver" = "false"; then - echo "No supported audio output system found!" - echo "Sorry, LinuxSampler only supports ALSA and JACK as audio output driver at the moment!" - exit -1; -fi ########################################################################### @@ -839,6 +860,23 @@ ) AC_SUBST(config_plugin_dir) +AC_ARG_ENABLE(default-instruments-db-location, + [ --enable-default-instruments-db-location + Only when instruments DB feature is enabled: file name + which shall be taken as default location of the + instruments DB file. This location can still be + overridden at runtime with a command line switch. + (default: /var/lib/linuxsampler/instruments.db)], + [config_default_instruments_db_file="${enableval}"], + [config_default_instruments_db_file="/var/lib/linuxsampler/instruments.db"] +) +AC_DEFINE_UNQUOTED( + CONFIG_DEFAULT_INSTRUMENTS_DB_LOCATION, + "$config_default_instruments_db_file", + [Only when instruments DB feature is enabled: default location of the DB file.] +) + + ########################################################################### # Automatic Benchmarks (to detect the best algorithms for the system) @@ -1024,7 +1062,10 @@ echo "# Process Muted Channels: ${config_process_muted_channels}" echo "# Process All-Notes-Off MIDI message: ${config_process_all_notes_off}" echo "# Interpolate Volume: ${config_interpolate_volume}" -echo "# Instruments database support: ${instruments_db_support}" +echo "# Instruments database support: ${config_instruments_db}" +if test "$config_instruments_db" = "yes"; then +echo "# Instruments DB default location: ${config_default_instruments_db_file}" +fi echo "# Plugin Path: ${config_plugin_dir}" echo "#-------------------------------------------------------------------#" echo "# Read './configure --help' or file 'configure.in' for details. #"