--- linuxsampler/trunk/configure.in 2006/11/24 17:43:09 937 +++ linuxsampler/trunk/configure.in 2007/10/11 18:53:29 1399 @@ -5,7 +5,7 @@ LINUXSAMPLER_RELEASE_MAJOR=0 LINUXSAMPLER_RELEASE_MINOR=4 -LINUXSAMPLER_RELEASE_BUILD=0 +LINUXSAMPLER_RELEASE_BUILD=0.8cvs #------------------------------------------------------------------------------------ # The following is the libtool / shared library version. This doesn't have to @@ -29,6 +29,15 @@ LIBLINUXSAMPLER_LT_AGE=0 SHARED_VERSION_INFO="$LIBLINUXSAMPLER_LT_CURRENT:$LIBLINUXSAMPLER_LT_REVISION:$LIBLINUXSAMPLER_LT_AGE" +#------------------------------------------------------------------------------------ +# the LSCP specification version this LinuSampler release complies with: + +LSCP_RELEASE_MAJOR=1 +LSCP_RELEASE_MINOR=2 + +AC_DEFINE_UNQUOTED(LSCP_RELEASE_MAJOR, ${LSCP_RELEASE_MAJOR}, [LSCP spec major version this release complies with.]) +AC_DEFINE_UNQUOTED(LSCP_RELEASE_MINOR, ${LSCP_RELEASE_MINOR}, [LSCP spec minor version this release complies with.]) + AM_PROG_LIBTOOL AC_SUBST(SHLIB_VERSION_ARG) @@ -118,7 +127,7 @@ [ --disable-alsa-driver Disable support for the Advanced Linux Sound Architecture (ALSA).], - [config_alsa_driver="no"], + [config_alsa_driver="$enableval"], [config_alsa_driver="yes"] ) have_alsa=0 @@ -198,7 +207,7 @@ [ --disable-jack-driver Disable support for the Jack Audio Connection Kit (JACK).], - [config_jack_driver="no"], + [config_jack_driver="$enableval"], [config_jack_driver="yes"] ) have_jack=0 @@ -221,7 +230,7 @@ [ --disable-arts-driver Disable support for the Analogue Realtime System (aRts).], - [config_arts_driver="no"], + [config_arts_driver="$enableval"], [config_arts_driver="yes"] ) have_arts=0 @@ -242,7 +251,7 @@ AC_ARG_ENABLE(midishare-driver, [ --disable-midishare-driver Disable support for the MidiShare system.], - [config_midishare_driver="no"], + [config_midishare_driver="$enableval"], [config_midishare_driver="yes"] ) have_midishare=0 @@ -268,7 +277,7 @@ AC_ARG_ENABLE(coremidi-driver, [ --disable-coremidi-driver Disable support for the Apple CoreMIDI system.], - [config_coremidi_driver="no"], + [config_coremidi_driver="$enableval"], [config_coremidi_driver="yes"] ) have_coremidi=0 @@ -286,8 +295,29 @@ 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.0" +libgig_version="3.1.1" PKG_CHECK_MODULES(GIG, gig >= $libgig_version, HAVE_GIG=true, HAVE_GIG=false) if test "$HAVE_GIG" = "false"; then echo "Required libgig version not found!" @@ -299,33 +329,38 @@ AC_SUBST(GIG_CFLAGS) AC_SUBST(GIG_LIBS) -# SQLITE3 -PKG_CHECK_MODULES(SQLITE3, sqlite3, HAVE_SQLITE3=true, HAVE_SQLITE3=false) -AC_SUBST(SQLITE3_LIBS) -AC_SUBST(SQLITE3_CFLAGS) -if test $HAVE_SQLITE3 = false; then - HAVE_SQLITE3=0; - echo "no, support for instrument 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 - echo "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 ########################################################################### @@ -334,27 +369,28 @@ # TODO: should we use AC_ARG_VAR(variable, description) instead? AC_ARG_ENABLE(asm, - [ --enable-asm + [ --disable-asm Enable hand-crafted assembly optimizations - (default=off). LinuxSampler provides CPU specific - assembly optimizations for the most important - synthesis algorithms. This is currently disabled - by default since current asm code is broken.], - [config_asm="yes"], - [config_asm="no"] + (default=on). LinuxSampler provides CPU specific + assembly optimizations. This is currently limited + to just enter a fast (denormal) FPU mode on x86 + platforms. There are currently no synthesis core + assembly optimizations anymore since LS 0.4.0], + [config_asm="$enableval"], + [config_asm="yes"] ) if test "$config_asm" = "yes"; then - AC_DEFINE_UNQUOTED(CONFIG_ASM, 1, [Define to 1 if you want to enable hand-crafted asm optimizations.]) + AC_DEFINE_UNQUOTED(CONFIG_ASM, 1, [Define to 1 if you want to enable asm optimizations.]) fi AC_ARG_ENABLE(dev-mode, - [ --enable-dev-mode - Enable development mode (default=off). In that mode + [ --disable-dev-mode + Disable development mode (default=on). In that mode we do some extra sanity checks here and there. This helps to spot possible problems, but reduces efficiency a bit], - [config_dev_mode="yes"], - [config_dev_mode="no"] + [config_dev_mode="$enableval"], + [config_dev_mode="yes"] ) if test "$config_dev_mode" = "yes"; then AC_DEFINE_UNQUOTED(CONFIG_DEVMODE, 1, [Define to 1 if you want to enable development mode.]) @@ -381,7 +417,7 @@ context as well. Otherwise if disabled segmentation faults will be forced by the application on critical errors.], - [config_rt_exceptions="yes"], + [config_rt_exceptions="$enableval"], [config_rt_exceptions="no"] ) if test "$config_rt_exceptions" = "yes"; then @@ -526,15 +562,16 @@ ) AC_DEFINE_UNQUOTED(CONFIG_DEFAULT_SUBFRAGMENT_SIZE, $config_subfragment_size, [Define default subfragment size (in sample points).]) -AC_ARG_ENABLE(global-attenuation, - [ --enable-global-attenuation +AC_ARG_ENABLE(global-attenuation-default, + [ --enable-global-attenuation-default To prevent clipping all samples will be lowered - in amplitude by this given factor. + in amplitude by this given default factor (can + be overridden at runtime). (default=0.35)], - [config_global_attenuation="${enableval}"], - [config_global_attenuation="0.35"] + [config_global_attenuation_default="${enableval}"], + [config_global_attenuation_default="0.35"] ) -AC_DEFINE_UNQUOTED(CONFIG_GLOBAL_ATTENUATION, $config_global_attenuation, [Define global volume attenuation (as floating point factor).]) +AC_DEFINE_UNQUOTED(CONFIG_GLOBAL_ATTENUATION_DEFAULT, $config_global_attenuation_default, [Define default global volume attenuation (as floating point factor).]) AC_ARG_ENABLE(voice-steal-algo, [ --enable-voice-steal-algo @@ -574,7 +611,7 @@ If enabled will force filter to be used even if no usage was define in instrument patch files. (default=no).], - [config_force_filter="yes"], + [config_force_filter="$enableval"], [config_force_filter="no"] ) if test "$config_force_filter" = "yes"; then @@ -664,7 +701,7 @@ messages which do not provide a correct checksum will be ignored. This is disabled by default as not all devices honor GS checksums.], - [config_assert_gs_sysex_checksum="yes"], + [config_assert_gs_sysex_checksum="$enableval"], [config_assert_gs_sysex_checksum="no"] ) if test "config_assert_gs_sysex_checksum" = "yes"; then @@ -710,8 +747,7 @@ Similar to intmath but uses abs() function. Depending on compiler and platrofm this could perform better than integer math as it avoids - an extra integer multiply instruction. - + an extra integer multiply instruction. diharmonic: The triangular wave will be approximated by adding two sinusoidials. This solution might especially hurt on @@ -745,8 +781,7 @@ Similar to intmath but uses abs() function. Depending on compiler and platrofm this could perform better than integer math as it avoids - an extra integer multiply instruction. - + an extra integer multiply instruction. diharmonic: The triangular wave will be approximated by adding two sinusoidials. This solution might especially hurt on @@ -777,7 +812,7 @@ will not discard notes, triggered in mute mode, when the channel is unmuted. But also will reduce the efficiency.], - [config_process_muted_channels="yes"], + [config_process_muted_channels="$enableval"], [config_process_muted_channels="no"] ) if test "$config_process_muted_channels" = "yes"; then @@ -791,7 +826,7 @@ all voices whenever it receives an All-Notes-Off MIDI message. You can disable this behavior, so that LS simply ignores such messages.], - [config_process_all_notes_off="no"], + [config_process_all_notes_off="$enableval"], [config_process_all_notes_off="yes"] ) if test "$config_process_all_notes_off" = "yes"; then @@ -805,13 +840,43 @@ generated by for example the envelope generator will be smoother, minimizing the risk for audio clicks. Disable it to reduce CPU usage.], - [config_interpolate_volume="no"], + [config_interpolate_volume="$enableval"], [config_interpolate_volume="yes"] ) if test "$config_interpolate_volume" = "yes"; then AC_DEFINE_UNQUOTED(CONFIG_INTERPOLATE_VOLUME, 1, [Define to 1 if you want to enable interpolation of volume modulation.]) fi +AC_ARG_ENABLE(plugin-dir, + [ --enable-plugin-dir + Directory where the sampler shall look for potential plugins, + that is 3rd party shared libraries that should be loaded by + the sampler on startup. By default the sampler will search + for plugins in the subdirectory "plugins" below its own + library directory. + (i.e. /usr/local/lib/linuxsampler/plugins)], + [config_plugin_dir="${enableval}"], + [config_plugin_dir="${libdir}/linuxsampler/plugins"] +) +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) @@ -846,6 +911,15 @@ echo "Call './configure --help' for further information or read configure.in." exit -1; fi +else + case "$config_signed_triang_algo" in + intmath) + triang_signed=2 ;; + diharmonic) + triang_signed=3 ;; + intmathabs) + triang_signed=5 ;; + esac fi AC_DEFINE_UNQUOTED(CONFIG_SIGNED_TRIANG_ALGO, ${triang_signed}, [Define signed triangular wave algorithm to be used.]) @@ -877,6 +951,15 @@ echo "Call './configure --help' for further information or read configure.in." exit -1; fi +else + case "$config_unsigned_triang_algo" in + intmath) + triang_unsigned=2 ;; + diharmonic) + triang_unsigned=3 ;; + intmathabs) + triang_unsigned=5 ;; + esac fi AC_DEFINE_UNQUOTED(CONFIG_UNSIGNED_TRIANG_ALGO, ${triang_unsigned}, [Define unsigned triangular wave algorithm to be used.]) @@ -908,23 +991,23 @@ man/Makefile \ man/linuxsampler.1 \ src/Makefile \ + src/db/Makefile \ src/network/Makefile \ src/engines/Makefile \ src/engines/gig/Makefile \ src/engines/common/Makefile \ - src/common/Makefile src/lib/Makefile \ - src/lib/fileloader/Makefile \ - src/lib/fileloader/libgig/Makefile \ + src/common/Makefile \ src/testcases/Makefile \ src/drivers/Makefile \ src/drivers/audio/Makefile \ src/drivers/midi/Makefile \ + src/plugins/Makefile \ linuxsampler.spec \ debian/Makefile \ Artwork/Makefile \ scripts/Makefile \ osx/Makefile \ - osx/LinuxSampler.xcode/Makefile \ + osx/linuxsampler.xcodeproj/Makefile \ Documentation/Makefile \ Documentation/Engines/Makefile \ Documentation/Engines/gig/Makefile \ @@ -932,6 +1015,12 @@ Doxyfile \ ) +# resolve all nested variables in '${config_plugin_dir}' +# (merely for providing a human readable summary below) +while test $config_plugin_dir != `eval echo ${config_plugin_dir}` ; do + config_plugin_dir=`eval echo ${config_plugin_dir}` +done + ########################################################################### # Output All Configuration Options @@ -956,7 +1045,7 @@ echo "# Maximum Disk Streams: ${config_max_streams}" echo "# Maximum Voices: ${config_max_voices}" echo "# Default Subfragment Size: ${config_subfragment_size}" -echo "# Global Volume Attenuation: ${config_global_attenuation}" +echo "# Default Global Volume Attenuation: ${config_global_attenuation_default}" echo "# Voice Stealing Algorithm: ${config_voice_steal_algo}" echo "# Signed Triangular Oscillator Algorithm: ${config_signed_triang_algo}" echo "# Unsigned Triangular Oscillator Algorithm: ${config_unsigned_triang_algo}" @@ -974,6 +1063,11 @@ 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: ${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. #" echo "#####################################################################"