5 |
|
|
6 |
LINUXSAMPLER_RELEASE_MAJOR=0 |
LINUXSAMPLER_RELEASE_MAJOR=0 |
7 |
LINUXSAMPLER_RELEASE_MINOR=3 |
LINUXSAMPLER_RELEASE_MINOR=3 |
8 |
LINUXSAMPLER_RELEASE_BUILD=3 |
LINUXSAMPLER_RELEASE_BUILD=3cvs |
9 |
|
|
10 |
#------------------------------------------------------------------------------------ |
#------------------------------------------------------------------------------------ |
11 |
# The following is the libtool / shared library version. This doesn't have to |
# The following is the libtool / shared library version. This doesn't have to |
59 |
AC_DEFINE_UNQUOTED(ARCH_X86,$def_arch_x86,[Define to 1 if you build for x86 architecture.]) |
AC_DEFINE_UNQUOTED(ARCH_X86,$def_arch_x86,[Define to 1 if you build for x86 architecture.]) |
60 |
|
|
61 |
# determine the right gcc switch for CPU specific optimizations |
# determine the right gcc switch for CPU specific optimizations |
62 |
|
# (only if the user did not provide one) |
63 |
CXX_CPU_SWITCH= |
CXX_CPU_SWITCH= |
64 |
if test "$def_arch_x86" = 1; then |
if ! echo "X $CXXFLAGS " | grep -q -- " \(-march=\|-mcpu=\|-mtune=\|-arch=\)" ; then |
65 |
CXX_CPU_SWITCH="-march=$target_cpu" |
if test "$def_arch_x86" = 1; then |
66 |
elif test "$target_cpu" = "powerpc"; then |
CXX_CPU_SWITCH="-march=$target_cpu" |
67 |
CXX_CPU_SWITCH="-arch=$target_cpu" |
elif test "$target_cpu" = "powerpc"; then |
68 |
|
CXX_CPU_SWITCH="-arch=$target_cpu" |
69 |
|
fi |
70 |
fi |
fi |
71 |
AC_SUBST([CXX_CPU_SWITCH]) |
AC_SUBST([CXX_CPU_SWITCH]) |
72 |
|
|
102 |
fi |
fi |
103 |
fi |
fi |
104 |
|
|
105 |
|
# check for <features.h> |
106 |
|
AC_CHECK_HEADERS(features.h) |
107 |
|
|
108 |
# Checks for available audio and MIDI systems / drivers |
# Checks for available audio and MIDI systems / drivers |
109 |
# (we throw an error if there's not at least one system for audio output and MIDI input available) |
# (we throw an error if there's not at least one system for audio output and MIDI input available) |
110 |
have_midi_input_driver="false" |
have_midi_input_driver="false" |
218 |
AC_DEFINE_UNQUOTED(HAVE_COREMIDI,$have_coremidi,[Define to 1 if you have CoreMIDI installed.]) |
AC_DEFINE_UNQUOTED(HAVE_COREMIDI,$have_coremidi,[Define to 1 if you have CoreMIDI installed.]) |
219 |
|
|
220 |
# Check presence of libgig |
# Check presence of libgig |
221 |
libgig_version="2.0.1" |
libgig_version="2.0.2" |
222 |
PKG_CHECK_MODULES(GIG, gig >= $libgig_version, HAVE_GIG=true, HAVE_GIG=false) |
PKG_CHECK_MODULES(GIG, gig >= $libgig_version, HAVE_GIG=true, HAVE_GIG=false) |
223 |
if test "$HAVE_GIG" = "false"; then |
if test "$HAVE_GIG" = "false"; then |
224 |
echo "Required libgig version not found!" |
echo "Required libgig version not found!" |
265 |
# TODO: should we use AC_ARG_VAR(variable, description) instead? |
# TODO: should we use AC_ARG_VAR(variable, description) instead? |
266 |
|
|
267 |
AC_ARG_ENABLE(asm, |
AC_ARG_ENABLE(asm, |
268 |
[ --disable-asm |
[ --enable-asm |
269 |
Disable hand-crafted assembly optimizations |
Enable hand-crafted assembly optimizations |
270 |
(default=on). LinuxSampler provides CPU specific |
(default=off). LinuxSampler provides CPU specific |
271 |
assembly optimizations for the most important |
assembly optimizations for the most important |
272 |
synthesis algorithms. You usually don't want to |
synthesis algorithms. This is currently disabled |
273 |
disable that.], |
by default since current asm code is broken.], |
274 |
[config_asm="no"], |
[config_asm="yes"], |
275 |
[config_asm="yes"] |
[config_asm="no"] |
276 |
) |
) |
277 |
if test "$config_asm" = "yes"; then |
if test "$config_asm" = "yes"; then |
278 |
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 hand-crafted asm optimizations.]) |
279 |
fi |
fi |
280 |
|
|
281 |
AC_ARG_ENABLE(dev-mode, |
AC_ARG_ENABLE(dev-mode, |
282 |
[ --enable-dev-mode |
[ --disable-dev-mode |
283 |
Enable development mode (default=no). In that mode |
Disable development mode (default=on). In that mode |
284 |
we do some extra sanity checks here and there. |
we do some extra sanity checks here and there. |
285 |
This helps to spot possible problems, but reduces |
This helps to spot possible problems, but reduces |
286 |
efficiency a bit], |
efficiency a bit], |
287 |
[config_dev_mode="yes"], |
[config_dev_mode="no"], |
288 |
[config_dev_mode="no"] |
[config_dev_mode="yes"] |
289 |
) |
) |
290 |
if test "$config_dev_mode" = "yes"; then |
if test "$config_dev_mode" = "yes"; then |
291 |
AC_DEFINE_UNQUOTED(CONFIG_DEVMODE, 1, [Define to 1 if you want to enable development mode.]) |
AC_DEFINE_UNQUOTED(CONFIG_DEVMODE, 1, [Define to 1 if you want to enable development mode.]) |
442 |
) |
) |
443 |
AC_DEFINE_UNQUOTED(CONFIG_MAX_VOICES, $config_max_voices, [Define max. voices.]) |
AC_DEFINE_UNQUOTED(CONFIG_MAX_VOICES, $config_max_voices, [Define max. voices.]) |
444 |
|
|
445 |
|
AC_ARG_ENABLE(subfragment-size, |
446 |
|
[ --enable-subfragment-size |
447 |
|
Every audio fragment will be splitted into |
448 |
|
subfragments. Where each subfragment renders |
449 |
|
audio with constant synthesis parameters. This is |
450 |
|
done for efficiency reasons. This parameter |
451 |
|
defines the default size of a subfragment in |
452 |
|
sample points. A large value means less CPU time |
453 |
|
whereas a low value means better audio quality |
454 |
|
(default=32).], |
455 |
|
[config_subfragment_size="${enableval}"], |
456 |
|
[config_subfragment_size="32"] |
457 |
|
) |
458 |
|
AC_DEFINE_UNQUOTED(CONFIG_DEFAULT_SUBFRAGMENT_SIZE, $config_subfragment_size, [Define default subfragment size (in sample points).]) |
459 |
|
|
460 |
|
AC_ARG_ENABLE(global-attenuation, |
461 |
|
[ --enable-global-attenuation |
462 |
|
To prevent clipping all samples will be lowered |
463 |
|
in amplitude by this given factor. |
464 |
|
(default=0.35)], |
465 |
|
[config_global_attenuation="${enableval}"], |
466 |
|
[config_global_attenuation="0.35"] |
467 |
|
) |
468 |
|
AC_DEFINE_UNQUOTED(CONFIG_GLOBAL_ATTENUATION, $config_global_attenuation, [Define global volume attenuation (as floating point factor).]) |
469 |
|
|
470 |
AC_ARG_ENABLE(voice-steal-algo, |
AC_ARG_ENABLE(voice-steal-algo, |
471 |
[ --enable-voice-steal-algo |
[ --enable-voice-steal-algo |
472 |
Voice stealing algorithm to be used. Currently |
Voice stealing algorithm to be used. Currently |
500 |
) |
) |
501 |
AC_DEFINE_UNQUOTED(CONFIG_SYSEX_BUFFER_SIZE, $config_sysex_buffer_size, [Define SysEx buffer size.]) |
AC_DEFINE_UNQUOTED(CONFIG_SYSEX_BUFFER_SIZE, $config_sysex_buffer_size, [Define SysEx buffer size.]) |
502 |
|
|
|
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.]) |
|
|
|
|
503 |
AC_ARG_ENABLE(force-filter, |
AC_ARG_ENABLE(force-filter, |
504 |
[ --enable-force-filter |
[ --enable-force-filter |
505 |
If enabled will force filter to be used even if |
If enabled will force filter to be used even if |
602 |
AC_DEFINE_UNQUOTED(CONFIG_ASSERT_GS_SYSEX_CHECKSUM, 1, [Define to 1 if you want to enable GS SysEx check.]) |
AC_DEFINE_UNQUOTED(CONFIG_ASSERT_GS_SYSEX_CHECKSUM, 1, [Define to 1 if you want to enable GS SysEx check.]) |
603 |
fi |
fi |
604 |
|
|
605 |
|
AC_ARG_ENABLE(portamento-time-min, |
606 |
|
[ --enable-portamento-time-min |
607 |
|
Minimum Portamento time in seconds |
608 |
|
(default=0.1).], |
609 |
|
[config_portamento_time_min="${enableval}"], |
610 |
|
[config_portamento_time_min="0.1"] |
611 |
|
) |
612 |
|
AC_DEFINE_UNQUOTED(CONFIG_PORTAMENTO_TIME_MIN, $config_portamento_time_min, [Define min. portamento time.]) |
613 |
|
|
614 |
|
AC_ARG_ENABLE(portamento-time-max, |
615 |
|
[ --enable-portamento-time-max |
616 |
|
Maximum Portamento time in seconds |
617 |
|
(default=32).], |
618 |
|
[config_portamento_time_max="${enableval}"], |
619 |
|
[config_portamento_time_max="32"] |
620 |
|
) |
621 |
|
AC_DEFINE_UNQUOTED(CONFIG_PORTAMENTO_TIME_MAX, $config_portamento_time_max, [Define max. portamento time.]) |
622 |
|
|
623 |
|
AC_ARG_ENABLE(portamento-time-default, |
624 |
|
[ --enable-portamento-time-default |
625 |
|
Default Portamento time in seconds |
626 |
|
(default=1).], |
627 |
|
[config_portamento_time_default="${enableval}"], |
628 |
|
[config_portamento_time_default="1"] |
629 |
|
) |
630 |
|
AC_DEFINE_UNQUOTED(CONFIG_PORTAMENTO_TIME_DEFAULT, $config_portamento_time_default, [Define default portamento time.]) |
631 |
|
|
632 |
AC_ARG_ENABLE(signed-triang-algo, |
AC_ARG_ENABLE(signed-triang-algo, |
633 |
[ --enable-signed-triang-algo |
[ --enable-signed-triang-algo |
634 |
Signed triangular wave algorithm to be used (e.g. for LFOs). |
Signed triangular wave algorithm to be used (e.g. for LFOs). |
637 |
Uses integer math without any branch will then be |
Uses integer math without any branch will then be |
638 |
converted to floating point value for each sample point. |
converted to floating point value for each sample point. |
639 |
This int->float conversion might hurt on some systems. |
This int->float conversion might hurt on some systems. |
640 |
|
intmathabs: |
641 |
|
Similar to intmath but uses abs() function. |
642 |
|
Depending on compiler and platrofm this could |
643 |
|
perform better than integer math as it avoids |
644 |
|
an extra integer multiply instruction. |
645 |
|
|
646 |
diharmonic: |
diharmonic: |
647 |
The triangular wave will be approximated by adding two |
The triangular wave will be approximated by adding two |
648 |
sinusoidials. This solution might especially hurt on |
sinusoidials. This solution might especially hurt on |
654 |
benchmark between the algorithms mentioned above. |
benchmark between the algorithms mentioned above. |
655 |
This will NOT work for cross compilation!], |
This will NOT work for cross compilation!], |
656 |
[ if test ! "(" "${enableval}" = "intmath" \ |
[ if test ! "(" "${enableval}" = "intmath" \ |
657 |
|
-o "${enableval}" = "intmathabs" \ |
658 |
-o "${enableval}" = "diharmonic" ")" ; then |
-o "${enableval}" = "diharmonic" ")" ; then |
659 |
AC_MSG_ERROR([Unknown triangular wave algorithm for parameter --enable-signed-triang-algo]) |
AC_MSG_ERROR([Unknown triangular wave algorithm for parameter --enable-signed-triang-algo]) |
660 |
else |
else |
672 |
Uses integer math without any branch will then be |
Uses integer math without any branch will then be |
673 |
converted to floating point value for each sample point. |
converted to floating point value for each sample point. |
674 |
This int->float conversion might hurt on some systems. |
This int->float conversion might hurt on some systems. |
675 |
|
intmathabs: |
676 |
|
Similar to intmath but uses abs() function. |
677 |
|
Depending on compiler and platrofm this could |
678 |
|
perform better than integer math as it avoids |
679 |
|
an extra integer multiply instruction. |
680 |
|
|
681 |
diharmonic: |
diharmonic: |
682 |
The triangular wave will be approximated by adding two |
The triangular wave will be approximated by adding two |
683 |
sinusoidials. This solution might especially hurt on |
sinusoidials. This solution might especially hurt on |
689 |
benchmark between the algorithms mentioned above. |
benchmark between the algorithms mentioned above. |
690 |
This will NOT work for cross compilation!], |
This will NOT work for cross compilation!], |
691 |
[ if test ! "(" "${enableval}" = "intmath" \ |
[ if test ! "(" "${enableval}" = "intmath" \ |
692 |
|
-o "${enableval}" = "intmathabs" \ |
693 |
-o "${enableval}" = "diharmonic" ")" ; then |
-o "${enableval}" = "diharmonic" ")" ; then |
694 |
AC_MSG_ERROR([Unknown triangular wave algorithm for parameter --enable-unsigned-triang-algo]) |
AC_MSG_ERROR([Unknown triangular wave algorithm for parameter --enable-unsigned-triang-algo]) |
695 |
else |
else |
715 |
AC_DEFINE_UNQUOTED(CONFIG_PROCESS_MUTED_CHANNELS, 1, [Define to 1 if you want to enable processing of muted channels.]) |
AC_DEFINE_UNQUOTED(CONFIG_PROCESS_MUTED_CHANNELS, 1, [Define to 1 if you want to enable processing of muted channels.]) |
716 |
fi |
fi |
717 |
|
|
718 |
|
AC_ARG_ENABLE(interpolate-volume, |
719 |
|
[ --disable-interpolate-volume |
720 |
|
Disable interpolation of volume modulation |
721 |
|
(default=on). With this enabled, the volume changes |
722 |
|
generated by for example the envelope generator |
723 |
|
will be smoother, minimizing the risk for audio |
724 |
|
clicks. Disable it to reduce CPU usage.], |
725 |
|
[config_interpolate_volume="no"], |
726 |
|
[config_interpolate_volume="yes"] |
727 |
|
) |
728 |
|
if test "$config_interpolate_volume" = "yes"; then |
729 |
|
AC_DEFINE_UNQUOTED(CONFIG_INTERPOLATE_VOLUME, 1, [Define to 1 if you want to enable interpolation of volume modulation.]) |
730 |
|
fi |
731 |
|
|
732 |
|
|
733 |
########################################################################### |
########################################################################### |
734 |
# Automatic Benchmarks (to detect the best algorithms for the system) |
# Automatic Benchmarks (to detect the best algorithms for the system) |
741 |
AC_TRY_RUN([ |
AC_TRY_RUN([ |
742 |
#define SIGNED 1 |
#define SIGNED 1 |
743 |
#define SILENT 1 |
#define SILENT 1 |
744 |
#include "benchmarks/triang.cpp" |
#include "${srcdir}/benchmarks/triang.cpp" |
745 |
], |
], |
746 |
triang_signed=0, |
triang_signed=0, |
747 |
triang_signed=$?, |
triang_signed=$?, |
753 |
elif test "$triang_signed" = "3"; then |
elif test "$triang_signed" = "3"; then |
754 |
config_signed_triang_algo="diharmonic" |
config_signed_triang_algo="diharmonic" |
755 |
echo "di harmonics" |
echo "di harmonics" |
756 |
|
elif test "$triang_signed" = "5"; then |
757 |
|
config_signed_triang_algo="intmathabs" |
758 |
|
echo "integer math using abs()" |
759 |
else |
else |
760 |
echo "Benchmark of signed triangular wave algorithms failed!" |
echo "Benchmark of signed triangular wave algorithms failed!" |
761 |
echo "Maybe you are doing cross compilation? In that case you have to select" |
echo "Maybe you are doing cross compilation? In that case you have to select" |
764 |
exit -1; |
exit -1; |
765 |
fi |
fi |
766 |
fi |
fi |
767 |
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.]) |
768 |
|
|
769 |
if test "$config_unsigned_triang_algo" = "benchmark"; then |
if test "$config_unsigned_triang_algo" = "benchmark"; then |
770 |
echo -n "benchmarking for the best (unsigned) triangular oscillator algorithm... " |
echo -n "benchmarking for the best (unsigned) triangular oscillator algorithm... " |
772 |
AC_TRY_RUN([ |
AC_TRY_RUN([ |
773 |
#define SIGNED 0 |
#define SIGNED 0 |
774 |
#define SILENT 1 |
#define SILENT 1 |
775 |
#include "benchmarks/triang.cpp" |
#include "${srcdir}/benchmarks/triang.cpp" |
776 |
], |
], |
777 |
triang_unsigned=0, |
triang_unsigned=0, |
778 |
triang_unsigned=$?, |
triang_unsigned=$?, |
784 |
elif test "$triang_unsigned" = "3"; then |
elif test "$triang_unsigned" = "3"; then |
785 |
config_unsigned_triang_algo="diharmonic" |
config_unsigned_triang_algo="diharmonic" |
786 |
echo "di harmonics" |
echo "di harmonics" |
787 |
|
elif test "$triang_unsigned" = "5"; then |
788 |
|
config_unsigned_triang_algo="intmathabs" |
789 |
|
echo "integer math using abs()" |
790 |
else |
else |
791 |
echo "Benchmark of unsigned triangular wave algorithms failed!" |
echo "Benchmark of unsigned triangular wave algorithms failed!" |
792 |
echo "Maybe you are doing cross compilation? In that case you have to select" |
echo "Maybe you are doing cross compilation? In that case you have to select" |
795 |
exit -1; |
exit -1; |
796 |
fi |
fi |
797 |
fi |
fi |
798 |
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.]) |
799 |
|
|
800 |
AC_LANG_RESTORE |
AC_LANG_RESTORE |
801 |
|
|
872 |
echo "# Stream Size: ${config_stream_size}" |
echo "# Stream Size: ${config_stream_size}" |
873 |
echo "# Maximum Disk Streams: ${config_max_streams}" |
echo "# Maximum Disk Streams: ${config_max_streams}" |
874 |
echo "# Maximum Voices: ${config_max_voices}" |
echo "# Maximum Voices: ${config_max_voices}" |
875 |
|
echo "# Default Subfragment Size: ${config_subfragment_size}" |
876 |
|
echo "# Global Volume Attenuation: ${config_global_attenuation}" |
877 |
echo "# Voice Stealing Algorithm: ${config_voice_steal_algo}" |
echo "# Voice Stealing Algorithm: ${config_voice_steal_algo}" |
878 |
echo "# Signed Triangular Oscillator Algorithm: ${config_signed_triang_algo}" |
echo "# Signed Triangular Oscillator Algorithm: ${config_signed_triang_algo}" |
879 |
echo "# Unsigned Triangular Oscillator Algorithm: ${config_unsigned_triang_algo}" |
echo "# Unsigned Triangular Oscillator Algorithm: ${config_unsigned_triang_algo}" |
880 |
echo "# SysEx Buffer Size: ${config_sysex_buffer_size} Byte" |
echo "# SysEx Buffer Size: ${config_sysex_buffer_size} Byte" |
881 |
echo "# Filter Update Steps: ${config_filter_update_steps}" |
echo "# Min. Portamento Time: ${config_portamento_time_min} s" |
882 |
|
echo "# Max. Portamento Time: ${config_portamento_time_max} s" |
883 |
|
echo "# Default Portamento Time: ${config_portamento_time_default} s" |
884 |
echo "# Force Filter Usage: ${config_force_filter}" |
echo "# Force Filter Usage: ${config_force_filter}" |
885 |
echo "# Filter Cutoff Minimum: ${config_filter_cutoff_min} Hz" |
echo "# Filter Cutoff Minimum: ${config_filter_cutoff_min} Hz" |
886 |
echo "# Filter Cutoff Maximum: ${config_filter_cutoff_max} Hz" |
echo "# Filter Cutoff Maximum: ${config_filter_cutoff_max} Hz" |
889 |
echo "# Override Filter Type: ${config_override_filter_type}" |
echo "# Override Filter Type: ${config_override_filter_type}" |
890 |
echo "# Assert GS SysEx Checksum: ${config_assert_gs_sysex_checksum}" |
echo "# Assert GS SysEx Checksum: ${config_assert_gs_sysex_checksum}" |
891 |
echo "# Process Muted Channels: ${config_process_muted_channels}" |
echo "# Process Muted Channels: ${config_process_muted_channels}" |
892 |
|
echo "# Interpolate Volume: ${config_interpolate_volume}" |
893 |
echo "#-------------------------------------------------------------------#" |
echo "#-------------------------------------------------------------------#" |
894 |
echo "# Read './configure --help' or file 'configure.in' for details. #" |
echo "# Read './configure --help' or file 'configure.in' for details. #" |
895 |
echo "#####################################################################" |
echo "#####################################################################" |