--- linuxsampler/trunk/configure.in 2005/07/24 18:22:56 720 +++ linuxsampler/trunk/configure.in 2006/02/26 13:00:08 840 @@ -5,7 +5,7 @@ LINUXSAMPLER_RELEASE_MAJOR=0 LINUXSAMPLER_RELEASE_MINOR=3 -LINUXSAMPLER_RELEASE_BUILD=3 +LINUXSAMPLER_RELEASE_BUILD=3cvs #------------------------------------------------------------------------------------ # The following is the libtool / shared library version. This doesn't have to @@ -59,11 +59,14 @@ AC_DEFINE_UNQUOTED(ARCH_X86,$def_arch_x86,[Define to 1 if you build for x86 architecture.]) # determine the right gcc switch for CPU specific optimizations +# (only if the user did not provide one) CXX_CPU_SWITCH= -if test "$def_arch_x86" = 1; then - CXX_CPU_SWITCH="-march=$target_cpu" -elif test "$target_cpu" = "powerpc"; then - CXX_CPU_SWITCH="-arch=$target_cpu" +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 + CXX_CPU_SWITCH="-arch=$target_cpu" + fi fi AC_SUBST([CXX_CPU_SWITCH]) @@ -99,6 +102,9 @@ fi fi +# 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" @@ -185,6 +191,18 @@ AM_CONDITIONAL(HAVE_JACK, test $HAVE_JACK = 1) AC_DEFINE_UNQUOTED(HAVE_JACK,$HAVE_JACK,[Define to 1 if you have JACK installed.]) +# ARTS + +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 +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, @@ -212,7 +230,7 @@ AC_DEFINE_UNQUOTED(HAVE_COREMIDI,$have_coremidi,[Define to 1 if you have CoreMIDI installed.]) # Check presence of libgig -libgig_version="2.0.1" +libgig_version="2.0.2" 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!" @@ -259,27 +277,27 @@ # TODO: should we use AC_ARG_VAR(variable, description) instead? AC_ARG_ENABLE(asm, - [ --disable-asm - Disable hand-crafted assembly optimizations - (default=on). LinuxSampler provides CPU specific + [ --enable-asm + Enable hand-crafted assembly optimizations + (default=off). LinuxSampler provides CPU specific assembly optimizations for the most important - synthesis algorithms. You usually don't want to - disable that.], - [config_asm="no"], - [config_asm="yes"] + synthesis algorithms. This is currently disabled + by default since current asm code is broken.], + [config_asm="yes"], + [config_asm="no"] ) if test "$config_asm" = "yes"; then AC_DEFINE_UNQUOTED(CONFIG_ASM, 1, [Define to 1 if you want to enable hand-crafted asm optimizations.]) fi AC_ARG_ENABLE(dev-mode, - [ --enable-dev-mode - Enable development mode (default=no). 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="no"], + [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.]) @@ -436,6 +454,31 @@ ) AC_DEFINE_UNQUOTED(CONFIG_MAX_VOICES, $config_max_voices, [Define max. voices.]) +AC_ARG_ENABLE(subfragment-size, + [ --enable-subfragment-size + Every audio fragment will be splitted into + subfragments. Where each subfragment renders + audio with constant synthesis parameters. This is + done for efficiency reasons. This parameter + defines the default size of a subfragment in + sample points. A large value means less CPU time + whereas a low value means better audio quality + (default=32).], + [config_subfragment_size="${enableval}"], + [config_subfragment_size="32"] +) +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 + To prevent clipping all samples will be lowered + in amplitude by this given factor. + (default=0.35)], + [config_global_attenuation="${enableval}"], + [config_global_attenuation="0.35"] +) +AC_DEFINE_UNQUOTED(CONFIG_GLOBAL_ATTENUATION, $config_global_attenuation, [Define global volume attenuation (as floating point factor).]) + AC_ARG_ENABLE(voice-steal-algo, [ --enable-voice-steal-algo Voice stealing algorithm to be used. Currently @@ -469,18 +512,6 @@ ) AC_DEFINE_UNQUOTED(CONFIG_SYSEX_BUFFER_SIZE, $config_sysex_buffer_size, [Define SysEx buffer size.]) -AC_ARG_ENABLE(filter-update-steps, - [ --enable-filter-update-steps - Amount of sample points after which filter - parameters (cutoff, resonance) are going to be - updated (default=64). Higher value means less CPU - load, but also worse parameter resolution, this - value will be aligned to a power of two.], - [config_filter_update_steps="${enableval}"], - [config_filter_update_steps="64"] -) -AC_DEFINE_UNQUOTED(CONFIG_FILTER_UPDATE_STEPS, $config_filter_update_steps, [Define amount of steps to refresh filter coefficients.]) - AC_ARG_ENABLE(force-filter, [ --enable-force-filter If enabled will force filter to be used even if @@ -583,6 +614,33 @@ AC_DEFINE_UNQUOTED(CONFIG_ASSERT_GS_SYSEX_CHECKSUM, 1, [Define to 1 if you want to enable GS SysEx check.]) fi +AC_ARG_ENABLE(portamento-time-min, + [ --enable-portamento-time-min + Minimum Portamento time in seconds + (default=0.1).], + [config_portamento_time_min="${enableval}"], + [config_portamento_time_min="0.1"] +) +AC_DEFINE_UNQUOTED(CONFIG_PORTAMENTO_TIME_MIN, $config_portamento_time_min, [Define min. portamento time.]) + +AC_ARG_ENABLE(portamento-time-max, + [ --enable-portamento-time-max + Maximum Portamento time in seconds + (default=32).], + [config_portamento_time_max="${enableval}"], + [config_portamento_time_max="32"] +) +AC_DEFINE_UNQUOTED(CONFIG_PORTAMENTO_TIME_MAX, $config_portamento_time_max, [Define max. portamento time.]) + +AC_ARG_ENABLE(portamento-time-default, + [ --enable-portamento-time-default + Default Portamento time in seconds + (default=1).], + [config_portamento_time_default="${enableval}"], + [config_portamento_time_default="1"] +) +AC_DEFINE_UNQUOTED(CONFIG_PORTAMENTO_TIME_DEFAULT, $config_portamento_time_default, [Define default portamento time.]) + AC_ARG_ENABLE(signed-triang-algo, [ --enable-signed-triang-algo Signed triangular wave algorithm to be used (e.g. for LFOs). @@ -669,6 +727,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(interpolate-volume, + [ --disable-interpolate-volume + Disable interpolation of volume modulation + (default=on). With this enabled, the volume changes + 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="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 + ########################################################################### # Automatic Benchmarks (to detect the best algorithms for the system) @@ -681,7 +753,7 @@ AC_TRY_RUN([ #define SIGNED 1 #define SILENT 1 - #include "benchmarks/triang.cpp" + #include "${srcdir}/benchmarks/triang.cpp" ], triang_signed=0, triang_signed=$?, @@ -704,7 +776,7 @@ exit -1; fi fi -AC_DEFINE_UNQUOTED(CONFIG_SIGNED_TRIANG_ALGO, signed_triang_algo_${config_signed_triang_algo}, [Define signed triangular wave algorithm to be used.]) +AC_DEFINE_UNQUOTED(CONFIG_SIGNED_TRIANG_ALGO, ${triang_signed}, [Define signed triangular wave algorithm to be used.]) if test "$config_unsigned_triang_algo" = "benchmark"; then echo -n "benchmarking for the best (unsigned) triangular oscillator algorithm... " @@ -712,7 +784,7 @@ AC_TRY_RUN([ #define SIGNED 0 #define SILENT 1 - #include "benchmarks/triang.cpp" + #include "${srcdir}/benchmarks/triang.cpp" ], triang_unsigned=0, triang_unsigned=$?, @@ -725,7 +797,7 @@ config_unsigned_triang_algo="diharmonic" echo "di harmonics" elif test "$triang_unsigned" = "5"; then - config_signed_triang_algo="intmathabs" + config_unsigned_triang_algo="intmathabs" echo "integer math using abs()" else echo "Benchmark of unsigned triangular wave algorithms failed!" @@ -735,7 +807,7 @@ exit -1; fi fi -AC_DEFINE_UNQUOTED(CONFIG_UNSIGNED_TRIANG_ALGO, unsigned_triang_algo_${config_unsigned_triang_algo}, [Define unsigned triangular wave algorithm to be used.]) +AC_DEFINE_UNQUOTED(CONFIG_UNSIGNED_TRIANG_ALGO, ${triang_unsigned}, [Define unsigned triangular wave algorithm to be used.]) AC_LANG_RESTORE @@ -812,11 +884,15 @@ echo "# Stream Size: ${config_stream_size}" 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 "# 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}" echo "# SysEx Buffer Size: ${config_sysex_buffer_size} Byte" -echo "# Filter Update Steps: ${config_filter_update_steps}" +echo "# Min. Portamento Time: ${config_portamento_time_min} s" +echo "# Max. Portamento Time: ${config_portamento_time_max} s" +echo "# Default Portamento Time: ${config_portamento_time_default} s" echo "# Force Filter Usage: ${config_force_filter}" echo "# Filter Cutoff Minimum: ${config_filter_cutoff_min} Hz" echo "# Filter Cutoff Maximum: ${config_filter_cutoff_max} Hz" @@ -825,6 +901,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 "# Interpolate Volume: ${config_interpolate_volume}" echo "#-------------------------------------------------------------------#" echo "# Read './configure --help' or file 'configure.in' for details. #" echo "#####################################################################"