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

Annotation of /linuxsampler/trunk/configure.ac

Parent Directory Parent Directory | Revision Log Revision Log


Revision 832 - (hide annotations) (download)
Sun Feb 5 10:24:05 2006 UTC (18 years, 1 month ago) by persson
Original Path: linuxsampler/trunk/configure.in
File size: 37243 byte(s)
* added smoothing of volume changes caused by control change messages
* fine tuning of the crossfade volume curve

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

  ViewVC Help
Powered by ViewVC