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

Contents of /linuxsampler/trunk/configure.ac

Parent Directory Parent Directory | Revision Log Revision Log


Revision 909 - (show annotations) (download)
Sat Aug 5 17:55:49 2006 UTC (17 years, 7 months ago) by schoenebeck
Original Path: linuxsampler/trunk/configure.in
File size: 40667 byte(s)
* little configure.in fix for PPC
  (patch by Ebrahim Mayat)

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

  ViewVC Help
Powered by ViewVC