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

Annotation of /linuxsampler/trunk/configure.ac

Parent Directory Parent Directory | Revision Log Revision Log


Revision 849 - (hide annotations) (download)
Sat Mar 25 13:05:59 2006 UTC (17 years, 11 months ago) by schoenebeck
Original Path: linuxsampler/trunk/configure.in
File size: 38360 byte(s)
* added compile time option to disable processing of All-Notes-Off
  MIDI messages

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

  ViewVC Help
Powered by ViewVC