--- linuxsampler/trunk/configure.in 2006/01/15 18:23:11 830 +++ linuxsampler/trunk/configure.in 2007/02/07 15:41:31 1040 @@ -4,8 +4,8 @@ # LinuxSampler's / liblinuxsampler's "official" release version: LINUXSAMPLER_RELEASE_MAJOR=0 -LINUXSAMPLER_RELEASE_MINOR=3 -LINUXSAMPLER_RELEASE_BUILD=3cvs +LINUXSAMPLER_RELEASE_MINOR=4 +LINUXSAMPLER_RELEASE_BUILD=0.3cvs #------------------------------------------------------------------------------------ # 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) @@ -61,11 +70,10 @@ # determine the right gcc switch for CPU specific optimizations # (only if the user did not provide one) CXX_CPU_SWITCH= -echo "X $CXXFLAGS " if ! echo "X $CXXFLAGS " | grep -q -- " \(-march=\|-mcpu=\|-mtune=\|-arch=\)" ; then if test "$def_arch_x86" = 1; then CXX_CPU_SWITCH="-march=$target_cpu" - elif test "$target_cpu" = "powerpc"; then + elif test "$target_cpu" = "ppc"; then CXX_CPU_SWITCH="-arch=$target_cpu" fi fi @@ -106,120 +114,189 @@ # check for AC_CHECK_HEADERS(features.h) + +########################################################################### # Checks for available audio and MIDI systems / drivers # (we throw an error if there's not at least one system for audio output and MIDI input available) + have_midi_input_driver="false" have_audio_output_driver="false" -AC_CHECK_HEADER(alsa/asoundlib.h, - AC_CHECK_LIB(asound, main, - have_alsa=1 - , - have_alsa=0 - ) - , - have_alsa=0 -) -if test "$have_alsa" = "1"; then - have_midi_input_driver="true" - have_audio_output_driver="true"; +# ALSA +AC_ARG_ENABLE(alsa-driver, + [ --disable-alsa-driver + Disable support for the Advanced Linux Sound + Architecture (ALSA).], + [config_alsa_driver="no"], + [config_alsa_driver="yes"] +) +have_alsa=0 +if test "$config_alsa_driver" = "yes"; then + AC_CHECK_HEADER(alsa/asoundlib.h, + AC_CHECK_LIB(asound, main, + have_alsa=1 + , + have_alsa=0 + ) + , + have_alsa=0 + ) + if test "$have_alsa" = "1"; then + have_midi_input_driver="true" + have_audio_output_driver="true"; + fi + + echo -n "checking Alsa version... " + AC_LANG_SAVE + AC_LANG_C + AC_TRY_RUN([ + #include + void main(void) { + /* ensure backward compatibility */ + #if !defined(SND_LIB_MAJOR) && defined(SOUNDLIB_VERSION_MAJOR) + #define SND_LIB_MAJOR SOUNDLIB_VERSION_MAJOR + #endif + exit(SND_LIB_MAJOR); + } + ], + alsa_major=0, + alsa_major=$?, + alsa_major=0 + ) + AC_TRY_RUN([ + #include + void main(void) { + /* ensure backward compatibility */ + #if !defined(SND_LIB_MINOR) && defined(SOUNDLIB_VERSION_MINOR) + #define SND_LIB_MINOR SOUNDLIB_VERSION_MINOR + #endif + exit(SND_LIB_MINOR); + } + ], + alsa_minor=0, + alsa_minor=$?, + alsa_minor=0 + ) + AC_TRY_RUN([ + #include + void main(void) { + /* ensure backward compatibility */ + #if !defined(SND_LIB_SUBMINOR) && defined(SOUNDLIB_VERSION_SUBMINOR) + #define SND_LIB_SUBMINOR SOUNDLIB_VERSION_SUBMINOR + #endif + exit(SND_LIB_SUBMINOR); + } + ], + alsa_subminor=0, + alsa_subminor=$?, + alsa_subminor=0 + ) + AC_LANG_RESTORE + echo "$alsa_major.$alsa_minor.$alsa_subminor"; + AC_DEFINE_UNQUOTED(ALSA_MAJOR,$alsa_major,[Define to the major version number of your Alsa installation.]) + AC_DEFINE_UNQUOTED(ALSA_MINOR,$alsa_minor,[Define to the minor version number of your Alsa installation.]) + AC_DEFINE_UNQUOTED(ALSA_SUBMINOR,$alsa_subminor,[Define to the subminor version number of your Alsa installation.]) +else + echo "ALSA support disabled by configure script parameter" fi AM_CONDITIONAL(HAVE_ALSA, test $have_alsa = "1") AC_DEFINE_UNQUOTED(HAVE_ALSA,$have_alsa,[Define to 1 if you have ALSA installed.]) -echo -n "checking Alsa version... " -AC_LANG_SAVE -AC_LANG_C -AC_TRY_RUN([ -#include -void main(void) { -/* ensure backward compatibility */ -#if !defined(SND_LIB_MAJOR) && defined(SOUNDLIB_VERSION_MAJOR) -#define SND_LIB_MAJOR SOUNDLIB_VERSION_MAJOR -#endif -exit(SND_LIB_MAJOR); -} -], -alsa_major=0, -alsa_major=$?, -alsa_major=0 -) -AC_TRY_RUN([ -#include -void main(void) { -/* ensure backward compatibility */ -#if !defined(SND_LIB_MINOR) && defined(SOUNDLIB_VERSION_MINOR) -#define SND_LIB_MINOR SOUNDLIB_VERSION_MINOR -#endif -exit(SND_LIB_MINOR); -} -], -alsa_minor=0, -alsa_minor=$?, -alsa_minor=0 -) -AC_TRY_RUN([ -#include -void main(void) { -/* ensure backward compatibility */ -#if !defined(SND_LIB_SUBMINOR) && defined(SOUNDLIB_VERSION_SUBMINOR) -#define SND_LIB_SUBMINOR SOUNDLIB_VERSION_SUBMINOR -#endif -exit(SND_LIB_SUBMINOR); -} -], -alsa_subminor=0, -alsa_subminor=$?, -alsa_subminor=0 -) -AC_LANG_RESTORE -echo "$alsa_major.$alsa_minor.$alsa_subminor"; -AC_DEFINE_UNQUOTED(ALSA_MAJOR,$alsa_major,[Define to the major version number of your Alsa installation.]) -AC_DEFINE_UNQUOTED(ALSA_MINOR,$alsa_minor,[Define to the minor version number of your Alsa installation.]) -AC_DEFINE_UNQUOTED(ALSA_SUBMINOR,$alsa_subminor,[Define to the subminor version number of your Alsa installation.]) - # JACK -PKG_CHECK_MODULES(JACK, jack, HAVE_JACK=true, HAVE_JACK=false) -AC_SUBST(JACK_LIBS) -AC_SUBST(JACK_CFLAGS) -if test $HAVE_JACK = false; then - HAVE_JACK=0; +AC_ARG_ENABLE(jack-driver, + [ --disable-jack-driver + Disable support for the Jack Audio Connection Kit + (JACK).], + [config_jack_driver="no"], + [config_jack_driver="yes"] +) +have_jack=0 +if test "$config_jack_driver" = "yes"; then + PKG_CHECK_MODULES(JACK, jack, have_jack=1, have_jack=0) + if test $have_jack = "1"; then + AC_SUBST(JACK_LIBS) + AC_SUBST(JACK_CFLAGS) + AC_CHECK_LIB(jack, jack_client_name_size, [AC_DEFINE(HAVE_JACK_CLIENT_NAME_SIZE, 1, [Define to 1 if you have the `jack_client_name_size' function.])], , $JACK_LIBS) + have_audio_output_driver="true"; + fi else - HAVE_JACK=1 - have_audio_output_driver="true"; - AC_CHECK_LIB(jack, jack_client_name_size, [AC_DEFINE(HAVE_JACK_CLIENT_NAME_SIZE, 1, [Define to 1 if you have the `jack_client_name_size' function.])], , $JACK_LIBS) + echo "JACK support disabled by configure script parameter" fi -AM_CONDITIONAL(HAVE_JACK, test $HAVE_JACK = 1) -AC_DEFINE_UNQUOTED(HAVE_JACK,$HAVE_JACK,[Define to 1 if you have JACK installed.]) +AM_CONDITIONAL(HAVE_JACK, test $have_jack = "1") +AC_DEFINE_UNQUOTED(HAVE_JACK,$have_jack,[Define to 1 if you have JACK installed.]) + +# ARTS +AC_ARG_ENABLE(arts-driver, + [ --disable-arts-driver + Disable support for the Analogue Realtime System + (aRts).], + [config_arts_driver="no"], + [config_arts_driver="yes"] +) +have_arts=0 +if test "$config_arts_driver" = "yes"; then + m4_ifdef([m4_include(m4/arts.m4)],, + [sinclude([m4/arts.m4])]) + AM_PATH_ARTS(0.9.5, have_arts=1, have_arts=0) + if test "$have_arts" = "1"; then + have_audio_output_driver="true" + fi +else + echo "ARTS support disabled by configure script parameter" +fi +AM_CONDITIONAL(HAVE_ARTS, test "$have_arts" = "1") +AC_DEFINE_UNQUOTED(HAVE_ARTS,$have_arts,[Define to 1 if you have aRts installed.]) # MidiShare (Linux, OS X, Windows) -AC_CHECK_HEADER(MidiShare.h, - AC_CHECK_LIB(MidiShare, MidiCountEvs, - have_midishare=1, - have_midishare=0 - ) - , - have_midishare=0 -) -if test "$have_midishare" = "1"; then - have_midi_input_driver="true" +AC_ARG_ENABLE(midishare-driver, + [ --disable-midishare-driver + Disable support for the MidiShare system.], + [config_midishare_driver="no"], + [config_midishare_driver="yes"] +) +have_midishare=0 +if test "$config_midishare_driver" = "yes"; then + AC_CHECK_HEADER(MidiShare.h, + AC_CHECK_LIB(MidiShare, MidiCountEvs, + have_midishare=1, + have_midishare=0 + ) + , + have_midishare=0 + ) + if test "$have_midishare" = "1"; then + have_midi_input_driver="true" + fi +else + echo "MidiShare support disabled by configure script parameter" fi AM_CONDITIONAL(HAVE_MIDISHARE, test $have_midishare = "1") AC_DEFINE_UNQUOTED(HAVE_MIDISHARE,$have_midishare,[Define to 1 if you have MidiShare installed.]) # CoreMIDI (OS X) -AC_CHECK_HEADER(CoreMIDI/CoreMIDI.h, - have_coremidi=1, - have_coremidi=0 -) -if test "$have_coremidi" = "1"; then - have_midi_input_driver="true" +AC_ARG_ENABLE(coremidi-driver, + [ --disable-coremidi-driver + Disable support for the Apple CoreMIDI system.], + [config_coremidi_driver="no"], + [config_coremidi_driver="yes"] +) +have_coremidi=0 +if test "$config_coremidi_driver" = "yes"; then + AC_CHECK_HEADER(CoreMIDI/CoreMIDI.h, + have_coremidi=1, + have_coremidi=0 + ) + if test "$have_coremidi" = "1"; then + have_midi_input_driver="true" + fi +else + echo "CoreMIDI support disabled by configure script parameter" fi AM_CONDITIONAL(HAVE_COREMIDI, test $have_coremidi = "1") AC_DEFINE_UNQUOTED(HAVE_COREMIDI,$have_coremidi,[Define to 1 if you have CoreMIDI installed.]) # Check presence of libgig -libgig_version="2.0.2" +libgig_version="3.1.0" 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!" @@ -458,15 +535,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 @@ -716,6 +794,20 @@ AC_DEFINE_UNQUOTED(CONFIG_PROCESS_MUTED_CHANNELS, 1, [Define to 1 if you want to enable processing of muted channels.]) fi +AC_ARG_ENABLE(process-all-notes-off, + [ --disable-process-all-notes-off + Disable interpretation of All-Notes-Off MIDI + messages (default=on). By default LS will release + 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="yes"] +) +if test "$config_process_all_notes_off" = "yes"; then + AC_DEFINE_UNQUOTED(CONFIG_PROCESS_ALL_NOTES_OFF, 1, [Define to 1 if you want to enable processing of All-Notes-Off MIDI messages.]) +fi + AC_ARG_ENABLE(interpolate-volume, [ --disable-interpolate-volume Disable interpolation of volume modulation @@ -874,7 +966,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}" @@ -890,6 +982,7 @@ echo "# Override Filter Type: ${config_override_filter_type}" echo "# Assert GS SysEx Checksum: ${config_assert_gs_sysex_checksum}" 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 "#-------------------------------------------------------------------#" echo "# Read './configure --help' or file 'configure.in' for details. #"