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

Annotation of /linuxsampler/trunk/configure.ac

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1895 - (hide annotations) (download)
Sun May 3 12:15:40 2009 UTC (9 years, 8 months ago) by persson
Original Path: linuxsampler/trunk/configure.in
File size: 55116 byte(s)
* fixes for using large audio device buffers
* VST: added support for sample rate and buffer size changes
* VST: close editor (Fantasia) when the VST is removed
* minor fix in configure for mmsystem.h detection on MinGW
* removed warnings from gcc 4.4 and valgrind

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

  ViewVC Help
Powered by ViewVC