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

Contents of /linuxsampler/trunk/configure.ac

Parent Directory Parent Directory | Revision Log Revision Log


Revision 826 - (show annotations) (download)
Sun Jan 8 20:19:49 2006 UTC (18 years, 2 months ago) by schoenebeck
Original Path: linuxsampler/trunk/configure.in
File size: 35041 byte(s)
* bugfix in LSCP parser which was confused by space(s) within device
  parameters
  (e.g. "SET AUDIO_OUTPUT_CHANNEL_PARAMETER 0 0 SOMEPARAM='foo bar'")
* changed version to 0.3.3cvs

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

  ViewVC Help
Powered by ViewVC