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

Annotation of /linuxsampler/trunk/configure.ac

Parent Directory Parent Directory | Revision Log Revision Log


Revision 947 - (hide annotations) (download)
Mon Nov 27 21:34:55 2006 UTC (17 years, 3 months ago) by schoenebeck
Original Path: linuxsampler/trunk/configure.in
File size: 41107 byte(s)
* implemented MIDI instrument mapping according to latest LSCP draft

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

  ViewVC Help
Powered by ViewVC