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

Annotation of /linuxsampler/trunk/configure.ac

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1639 - (hide annotations) (download)
Sat Jan 12 14:13:46 2008 UTC (16 years, 2 months ago) by schoenebeck
Original Path: linuxsampler/trunk/configure.in
File size: 48582 byte(s)
* autoconf bugfix: the PKG_CONFIG variable wasn't initialized properly,
  causing e.g. the libgig test to fail when
  "./configure --disable-jack-driver" was used
  (patch by Alexis Ballier)

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

  ViewVC Help
Powered by ViewVC