/[svn]/linuxsampler/trunk/configure.ac
ViewVC logotype

Annotation of /linuxsampler/trunk/configure.ac

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1762 - (hide annotations) (download)
Fri Aug 29 17:33:02 2008 UTC (11 years, 3 months ago) by schoenebeck
Original Path: linuxsampler/trunk/configure.in
File size: 51187 byte(s)
* global volume sysex message can now be selected at compile time to be
  only applied to the sampler channels that are connected to the respective
  MIDI input port the SysEx message arrived on (by default global volume
  SysEx messages apply globally to the whole sampler)
* bumped version to 0.5.1.7cvs

1 schoenebeck 9 AC_INIT(configure.in)
2 schoenebeck 697
3     #------------------------------------------------------------------------------------
4     # LinuxSampler's / liblinuxsampler's "official" release version:
5    
6     LINUXSAMPLER_RELEASE_MAJOR=0
7 schoenebeck 1424 LINUXSAMPLER_RELEASE_MINOR=5
8 schoenebeck 1762 LINUXSAMPLER_RELEASE_BUILD=1.7cvs
9 schoenebeck 697
10     #------------------------------------------------------------------------------------
11     # The following is the libtool / shared library version. This doesn't have to
12     # do anything with the release version. It MUST conform to the following rules:
13     #
14     # 1. Start with version information of `0:0:0' for each libtool library.
15     # 2. Update the version information only immediately before a public release of
16     # your software. More frequent updates are unnecessary, and only guarantee
17     # that the current interface number gets larger faster.
18     # 3. If the library source code has changed at all since the last update, then
19     # increment revision (`c:r:a' becomes `c:r+1:a').
20     # 4. If any interfaces have been added, removed, or changed since the last update,
21     # increment current, and set revision to 0.
22     # 5. If any interfaces have been added since the last public release, then increment
23     # age.
24     # 6. If any interfaces have been removed since the last public release, then set age
25     # to 0.
26    
27 schoenebeck 1560 LIBLINUXSAMPLER_LT_CURRENT=2
28 schoenebeck 697 LIBLINUXSAMPLER_LT_REVISION=0
29 schoenebeck 1560 LIBLINUXSAMPLER_LT_AGE=1
30 schoenebeck 697 SHARED_VERSION_INFO="$LIBLINUXSAMPLER_LT_CURRENT:$LIBLINUXSAMPLER_LT_REVISION:$LIBLINUXSAMPLER_LT_AGE"
31    
32 schoenebeck 947 #------------------------------------------------------------------------------------
33     # the LSCP specification version this LinuSampler release complies with:
34    
35     LSCP_RELEASE_MAJOR=1
36 schoenebeck 1686 LSCP_RELEASE_MINOR=4
37 schoenebeck 947
38     AC_DEFINE_UNQUOTED(LSCP_RELEASE_MAJOR, ${LSCP_RELEASE_MAJOR}, [LSCP spec major version this release complies with.])
39     AC_DEFINE_UNQUOTED(LSCP_RELEASE_MINOR, ${LSCP_RELEASE_MINOR}, [LSCP spec minor version this release complies with.])
40    
41 schoenebeck 1741 AC_PROG_CXX
42 schoenebeck 697 AM_PROG_LIBTOOL
43    
44     AC_SUBST(SHLIB_VERSION_ARG)
45     AC_SUBST(SHARED_VERSION_INFO)
46    
47 schoenebeck 12 AC_C_BIGENDIAN
48 schoenebeck 9 AC_CANONICAL_SYSTEM
49    
50 schoenebeck 80 AC_SUBST(target)
51     AC_SUBST(target_alias)
52     AC_SUBST(target_cpu)
53     AC_SUBST(target_os)
54     AC_SUBST(target_vendor)
55 schoenebeck 18
56 schoenebeck 1639 PKG_PROG_PKG_CONFIG
57 schoenebeck 275
58 schoenebeck 554 ###########################################################################
59     # General Checks
60 schoenebeck 275
61 schoenebeck 510 AC_MSG_CHECKING([whether x86 architecture])
62 schoenebeck 9 def_arch_x86=0
63     case $target_cpu in
64     "i386" | "i486" | "i586" | "i686" | "i786")
65     echo "yes"
66     def_arch_x86=1;;
67     *)
68     echo "no";;
69     esac
70     AC_DEFINE_UNQUOTED(ARCH_X86,$def_arch_x86,[Define to 1 if you build for x86 architecture.])
71    
72 schoenebeck 510 # determine the right gcc switch for CPU specific optimizations
73 schoenebeck 829 # (only if the user did not provide one)
74 schoenebeck 510 CXX_CPU_SWITCH=
75 schoenebeck 829 if ! echo "X $CXXFLAGS " | grep -q -- " \(-march=\|-mcpu=\|-mtune=\|-arch=\)" ; then
76     if test "$def_arch_x86" = 1; then
77     CXX_CPU_SWITCH="-march=$target_cpu"
78 schoenebeck 909 elif test "$target_cpu" = "ppc"; then
79 schoenebeck 829 CXX_CPU_SWITCH="-arch=$target_cpu"
80     fi
81 schoenebeck 510 fi
82     AC_SUBST([CXX_CPU_SWITCH])
83    
84 senoner 1502 # check if we're on MS Windows
85     AC_CHECK_HEADERS(
86     mmsystem.h,
87     have_windows=1,
88     have_windows=0
89     )
90     AM_CONDITIONAL(HAVE_WINDOWS, test $have_windows = "1")
91    
92 schoenebeck 288 AC_MSG_CHECKING([whether UNIX98 compatible])
93     AC_LANG_SAVE
94     AC_LANG_C
95     AC_TRY_RUN([
96     #ifndef _GNU_SOURCE
97     #define _GNU_SOURCE 1
98     #endif
99     #include <features.h>
100     void main(void) {
101     #if _XOPEN_SOURCE >= 500
102     exit(0); /* UNIX98 compatible */
103     #else
104     exit(-1); /* not UNIX98 compatible */
105     #endif
106     }
107     ],
108     have_unix98="yes",
109     have_unix98="no",
110     have_unix98="no"
111     )
112     AC_LANG_RESTORE
113     AC_MSG_RESULT([$have_unix98])
114 senoner 1502 if test "$have_unix98" = "no" -a "have_windows" = "0"; then
115 schoenebeck 288 if test "x$HAVE_UNIX98" = "x"; then
116     echo "LinuxSampler only runs on UNIX98 compatible systems, which is mandatory for"
117     echo "pthread_mutexattr_settype() call in Mutex.cpp. You may want to run
118     echo "./configure with environment variable HAVE_UNIX98=1 in case you think you
119     echo "have a UNIX98 compatible system."
120     exit -1;
121     fi
122     fi
123    
124 wylder 822 # check for <features.h>
125     AC_CHECK_HEADERS(features.h)
126 wylder 821
127 schoenebeck 1454 # test for POSIX thread library
128     m4_ifdef([m4_include(m4/pthread.m4)],,
129     [sinclude([m4/pthread.m4])])
130     ACX_PTHREAD
131     LIBS="$PTHREAD_LIBS $LIBS"
132     CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
133     CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS"
134     CC="$PTHREAD_CC"
135 schoenebeck 852
136 schoenebeck 1454 # check for a bug in NPTL-enabled glibc
137     # (see Gentoo bug report #194076)
138     AC_ARG_ENABLE(nptl-bug-check,
139     [ --disable-nptl-bug-check
140     Disable check for a bug in certain NPTL-enabled
141     glibc versions that caused crashs.],
142     [config_check_nptl_bug="$enableval"],
143     [config_check_nptl_bug="yes"]
144     )
145     if test "$config_check_nptl_bug" = "yes"; then
146     m4_ifdef([m4_include(m4/nptl_bug.m4)],,
147     [sinclude([m4/nptl_bug.m4])])
148     ACX_NPTL_GLIBC_BUG([
149     echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
150     echo "You seem to have a buggy PTHREAD library! LinuxSampler would"
151     echo "probably crash due to this. Please report us the system you are"
152     echo "using and/or file a bug report to the bug tracking system of"
153     echo "your distribution."
154     echo "If you have a NPTL-enabled glibc AND it was compiled for TLS as"
155     echo "well, you can try to circumvent this problem for now by setting"
156     echo "the environment variable LD_ASSUME_KERNEL=\"2.4.1\" , which"
157     echo "should cause this test to pass."
158     echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
159     AC_MSG_ERROR([possibly NPTL glibc bug detected])
160     ])
161     else
162     echo "NPTL glibc bug check disabled"
163     fi
164    
165 schoenebeck 1742 # FIXME: this is actually a dependency of libgig, not of LS directly, why
166     # isn't it hidden by libgig?
167     AC_CHECK_HEADERS(uuid/uuid.h)
168     AC_SEARCH_LIBS(uuid_generate, uuid)
169 schoenebeck 1454
170    
171 schoenebeck 1742
172 schoenebeck 852 ###########################################################################
173 schoenebeck 288 # Checks for available audio and MIDI systems / drivers
174     # (we throw an error if there's not at least one system for audio output and MIDI input available)
175 schoenebeck 852
176 schoenebeck 288 have_midi_input_driver="false"
177     have_audio_output_driver="false"
178    
179 schoenebeck 852 # ALSA
180     AC_ARG_ENABLE(alsa-driver,
181     [ --disable-alsa-driver
182     Disable support for the Advanced Linux Sound
183     Architecture (ALSA).],
184 schoenebeck 1360 [config_alsa_driver="$enableval"],
185 schoenebeck 852 [config_alsa_driver="yes"]
186 schoenebeck 18 )
187 schoenebeck 852 have_alsa=0
188     if test "$config_alsa_driver" = "yes"; then
189     AC_CHECK_HEADER(alsa/asoundlib.h,
190     AC_CHECK_LIB(asound, main,
191     have_alsa=1
192     ,
193     have_alsa=0
194     )
195     ,
196     have_alsa=0
197     )
198     if test "$have_alsa" = "1"; then
199     have_midi_input_driver="true"
200     have_audio_output_driver="true";
201     fi
202    
203     echo -n "checking Alsa version... "
204     AC_LANG_SAVE
205     AC_LANG_C
206     AC_TRY_RUN([
207     #include <alsa/asoundlib.h>
208     void main(void) {
209     /* ensure backward compatibility */
210     #if !defined(SND_LIB_MAJOR) && defined(SOUNDLIB_VERSION_MAJOR)
211     #define SND_LIB_MAJOR SOUNDLIB_VERSION_MAJOR
212     #endif
213     exit(SND_LIB_MAJOR);
214     }
215     ],
216     alsa_major=0,
217     alsa_major=$?,
218     alsa_major=0
219     )
220     AC_TRY_RUN([
221     #include <alsa/asoundlib.h>
222     void main(void) {
223     /* ensure backward compatibility */
224     #if !defined(SND_LIB_MINOR) && defined(SOUNDLIB_VERSION_MINOR)
225     #define SND_LIB_MINOR SOUNDLIB_VERSION_MINOR
226     #endif
227     exit(SND_LIB_MINOR);
228     }
229     ],
230     alsa_minor=0,
231     alsa_minor=$?,
232     alsa_minor=0
233     )
234     AC_TRY_RUN([
235     #include <alsa/asoundlib.h>
236     void main(void) {
237     /* ensure backward compatibility */
238     #if !defined(SND_LIB_SUBMINOR) && defined(SOUNDLIB_VERSION_SUBMINOR)
239     #define SND_LIB_SUBMINOR SOUNDLIB_VERSION_SUBMINOR
240     #endif
241     exit(SND_LIB_SUBMINOR);
242     }
243     ],
244     alsa_subminor=0,
245     alsa_subminor=$?,
246     alsa_subminor=0
247     )
248     AC_LANG_RESTORE
249     echo "$alsa_major.$alsa_minor.$alsa_subminor";
250     AC_DEFINE_UNQUOTED(ALSA_MAJOR,$alsa_major,[Define to the major version number of your Alsa installation.])
251     AC_DEFINE_UNQUOTED(ALSA_MINOR,$alsa_minor,[Define to the minor version number of your Alsa installation.])
252     AC_DEFINE_UNQUOTED(ALSA_SUBMINOR,$alsa_subminor,[Define to the subminor version number of your Alsa installation.])
253     else
254     echo "ALSA support disabled by configure script parameter"
255 schoenebeck 18 fi
256 schoenebeck 291 AM_CONDITIONAL(HAVE_ALSA, test $have_alsa = "1")
257 schoenebeck 288 AC_DEFINE_UNQUOTED(HAVE_ALSA,$have_alsa,[Define to 1 if you have ALSA installed.])
258 schoenebeck 18
259 schoenebeck 852 # JACK
260     AC_ARG_ENABLE(jack-driver,
261     [ --disable-jack-driver
262     Disable support for the Jack Audio Connection Kit
263     (JACK).],
264 schoenebeck 1360 [config_jack_driver="$enableval"],
265 schoenebeck 852 [config_jack_driver="yes"]
266 schoenebeck 18 )
267 schoenebeck 852 have_jack=0
268     if test "$config_jack_driver" = "yes"; then
269     PKG_CHECK_MODULES(JACK, jack, have_jack=1, have_jack=0)
270     if test $have_jack = "1"; then
271     AC_SUBST(JACK_LIBS)
272     AC_SUBST(JACK_CFLAGS)
273 persson 1748 linuxsampler_save_LIBS=$LIBS
274     LIBS="$JACK_LIBS $LIBS"
275     AC_CHECK_FUNCS(jack_client_name_size jack_client_open)
276     LIBS=$linuxsampler_save_LIBS
277 schoenebeck 852 have_audio_output_driver="true";
278     fi
279 schoenebeck 33 else
280 schoenebeck 852 echo "JACK support disabled by configure script parameter"
281 schoenebeck 33 fi
282 schoenebeck 852 AM_CONDITIONAL(HAVE_JACK, test $have_jack = "1")
283     AC_DEFINE_UNQUOTED(HAVE_JACK,$have_jack,[Define to 1 if you have JACK installed.])
284 schoenebeck 31
285 persson 1651 # JACK MIDI
286     have_jack_midi=0
287     if test $have_jack = "1"; then
288 persson 1652 linuxsampler_save_CFLAGS=$CFLAGS
289     linuxsampler_save_LIBS=$LIBS
290     CFLAGS="$JACK_CFLAGS $CFLAGS"
291     LIBS="$JACK_LIBS $LIBS"
292     AC_CHECK_HEADER(jack/midiport.h, have_jack_midi=1, have_jack_midi=0)
293     if test $have_jack_midi = "1"; then
294     AC_CHECK_FUNCS(jack_midi_get_event_count)
295     AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <jack/midiport.h>]], [[
296     jack_midi_clear_buffer(0, 0);
297     ]])], [AC_DEFINE(JACK_MIDI_FUNCS_NEED_NFRAMES, 1,
298     [Define to 1 if you have the old jack midi functions that need an nframes argument.])])
299     have_midi_input_driver="true"
300     fi
301     CFLAGS=$linuxsampler_save_CFLAGS
302     LIBS=$linuxsampler_save_LIBS
303 persson 1651 fi
304     AM_CONDITIONAL(HAVE_JACK_MIDI, test $have_jack_midi = "1")
305     AC_DEFINE_UNQUOTED(HAVE_JACK_MIDI, $have_jack_midi,
306     [Define to 1 if you have JACK with MIDI support installed.])
307    
308 schoenebeck 838 # ARTS
309 schoenebeck 852 AC_ARG_ENABLE(arts-driver,
310     [ --disable-arts-driver
311     Disable support for the Analogue Realtime System
312     (aRts).],
313 schoenebeck 1360 [config_arts_driver="$enableval"],
314 schoenebeck 852 [config_arts_driver="yes"]
315     )
316     have_arts=0
317     if test "$config_arts_driver" = "yes"; then
318     m4_ifdef([m4_include(m4/arts.m4)],,
319     [sinclude([m4/arts.m4])])
320     AM_PATH_ARTS(0.9.5, have_arts=1, have_arts=0)
321     if test "$have_arts" = "1"; then
322     have_audio_output_driver="true"
323     fi
324     else
325     echo "ARTS support disabled by configure script parameter"
326 schoenebeck 838 fi
327     AM_CONDITIONAL(HAVE_ARTS, test "$have_arts" = "1")
328     AC_DEFINE_UNQUOTED(HAVE_ARTS,$have_arts,[Define to 1 if you have aRts installed.])
329    
330 senoner 1502 # ASIO AUDIO (Win32)
331     AC_ARG_ENABLE(asiosdk-dir,
332     [ --enable-asiosdk-dir
333     Directory where the ASIO SDK is located, this automatically
334     enables the compilation of the ASIO audio output driver.],
335     [config_asiosdk_dir="${enableval}"],
336     [config_asiosdk_dir="."]
337     )
338     AC_SUBST(config_asiosdk_dir)
339    
340     AC_ARG_ENABLE(asio-driver,
341     [ --disable-asio-driver
342     Disable support for the Windows ASIO driver.],
343     [config_asio_driver="$enableval"],
344     [config_asio_driver="yes"]
345     )
346     have_asio=0
347     ASIOSDK_BASEDIR=
348     if test "$config_asio_driver" = "yes"; then
349     asiosdk_headerfile=$config_asiosdk_dir/ASIOSDK2/common/asio.h
350     echo -n "checking for ASIO headerfile: $asiosdk_headerfile ...."
351     if test -e $asiosdk_headerfile ; then
352     echo yes
353     have_asio=1
354     ASIOSDK_BASEDIR="$config_asiosdk_dir"
355     else
356     echo no
357     have_asio=0
358     fi
359     if test "$have_asio" = "1"; then
360     have_audio_output_driver="true"
361     fi
362     else
363     echo "Windows ASIO support disabled by configure script parameter"
364     fi
365     AC_SUBST(ASIOSDK_BASEDIR)
366     AM_CONDITIONAL(HAVE_ASIO, test $have_asio = "1")
367     AC_DEFINE_UNQUOTED(HAVE_ASIO,$have_asio,[Define to 1 if you have ASIO installed.])
368    
369 schoenebeck 609 # MidiShare (Linux, OS X, Windows)
370 schoenebeck 852 AC_ARG_ENABLE(midishare-driver,
371     [ --disable-midishare-driver
372     Disable support for the MidiShare system.],
373 schoenebeck 1360 [config_midishare_driver="$enableval"],
374 schoenebeck 852 [config_midishare_driver="yes"]
375 schoenebeck 609 )
376 schoenebeck 852 have_midishare=0
377     if test "$config_midishare_driver" = "yes"; then
378     AC_CHECK_HEADER(MidiShare.h,
379     AC_CHECK_LIB(MidiShare, MidiCountEvs,
380     have_midishare=1,
381     have_midishare=0
382     )
383     ,
384     have_midishare=0
385     )
386     if test "$have_midishare" = "1"; then
387     have_midi_input_driver="true"
388     fi
389     else
390     echo "MidiShare support disabled by configure script parameter"
391 schoenebeck 609 fi
392     AM_CONDITIONAL(HAVE_MIDISHARE, test $have_midishare = "1")
393     AC_DEFINE_UNQUOTED(HAVE_MIDISHARE,$have_midishare,[Define to 1 if you have MidiShare installed.])
394    
395     # CoreMIDI (OS X)
396 schoenebeck 852 AC_ARG_ENABLE(coremidi-driver,
397     [ --disable-coremidi-driver
398     Disable support for the Apple CoreMIDI system.],
399 schoenebeck 1360 [config_coremidi_driver="$enableval"],
400 schoenebeck 852 [config_coremidi_driver="yes"]
401 schoenebeck 609 )
402 schoenebeck 852 have_coremidi=0
403     if test "$config_coremidi_driver" = "yes"; then
404     AC_CHECK_HEADER(CoreMIDI/CoreMIDI.h,
405     have_coremidi=1,
406     have_coremidi=0
407     )
408     if test "$have_coremidi" = "1"; then
409     have_midi_input_driver="true"
410     fi
411     else
412     echo "CoreMIDI support disabled by configure script parameter"
413 schoenebeck 609 fi
414     AM_CONDITIONAL(HAVE_COREMIDI, test $have_coremidi = "1")
415     AC_DEFINE_UNQUOTED(HAVE_COREMIDI,$have_coremidi,[Define to 1 if you have CoreMIDI installed.])
416    
417 senoner 1502 # MME MIDI (Win32)
418     AC_ARG_ENABLE(mmemidi-driver,
419     [ --disable-mmemidi-driver
420     Disable support for the Windows MME MIDI system.],
421     [config_mmemidi_driver="$enableval"],
422     [config_mmemidi_driver="yes"]
423     )
424     have_mmemidi=0
425     if test "$config_mmemidi_driver" = "yes"; then
426     AC_CHECK_HEADERS(mmsystem.h,
427     have_mmemidi=1,
428     have_mmemidi=0
429     )
430     if test "$have_mmemidi" = "1"; then
431     have_midi_input_driver="true"
432     fi
433     else
434     echo "MME MIDI support disabled by configure script parameter"
435     fi
436     AM_CONDITIONAL(HAVE_MME_MIDI, test $have_mmemidi = "1")
437     AC_DEFINE_UNQUOTED(HAVE_MME_MIDI,$have_mmemidi,[Define to 1 if you have MME MIDI installed.])
438    
439 schoenebeck 1364 # have we found at least one MIDI input and one audio output driver ?
440     if test "$have_midi_input_driver" = "false"; then
441     echo "No supported MIDI input system found!"
442     echo "Sorry, LinuxSampler only supports the following MIDI drivers at the moment:"
443 persson 1652 echo "ALSA, JACK, MIDIShare, CoreMIDI, MME."
444 schoenebeck 1364 echo "If you think you have one of those available on your system, make sure you"
445     echo "also have the respective development (header) files installed."
446     exit -1;
447     fi
448     if test "$have_audio_output_driver" = "false"; then
449     echo "No supported audio output system found!"
450 persson 1652 echo "Sorry, LinuxSampler only supports ALSA, JACK, ARTS and ASIO as audio output"
451 schoenebeck 1364 echo "driver at the moment!"
452     exit -1;
453     fi
454    
455    
456    
457     ###########################################################################
458     # Checks for various DLL libraries
459    
460 schoenebeck 504 # Check presence of libgig
461 schoenebeck 1560 libgig_version="3.2.1"
462 schoenebeck 504 PKG_CHECK_MODULES(GIG, gig >= $libgig_version, HAVE_GIG=true, HAVE_GIG=false)
463     if test "$HAVE_GIG" = "false"; then
464     echo "Required libgig version not found!"
465     echo "You need to have libgig version ${libgig_version} installed!"
466     exit -1;
467 schoenebeck 714 else
468     echo "yes, found libgig $libgig_version"
469 schoenebeck 504 fi
470     AC_SUBST(GIG_CFLAGS)
471     AC_SUBST(GIG_LIBS)
472    
473 schoenebeck 1364 # Instruments DB feature (requires SQLite 3.3)
474     AC_ARG_ENABLE(instruments-db,
475     [ --disable-instruments-db
476     Disable compilation of the sampler's instruments
477     database feature. You need to have SQLite 3.3
478     or younger installed for this feature.],
479     [config_instruments_db="$enableval"],
480     [config_instruments_db="yes"]
481     )
482     HAVE_SQLITE3=0;
483     if test "$config_instruments_db" = "yes"; then
484     # Check presence of sqlite3
485     sqlite_version="3.3"
486     PKG_CHECK_MODULES(SQLITE3, sqlite3 >= $sqlite_version, HAVE_SQLITE3=true, HAVE_SQLITE3=false)
487     AC_SUBST(SQLITE3_LIBS)
488     AC_SUBST(SQLITE3_CFLAGS)
489     if test $HAVE_SQLITE3 = false; then
490     HAVE_SQLITE3=0
491     config_instruments_db="no"
492     echo "*** Required sqlite version not found!"
493     echo "*** You need to have sqlite version ${sqlite_version} or higher"
494     echo "*** for instruments database support to be enabled."
495     echo "*** Support for instruments DB will be disabled!"
496     else
497     HAVE_SQLITE3=1
498     fi
499 senkov 397 else
500 schoenebeck 1364 echo "Instruments DB feature disabled by configure script parameter"
501 senkov 397 fi
502     AM_CONDITIONAL(HAVE_SQLITE3, test $HAVE_SQLITE3 = 1)
503 schoenebeck 1364 AC_DEFINE_UNQUOTED(HAVE_SQLITE3,$HAVE_SQLITE3,[Define to 1 if you want the instruments DB feature and have SQLITE3 installed.])
504 schoenebeck 31
505 schoenebeck 288
506    
507 schoenebeck 554 ###########################################################################
508     # Handle Configuration Options
509    
510     # TODO: should we use AC_ARG_VAR(variable, description) instead?
511    
512 schoenebeck 617 AC_ARG_ENABLE(asm,
513 schoenebeck 1259 [ --disable-asm
514 schoenebeck 738 Enable hand-crafted assembly optimizations
515 schoenebeck 1259 (default=on). LinuxSampler provides CPU specific
516     assembly optimizations. This is currently limited
517     to just enter a fast (denormal) FPU mode on x86
518     platforms. There are currently no synthesis core
519     assembly optimizations anymore since LS 0.4.0],
520 schoenebeck 1360 [config_asm="$enableval"],
521 schoenebeck 1259 [config_asm="yes"]
522 schoenebeck 617 )
523     if test "$config_asm" = "yes"; then
524 schoenebeck 1259 AC_DEFINE_UNQUOTED(CONFIG_ASM, 1, [Define to 1 if you want to enable asm optimizations.])
525 schoenebeck 617 fi
526    
527 schoenebeck 554 AC_ARG_ENABLE(dev-mode,
528 schoenebeck 1424 [ --enable-dev-mode
529     Enable development mode (default=off). In that mode
530 schoenebeck 554 we do some extra sanity checks here and there.
531     This helps to spot possible problems, but reduces
532     efficiency a bit],
533 schoenebeck 1360 [config_dev_mode="$enableval"],
534 schoenebeck 1424 [config_dev_mode="no"]
535 schoenebeck 554 )
536     if test "$config_dev_mode" = "yes"; then
537     AC_DEFINE_UNQUOTED(CONFIG_DEVMODE, 1, [Define to 1 if you want to enable development mode.])
538     fi
539    
540     AC_ARG_ENABLE(debug-level,
541     [ --enable-debug-level
542     Specify verbosity of console messages (default=1).
543     The higher the value, the higher will be verbosity.
544     A value of 0 means no console output at all.
545     There's not really an upper limit but the usual
546     level of all messages is currently somewhere less
547     than 10.],
548     [config_debug_level="${enableval}"],
549     [config_debug_level="1"]
550     )
551     AC_DEFINE_UNQUOTED(CONFIG_DEBUG_LEVEL, $config_debug_level, [Define console verbosity.])
552    
553     AC_ARG_ENABLE(rt-exceptions,
554     [ --enable-rt-exceptions
555     Enable exceptions in the realtime thread
556     (default=no). If this is enabled, exceptions will
557     be thrown on critical errors in the realtime
558     context as well. Otherwise if disabled
559     segmentation faults will be forced by the
560     application on critical errors.],
561 schoenebeck 1360 [config_rt_exceptions="$enableval"],
562 schoenebeck 554 [config_rt_exceptions="no"]
563     )
564     if test "$config_rt_exceptions" = "yes"; then
565     AC_DEFINE_UNQUOTED(CONFIG_RT_EXCEPTIONS, 1, [Define to 1 to allow exceptions in the realtime context.])
566     fi
567    
568 nagata 1649 AC_ARG_ENABLE(pthread-testcancel,
569     [ --enable-pthread-testcancel
570 schoenebeck 1742 Enable pthread_testcancel() calls and avoid asynchronous
571 nagata 1649 cancel of pthreads (default=no).],
572     [config_pthread_testcancel="$enableval"],
573     [config_pthread_testcancel="no"]
574     )
575     if test "$config_pthread_testcancel" = "yes"; then
576     AC_DEFINE_UNQUOTED(CONFIG_PTHREAD_TESTCANCEL, 1, [Define to 1 to enable pthread_testcancel() calls.])
577     fi
578    
579 schoenebeck 554 AC_ARG_ENABLE(preload-samples,
580     [ --enable-preload-samples
581     Due to seeking and latency issues with hard drives
582     we have to cache a small part of samples' head in
583     RAM (default=32768). The higher this value the
584     more memory will be occupied for each sample, but
585     the safer this will be in regards of possible
586     droputs. A 'good' value depends on the running
587     system and usage dependant factors.],
588     [config_preload_samples="${enableval}"],
589     [config_preload_samples="32768"]
590     )
591     AC_DEFINE_UNQUOTED(CONFIG_PRELOAD_SAMPLES, $config_preload_samples, [Define amount of sample points to be cached in RAM.])
592    
593     AC_ARG_ENABLE(max-pitch,
594     [ --enable-max-pitch
595     Specify the maximum allowed pitch value in octaves
596     (default=4). To lower memory usage you might want
597     set a smaller value.],
598     [config_max_pitch="${enableval}"],
599     [config_max_pitch="4"]
600     )
601     AC_DEFINE_UNQUOTED(CONFIG_MAX_PITCH, $config_max_pitch, [Define max. allowed pitch.])
602    
603     AC_ARG_ENABLE(max-events,
604     [ --enable-max-events
605     Specify the maximum allowed amount of events to be
606     processed per fragment (default=1024).],
607     [config_max_events="${enableval}"],
608     [config_max_events="1024"]
609     )
610     AC_DEFINE_UNQUOTED(CONFIG_MAX_EVENTS_PER_FRAGMENT, $config_max_events, [Define max. allowed events per fragment.])
611    
612     AC_ARG_ENABLE(eg-bottom,
613     [ --enable-eg-bottom
614     Bottom limit of envelope generators
615     (default=0.001). Certain kinds of curve types like
616     exponential curves converge against 0 but never
617     reach 0. So we have to define a certain low value
618     after which we should consider all smaller values
619     to be 'almost zero'. The smaller this value, the
620     longer will voices survive in EG's release stage
621     and thus waste voices. If this value is too high
622     will cause click sounds though.],
623     [config_eg_bottom="${enableval}"],
624     [config_eg_bottom="0.001"]
625     )
626     AC_DEFINE_UNQUOTED(CONFIG_EG_BOTTOM, $config_eg_bottom, [Define bottom limit of envelopes.])
627    
628     AC_ARG_ENABLE(eg-min-release-time,
629     [ --enable-eg-min-release-time
630     Specify the lowest allowed release time in seconds
631     (default=0.0025). This value will also be used to
632     ramp down voices on voice stealing. This value
633     should always be less than the period time of the
634     used audio driver, as in case of voice stealing
635     the killed voice needs to be completely ramped
636     down in the same fragment.],
637     [config_eg_min_release_time="${enableval}"],
638     [config_eg_min_release_time="0.0025"]
639     )
640     AC_DEFINE_UNQUOTED(CONFIG_EG_MIN_RELEASE_TIME, $config_eg_min_release_time, [Define min. release time.])
641    
642     AC_ARG_ENABLE(refill-streams,
643     [ --enable-refill-streams
644     Number of streams that should be refilled in each
645     disk thread cycle (default=4).],
646     [config_refill_streams="${enableval}"],
647     [config_refill_streams="4"]
648     )
649     AC_DEFINE_UNQUOTED(CONFIG_REFILL_STREAMS_PER_RUN, $config_refill_streams, [Define amount of streams to be refilled per cycle.])
650    
651     AC_ARG_ENABLE(stream-min-refill,
652     [ --enable-stream-min-refill
653     Minimum refill size for disk streams (default=1024).
654     The disk thread will go to sleep for a while if no
655     stream had to be refilled more than this value in
656     a disk thread cycle.],
657     [config_stream_min_refill="${enableval}"],
658     [config_stream_min_refill="1024"]
659     )
660     AC_DEFINE_UNQUOTED(CONFIG_STREAM_MIN_REFILL_SIZE, $config_stream_min_refill, [Define min. stream refill size.])
661    
662     AC_ARG_ENABLE(stream-max-refill,
663     [ --enable-stream-max-refill
664     Maximum refill size for disk streams
665     (default=65536). The disk thread will refill
666     each stream only by a size of this value per
667     disk thread cycle.],
668     [config_stream_max_refill="${enableval}"],
669     [config_stream_max_refill="65536"]
670     )
671     AC_DEFINE_UNQUOTED(CONFIG_STREAM_MAX_REFILL_SIZE, $config_stream_max_refill, [Define max. stream refill size.])
672    
673     AC_ARG_ENABLE(stream-size,
674     [ --enable-stream-size
675     Size of each stream's ring buffer in sample points
676     (default=262144).],
677     [config_stream_size="${enableval}"],
678     [config_stream_size="262144"]
679     )
680     AC_DEFINE_UNQUOTED(CONFIG_STREAM_BUFFER_SIZE, $config_stream_size, [Define each stream's ring buffer size.])
681    
682     AC_ARG_ENABLE(max-streams,
683     [ --enable-max-streams
684     Maximum amount of disk streams (default=90). This
685     value should always be higher than the maximum
686     amount of voices.],
687     [config_max_streams="${enableval}"],
688     [config_max_streams="90"]
689     )
690     AC_DEFINE_UNQUOTED(CONFIG_MAX_STREAMS, $config_max_streams, [Define max. streams.])
691    
692     AC_ARG_ENABLE(max-voices,
693     [ --enable-max-voices
694     Maximum amount of voices (default=64). This value
695     should always be lower than the maximum amount of
696     disk streams.],
697     [config_max_voices="${enableval}"],
698     [config_max_voices="64"]
699     )
700     AC_DEFINE_UNQUOTED(CONFIG_MAX_VOICES, $config_max_voices, [Define max. voices.])
701    
702 schoenebeck 738 AC_ARG_ENABLE(subfragment-size,
703     [ --enable-subfragment-size
704     Every audio fragment will be splitted into
705     subfragments. Where each subfragment renders
706     audio with constant synthesis parameters. This is
707     done for efficiency reasons. This parameter
708     defines the default size of a subfragment in
709     sample points. A large value means less CPU time
710     whereas a low value means better audio quality
711     (default=32).],
712     [config_subfragment_size="${enableval}"],
713     [config_subfragment_size="32"]
714     )
715     AC_DEFINE_UNQUOTED(CONFIG_DEFAULT_SUBFRAGMENT_SIZE, $config_subfragment_size, [Define default subfragment size (in sample points).])
716    
717 schoenebeck 1005 AC_ARG_ENABLE(global-attenuation-default,
718     [ --enable-global-attenuation-default
719 schoenebeck 781 To prevent clipping all samples will be lowered
720 schoenebeck 1005 in amplitude by this given default factor (can
721     be overridden at runtime).
722 schoenebeck 781 (default=0.35)],
723 schoenebeck 1005 [config_global_attenuation_default="${enableval}"],
724     [config_global_attenuation_default="0.35"]
725 schoenebeck 781 )
726 schoenebeck 1005 AC_DEFINE_UNQUOTED(CONFIG_GLOBAL_ATTENUATION_DEFAULT, $config_global_attenuation_default, [Define default global volume attenuation (as floating point factor).])
727 schoenebeck 781
728 schoenebeck 554 AC_ARG_ENABLE(voice-steal-algo,
729     [ --enable-voice-steal-algo
730     Voice stealing algorithm to be used. Currently
731     available options:
732     none:
733     Disable voice stealing completely.
734 schoenebeck 563 oldestvoiceonkey (default):
735 schoenebeck 554 Try to kill a voice on the same key first,
736     if no success, proceed with the oldest key.
737 schoenebeck 563 oldestkey:
738 schoenebeck 554 Try to kill a voice from the oldest active
739     key.],
740     [ if test ! "(" "${enableval}" = "none" \
741     -o "${enableval}" = "oldestvoiceonkey" \
742     -o "${enableval}" = "oldestkey" ")" ; then
743     AC_MSG_ERROR([Unknown voice stealing algorithm for parameter --enable-voice-steal-algo])
744     else
745     config_voice_steal_algo="${enableval}"
746 schoenebeck 579 fi
747 schoenebeck 554 ],
748 schoenebeck 563 [config_voice_steal_algo="oldestvoiceonkey"]
749 schoenebeck 554 )
750     AC_DEFINE_UNQUOTED(CONFIG_VOICE_STEAL_ALGO, voice_steal_algo_${config_voice_steal_algo}, [Define voice stealing algorithm to be used.])
751    
752     AC_ARG_ENABLE(sysex-buffer-size,
753     [ --enable-sysex-buffer-size
754     System Exclusive Message buffer size in kB
755     (default=2048).],
756     [config_sysex_buffer_size="${enableval}"],
757     [config_sysex_buffer_size="2048"]
758     )
759     AC_DEFINE_UNQUOTED(CONFIG_SYSEX_BUFFER_SIZE, $config_sysex_buffer_size, [Define SysEx buffer size.])
760    
761     AC_ARG_ENABLE(force-filter,
762     [ --enable-force-filter
763     If enabled will force filter to be used even if
764     no usage was define in instrument patch files.
765     (default=no).],
766 schoenebeck 1360 [config_force_filter="$enableval"],
767 schoenebeck 554 [config_force_filter="no"]
768     )
769     if test "$config_force_filter" = "yes"; then
770     AC_DEFINE_UNQUOTED(CONFIG_FORCE_FILTER, 1, [Define to 1 to force filter usage.])
771     fi
772    
773     AC_ARG_ENABLE(filter-cutoff-min,
774     [ --enable-filter-cutoff-min
775     Minimum filter cutoff frequency in Hz
776     (default=100.0).],
777     [config_filter_cutoff_min="${enableval}"],
778     [config_filter_cutoff_min="100.0"]
779     )
780     AC_DEFINE_UNQUOTED(CONFIG_FILTER_CUTOFF_MIN, ${config_filter_cutoff_min}f, [Define min. filter cutoff frequency.])
781    
782     AC_ARG_ENABLE(filter-cutoff-max,
783     [ --enable-filter-cutoff-max
784     Maximum filter cutoff frequency in Hz
785     (default=10000.0).],
786     [config_filter_cutoff_max="${enableval}"],
787     [config_filter_cutoff_max="10000.0"]
788     )
789     AC_DEFINE_UNQUOTED(CONFIG_FILTER_CUTOFF_MAX, ${config_filter_cutoff_max}f, [Define max. filter cutoff frequency.])
790    
791     AC_ARG_ENABLE(override-cutoff-ctrl,
792     [ --enable-override-cutoff-ctrl
793     Override filter cutoff MIDI controller (default=no).
794     Note: you have to define the MIDI controller number
795     here, it's not a boolean parameter type! If this
796     option is used, controller number given by
797     instrument patch will be ignored and instead this
798     supplied value will be used.],
799     [config_override_cutoff_ctrl="${enableval}"],
800     [config_override_cutoff_ctrl="no"]
801     )
802     if test ! "$config_override_cutoff_ctrl" = "no"; then
803     AC_DEFINE_UNQUOTED(CONFIG_OVERRIDE_CUTOFF_CTRL, $config_override_cutoff_ctrl, [Define to a MIDI controller number to override cutoff control.])
804     fi
805    
806     AC_ARG_ENABLE(override-resonance-ctrl,
807     [ --enable-override-resonance-ctrl
808     Override filter resonance MIDI controller
809     (default=no). Note: you have to define the MIDI
810     controller number here, it's not a boolean
811     parameter type! If this option is used, controller
812     number given by instrument patch will be ignored
813     and instead this supplied value will be used.],
814     [config_override_resonance_ctrl="${enableval}"],
815     [config_override_resonance_ctrl="no"]
816     )
817     if test ! "$config_override_resonance_ctrl" = "no"; then
818     AC_DEFINE_UNQUOTED(CONFIG_OVERRIDE_RESONANCE_CTRL, $config_override_resonance_ctrl, [Define to a MIDI controller number to override resonance control.])
819     fi
820    
821     AC_ARG_ENABLE(override-filter-type,
822     [ --enable-override-filter-type
823     Override filter type (default=no). Options:
824     hp: for highpass
825     bp: for bandpass
826     br: for bandreject
827     lp: for lowpass
828     lpt: for lowpass turbo],
829     [ if test "${enableval}" = "hp" ; then
830     config_override_filter_type="::gig::vcf_type_highpass"
831     elif test "${enableval}" = "bp" ; then
832     config_override_filter_type="::gig::vcf_type_bandpass"
833     elif test "${enableval}" = "br" ; then
834     config_override_filter_type="::gig::vcf_type_bandreject"
835     elif test "${enableval}" = "lp" ; then
836     config_override_filter_type="::gig::vcf_type_lowpass"
837     elif test "${enableval}" = "lpt" ; then
838     config_override_filter_type="::gig::vcf_type_lowpassturbo"
839     elif test ! "${enableval}" = "no"; then
840     AC_MSG_ERROR([Unknown filter type for parameter --enable-override-filter-type])
841 schoenebeck 579 fi
842 schoenebeck 554 ],
843     [config_override_filter_type="no"]
844     )
845     if test ! "$config_override_filter_type" = "no"; then
846     AC_DEFINE_UNQUOTED(CONFIG_OVERRIDE_FILTER_TYPE, $config_override_filter_type, [Define to a filter type to always force that filter type.])
847     fi
848    
849 schoenebeck 563 AC_ARG_ENABLE(gs-checksum,
850     [ --enable-gs-checksum
851     Enable Roland General Synth SysEx checksum check
852     (default=no). If this is enabled, all GS SysEx
853     messages which do not provide a correct checksum
854     will be ignored. This is disabled by default as
855     not all devices honor GS checksums.],
856 schoenebeck 1360 [config_assert_gs_sysex_checksum="$enableval"],
857 schoenebeck 563 [config_assert_gs_sysex_checksum="no"]
858     )
859     if test "config_assert_gs_sysex_checksum" = "yes"; then
860     AC_DEFINE_UNQUOTED(CONFIG_ASSERT_GS_SYSEX_CHECKSUM, 1, [Define to 1 if you want to enable GS SysEx check.])
861     fi
862    
863 schoenebeck 829 AC_ARG_ENABLE(portamento-time-min,
864     [ --enable-portamento-time-min
865     Minimum Portamento time in seconds
866     (default=0.1).],
867     [config_portamento_time_min="${enableval}"],
868     [config_portamento_time_min="0.1"]
869     )
870     AC_DEFINE_UNQUOTED(CONFIG_PORTAMENTO_TIME_MIN, $config_portamento_time_min, [Define min. portamento time.])
871    
872     AC_ARG_ENABLE(portamento-time-max,
873     [ --enable-portamento-time-max
874     Maximum Portamento time in seconds
875     (default=32).],
876     [config_portamento_time_max="${enableval}"],
877     [config_portamento_time_max="32"]
878     )
879     AC_DEFINE_UNQUOTED(CONFIG_PORTAMENTO_TIME_MAX, $config_portamento_time_max, [Define max. portamento time.])
880    
881     AC_ARG_ENABLE(portamento-time-default,
882     [ --enable-portamento-time-default
883     Default Portamento time in seconds
884     (default=1).],
885     [config_portamento_time_default="${enableval}"],
886     [config_portamento_time_default="1"]
887     )
888     AC_DEFINE_UNQUOTED(CONFIG_PORTAMENTO_TIME_DEFAULT, $config_portamento_time_default, [Define default portamento time.])
889    
890 schoenebeck 714 AC_ARG_ENABLE(signed-triang-algo,
891     [ --enable-signed-triang-algo
892     Signed triangular wave algorithm to be used (e.g. for LFOs).
893     Currently available options:
894     intmath:
895     Uses integer math without any branch will then be
896     converted to floating point value for each sample point.
897     This int->float conversion might hurt on some systems.
898 senkov 720 intmathabs:
899     Similar to intmath but uses abs() function.
900     Depending on compiler and platrofm this could
901     perform better than integer math as it avoids
902 schoenebeck 1360 an extra integer multiply instruction.
903 schoenebeck 714 diharmonic:
904     The triangular wave will be approximated by adding two
905     sinusoidials. This solution might especially hurt on
906     systems with weak floating point unit.
907     benchmark (default):
908     This is not an algorithm. Use this option if the
909     appropriate algorithm should be automatically
910     chosen by the configure script by performing a
911     benchmark between the algorithms mentioned above.
912     This will NOT work for cross compilation!],
913     [ if test ! "(" "${enableval}" = "intmath" \
914 senkov 720 -o "${enableval}" = "intmathabs" \
915 schoenebeck 714 -o "${enableval}" = "diharmonic" ")" ; then
916     AC_MSG_ERROR([Unknown triangular wave algorithm for parameter --enable-signed-triang-algo])
917     else
918     config_signed_triang_algo="${enableval}"
919     fi
920     ],
921     [config_signed_triang_algo="benchmark"]
922     )
923 schoenebeck 563
924 schoenebeck 714 AC_ARG_ENABLE(unsigned-triang-algo,
925     [ --enable-unsigned-triang-algo
926     Unsigned triangular wave algorithm to be used (e.g. for LFOs).
927     Currently available options:
928     intmath:
929     Uses integer math without any branch will then be
930     converted to floating point value for each sample point.
931     This int->float conversion might hurt on some systems.
932 senkov 720 intmathabs:
933     Similar to intmath but uses abs() function.
934     Depending on compiler and platrofm this could
935     perform better than integer math as it avoids
936 schoenebeck 1360 an extra integer multiply instruction.
937 schoenebeck 714 diharmonic:
938     The triangular wave will be approximated by adding two
939     sinusoidials. This solution might especially hurt on
940     systems with weak floating point unit.
941     benchmark (default):
942     This is not an algorithm. Use this option if the
943     appropriate algorithm should be automatically
944     chosen by the configure script by performing a
945     benchmark between the algorithms mentioned above.
946     This will NOT work for cross compilation!],
947     [ if test ! "(" "${enableval}" = "intmath" \
948 senkov 720 -o "${enableval}" = "intmathabs" \
949 schoenebeck 714 -o "${enableval}" = "diharmonic" ")" ; then
950     AC_MSG_ERROR([Unknown triangular wave algorithm for parameter --enable-unsigned-triang-algo])
951     else
952     config_unsigned_triang_algo="${enableval}"
953     fi
954     ],
955     [config_unsigned_triang_algo="benchmark"]
956     )
957    
958 iliev 716 AC_ARG_ENABLE(process-muted-channels,
959     [ --enable-process-muted-channels
960     Enable processing of muted channels (default=no).
961     In that mode all MIDI events in the muted channels
962     will be processed. This will provide information
963     about the active voices in the muted channels and
964     will not discard notes, triggered in mute mode,
965     when the channel is unmuted. But also will reduce
966     the efficiency.],
967 schoenebeck 1360 [config_process_muted_channels="$enableval"],
968 iliev 716 [config_process_muted_channels="no"]
969     )
970     if test "$config_process_muted_channels" = "yes"; then
971     AC_DEFINE_UNQUOTED(CONFIG_PROCESS_MUTED_CHANNELS, 1, [Define to 1 if you want to enable processing of muted channels.])
972     fi
973 schoenebeck 714
974 schoenebeck 849 AC_ARG_ENABLE(process-all-notes-off,
975     [ --disable-process-all-notes-off
976     Disable interpretation of All-Notes-Off MIDI
977     messages (default=on). By default LS will release
978     all voices whenever it receives an All-Notes-Off
979     MIDI message. You can disable this behavior, so
980     that LS simply ignores such messages.],
981 schoenebeck 1360 [config_process_all_notes_off="$enableval"],
982 schoenebeck 849 [config_process_all_notes_off="yes"]
983     )
984     if test "$config_process_all_notes_off" = "yes"; then
985     AC_DEFINE_UNQUOTED(CONFIG_PROCESS_ALL_NOTES_OFF, 1, [Define to 1 if you want to enable processing of All-Notes-Off MIDI messages.])
986     fi
987    
988 persson 830 AC_ARG_ENABLE(interpolate-volume,
989     [ --disable-interpolate-volume
990     Disable interpolation of volume modulation
991     (default=on). With this enabled, the volume changes
992     generated by for example the envelope generator
993     will be smoother, minimizing the risk for audio
994     clicks. Disable it to reduce CPU usage.],
995 schoenebeck 1360 [config_interpolate_volume="$enableval"],
996 persson 830 [config_interpolate_volume="yes"]
997     )
998     if test "$config_interpolate_volume" = "yes"; then
999     AC_DEFINE_UNQUOTED(CONFIG_INTERPOLATE_VOLUME, 1, [Define to 1 if you want to enable interpolation of volume modulation.])
1000     fi
1001 iliev 716
1002 schoenebeck 1762 AC_ARG_ENABLE(master-volume-sysex-by-port,
1003     [ --enable-master-volume-sysex-by-port
1004     Whether global volume sysex message should be
1005     applied globally to the whole sampler or only to
1006     the sampler channels connected to the same MIDI
1007     input port on which the sysex message arrived on.
1008     By default global volume sysex messages apply
1009     globally to the whole sampler, since many MIDI
1010     devices behave that way.],
1011     [config_master_volume_sysex_by_port="$enableval"],
1012     [config_master_volume_sysex_by_port="no"]
1013     )
1014     if test "$config_master_volume_sysex_by_port" = "yes"; then
1015     AC_DEFINE_UNQUOTED(CONFIG_MASTER_VOLUME_SYSEX_BY_PORT, 1, [Define to 1 if you want global volume sysex message only be applied to the respective MIDI port.])
1016     fi
1017    
1018 schoenebeck 1212 AC_ARG_ENABLE(plugin-dir,
1019     [ --enable-plugin-dir
1020     Directory where the sampler shall look for potential plugins,
1021     that is 3rd party shared libraries that should be loaded by
1022     the sampler on startup. By default the sampler will search
1023     for plugins in the subdirectory "plugins" below its own
1024     library directory.
1025     (i.e. /usr/local/lib/linuxsampler/plugins)],
1026     [config_plugin_dir="${enableval}"],
1027     [config_plugin_dir="${libdir}/linuxsampler/plugins"]
1028     )
1029     AC_SUBST(config_plugin_dir)
1030 persson 830
1031 schoenebeck 1364 AC_ARG_ENABLE(default-instruments-db-location,
1032     [ --enable-default-instruments-db-location
1033     Only when instruments DB feature is enabled: file name
1034     which shall be taken as default location of the
1035     instruments DB file. This location can still be
1036     overridden at runtime with a command line switch.
1037     (default: /var/lib/linuxsampler/instruments.db)],
1038     [config_default_instruments_db_file="${enableval}"],
1039     [config_default_instruments_db_file="/var/lib/linuxsampler/instruments.db"]
1040     )
1041     AC_DEFINE_UNQUOTED(
1042     CONFIG_DEFAULT_INSTRUMENTS_DB_LOCATION,
1043     "$config_default_instruments_db_file",
1044     [Only when instruments DB feature is enabled: default location of the DB file.]
1045     )
1046 schoenebeck 1432 AC_SUBST(config_default_instruments_db_file)
1047 schoenebeck 1212
1048 schoenebeck 1364
1049 schoenebeck 554 ###########################################################################
1050 schoenebeck 714 # Automatic Benchmarks (to detect the best algorithms for the system)
1051    
1052     AC_LANG_SAVE
1053    
1054     if test "$config_signed_triang_algo" = "benchmark"; then
1055     echo -n "benchmarking for the best (signed) triangular oscillator algorithm... "
1056     AC_LANG_CPLUSPLUS
1057     AC_TRY_RUN([
1058     #define SIGNED 1
1059     #define SILENT 1
1060 schoenebeck 738 #include "${srcdir}/benchmarks/triang.cpp"
1061 schoenebeck 714 ],
1062     triang_signed=0,
1063     triang_signed=$?,
1064     triang_signed=0
1065     )
1066     if test "$triang_signed" = "2"; then
1067     config_signed_triang_algo="intmath"
1068     echo "integer math"
1069     elif test "$triang_signed" = "3"; then
1070     config_signed_triang_algo="diharmonic"
1071     echo "di harmonics"
1072 senkov 720 elif test "$triang_signed" = "5"; then
1073     config_signed_triang_algo="intmathabs"
1074     echo "integer math using abs()"
1075 schoenebeck 714 else
1076     echo "Benchmark of signed triangular wave algorithms failed!"
1077     echo "Maybe you are doing cross compilation? In that case you have to select"
1078     echo "an algorithm manually with './configure --enable-signed-triang-algo=...'"
1079     echo "Call './configure --help' for further information or read configure.in."
1080     exit -1;
1081     fi
1082 schoenebeck 1165 else
1083     case "$config_signed_triang_algo" in
1084     intmath)
1085     triang_signed=2 ;;
1086     diharmonic)
1087     triang_signed=3 ;;
1088     intmathabs)
1089     triang_signed=5 ;;
1090     esac
1091 schoenebeck 714 fi
1092 schoenebeck 738 AC_DEFINE_UNQUOTED(CONFIG_SIGNED_TRIANG_ALGO, ${triang_signed}, [Define signed triangular wave algorithm to be used.])
1093 schoenebeck 714
1094     if test "$config_unsigned_triang_algo" = "benchmark"; then
1095     echo -n "benchmarking for the best (unsigned) triangular oscillator algorithm... "
1096     AC_LANG_CPLUSPLUS
1097     AC_TRY_RUN([
1098     #define SIGNED 0
1099     #define SILENT 1
1100 schoenebeck 738 #include "${srcdir}/benchmarks/triang.cpp"
1101 schoenebeck 714 ],
1102     triang_unsigned=0,
1103     triang_unsigned=$?,
1104     triang_unsigned=0
1105     )
1106     if test "$triang_unsigned" = "2"; then
1107     config_unsigned_triang_algo="intmath"
1108     echo "integer math"
1109     elif test "$triang_unsigned" = "3"; then
1110     config_unsigned_triang_algo="diharmonic"
1111     echo "di harmonics"
1112 senkov 720 elif test "$triang_unsigned" = "5"; then
1113 schoenebeck 726 config_unsigned_triang_algo="intmathabs"
1114 senkov 720 echo "integer math using abs()"
1115 schoenebeck 714 else
1116     echo "Benchmark of unsigned triangular wave algorithms failed!"
1117     echo "Maybe you are doing cross compilation? In that case you have to select"
1118     echo "an algorithm manually with './configure --enable-unsigned-triang-algo=...'"
1119     echo "Call './configure --help' for further information or read configure.in."
1120     exit -1;
1121     fi
1122 schoenebeck 1165 else
1123     case "$config_unsigned_triang_algo" in
1124     intmath)
1125     triang_unsigned=2 ;;
1126     diharmonic)
1127     triang_unsigned=3 ;;
1128     intmathabs)
1129     triang_unsigned=5 ;;
1130     esac
1131 schoenebeck 714 fi
1132 schoenebeck 738 AC_DEFINE_UNQUOTED(CONFIG_UNSIGNED_TRIANG_ALGO, ${triang_unsigned}, [Define unsigned triangular wave algorithm to be used.])
1133 schoenebeck 714
1134     AC_LANG_RESTORE
1135    
1136    
1137     ###########################################################################
1138 schoenebeck 554 # Create Build Files
1139    
1140 schoenebeck 9 AM_CONFIG_HEADER(config.h)
1141 schoenebeck 697 AM_INIT_AUTOMAKE(linuxsampler, "$LINUXSAMPLER_RELEASE_MAJOR.$LINUXSAMPLER_RELEASE_MINOR.$LINUXSAMPLER_RELEASE_BUILD")
1142 schoenebeck 9
1143     AC_LANG_CPLUSPLUS
1144 persson 497
1145 persson 685 # some gcc 4.0 versions need -msse for SSE register allocations
1146     if test "$config_asm" = "yes"; then
1147     if test "$def_arch_x86" = 1; then
1148     CXXFLAGS="$CXXFLAGS -msse"
1149     fi
1150     fi
1151    
1152 persson 497 # autoconf 2.59/libtool 1.5.12 bug? work-around. Without a check like
1153     # this, the dlfcn.h check in am_prog_libtool may fail.
1154     AC_CHECK_HEADER(stdlib.h)
1155    
1156 schoenebeck 654 AC_OUTPUT( \
1157     Makefile \
1158     man/Makefile \
1159     man/linuxsampler.1 \
1160     src/Makefile \
1161 iliev 1161 src/db/Makefile \
1162 schoenebeck 654 src/network/Makefile \
1163     src/engines/Makefile \
1164     src/engines/gig/Makefile \
1165     src/engines/common/Makefile \
1166 schoenebeck 1722 src/effects/Makefile \
1167 schoenebeck 1321 src/common/Makefile \
1168 schoenebeck 654 src/testcases/Makefile \
1169     src/drivers/Makefile \
1170     src/drivers/audio/Makefile \
1171     src/drivers/midi/Makefile \
1172 schoenebeck 1375 src/plugins/Makefile \
1173 schoenebeck 654 linuxsampler.spec \
1174     debian/Makefile \
1175     Artwork/Makefile \
1176     scripts/Makefile \
1177     osx/Makefile \
1178 schoenebeck 1175 osx/linuxsampler.xcodeproj/Makefile \
1179 schoenebeck 654 Documentation/Makefile \
1180     Documentation/Engines/Makefile \
1181     Documentation/Engines/gig/Makefile \
1182 schoenebeck 697 linuxsampler.pc \
1183     Doxyfile \
1184 schoenebeck 654 )
1185 schoenebeck 554
1186 schoenebeck 1212 # resolve all nested variables in '${config_plugin_dir}'
1187     # (merely for providing a human readable summary below)
1188     while test $config_plugin_dir != `eval echo ${config_plugin_dir}` ; do
1189     config_plugin_dir=`eval echo ${config_plugin_dir}`
1190     done
1191 schoenebeck 554
1192 schoenebeck 1212
1193 schoenebeck 554 ###########################################################################
1194     # Output All Configuration Options
1195    
1196     echo ""
1197     echo "#####################################################################"
1198     echo "# LinuxSampler Configuration #"
1199     echo "#-------------------------------------------------------------------#"
1200 schoenebeck 617 echo "# Assembly Optimizations: ${config_asm}"
1201 schoenebeck 554 echo "# Development Mode: ${config_dev_mode}"
1202     echo "# Debug Level: ${config_debug_level}"
1203     echo "# Use Exceptions in RT Context: ${config_rt_exceptions}"
1204     echo "# Preload Samples: ${config_preload_samples}"
1205     echo "# Maximum Pitch: ${config_max_pitch} (octaves)"
1206     echo "# Maximum Events: ${config_max_events}"
1207     echo "# Envelope Bottom Level: ${config_eg_bottom} (linear)"
1208     echo "# Envelope Minimum Release Time: ${config_eg_min_release_time} s"
1209     echo "# Streams to be refilled per Disk Thread Cycle: ${config_refill_streams}"
1210     echo "# Minimum Stream Refill Size: ${config_stream_min_refill}"
1211     echo "# Maximum Stream Refill Size: ${config_stream_max_refill}"
1212     echo "# Stream Size: ${config_stream_size}"
1213     echo "# Maximum Disk Streams: ${config_max_streams}"
1214     echo "# Maximum Voices: ${config_max_voices}"
1215 schoenebeck 738 echo "# Default Subfragment Size: ${config_subfragment_size}"
1216 schoenebeck 1005 echo "# Default Global Volume Attenuation: ${config_global_attenuation_default}"
1217 schoenebeck 563 echo "# Voice Stealing Algorithm: ${config_voice_steal_algo}"
1218 schoenebeck 714 echo "# Signed Triangular Oscillator Algorithm: ${config_signed_triang_algo}"
1219     echo "# Unsigned Triangular Oscillator Algorithm: ${config_unsigned_triang_algo}"
1220 schoenebeck 554 echo "# SysEx Buffer Size: ${config_sysex_buffer_size} Byte"
1221 schoenebeck 829 echo "# Min. Portamento Time: ${config_portamento_time_min} s"
1222     echo "# Max. Portamento Time: ${config_portamento_time_max} s"
1223     echo "# Default Portamento Time: ${config_portamento_time_default} s"
1224 schoenebeck 554 echo "# Force Filter Usage: ${config_force_filter}"
1225     echo "# Filter Cutoff Minimum: ${config_filter_cutoff_min} Hz"
1226     echo "# Filter Cutoff Maximum: ${config_filter_cutoff_max} Hz"
1227     echo "# Override Filter Cutoff Controller: ${config_override_cutoff_ctrl}"
1228     echo "# Override Filter Resonance Controller: ${config_override_resonance_ctrl}"
1229     echo "# Override Filter Type: ${config_override_filter_type}"
1230 schoenebeck 563 echo "# Assert GS SysEx Checksum: ${config_assert_gs_sysex_checksum}"
1231 iliev 716 echo "# Process Muted Channels: ${config_process_muted_channels}"
1232 schoenebeck 849 echo "# Process All-Notes-Off MIDI message: ${config_process_all_notes_off}"
1233 schoenebeck 1762 echo "# Apply global volume SysEx by MIDI port: ${config_master_volume_sysex_by_port}"
1234 persson 830 echo "# Interpolate Volume: ${config_interpolate_volume}"
1235 schoenebeck 1364 echo "# Instruments database support: ${config_instruments_db}"
1236     if test "$config_instruments_db" = "yes"; then
1237     echo "# Instruments DB default location: ${config_default_instruments_db_file}"
1238     fi
1239 schoenebeck 1212 echo "# Plugin Path: ${config_plugin_dir}"
1240 schoenebeck 554 echo "#-------------------------------------------------------------------#"
1241     echo "# Read './configure --help' or file 'configure.in' for details. #"
1242     echo "#####################################################################"
1243     echo ""
1244     echo "Good. Now type 'make' to compile, followed by 'make install' as root."
1245     echo ""

  ViewVC Help
Powered by ViewVC