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

Annotation of /linuxsampler/trunk/configure.ac

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1876 - (hide annotations) (download)
Fri Mar 27 12:16:12 2009 UTC (9 years, 11 months ago) by schoenebeck
Original Path: linuxsampler/trunk/configure.in
File size: 55205 byte(s)
* added optional 3rd party user data parameter for following
  liblinuxsampler C++ API methods: InstrumentEditor::Main(),
  InstrumentEditor::Launch(), InstrumentManager::LaunchInstrumentEditor()
* minor cosmetics regarding configure script summary
* debian packaging: include DSSI and LV2 plugin binaries of the sampler
  into the liblinuxsampler package
* RPM packaging: include DSSI and LV2 plugin binaries of the sampler
  into the liblinuxsampler package
* bumped version to 0.5.1.12cvs

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

  ViewVC Help
Powered by ViewVC