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

Contents of /linuxsampler/trunk/configure.ac

Parent Directory Parent Directory | Revision Log Revision Log


Revision 840 - (show annotations) (download)
Sun Feb 26 13:00:08 2006 UTC (13 years, 5 months ago) by persson
Original Path: linuxsampler/trunk/configure.in
File size: 37575 byte(s)
* fixed some concurrency problems between the lscp thread and the
  audio/midi threads for these commands: load engine, set channel
  audio output device, set channel midi input device/port/channel and
  remove channel. Thanks to Vincent Bongiorno for bug reports and
  testing.
* removed an autotools warning
* fixed an iterator bug
* minor code clean-ups

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" = "powerpc"; 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 # 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 AC_CHECK_HEADER(alsa/asoundlib.h,
114 AC_CHECK_LIB(asound, main,
115 have_alsa=1
116 ,
117 have_alsa=0
118 )
119 ,
120 have_alsa=0
121 )
122 if test "$have_alsa" = "1"; then
123 have_midi_input_driver="true"
124 have_audio_output_driver="true";
125 fi
126 AM_CONDITIONAL(HAVE_ALSA, test $have_alsa = "1")
127 AC_DEFINE_UNQUOTED(HAVE_ALSA,$have_alsa,[Define to 1 if you have ALSA installed.])
128
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 # JACK
181 PKG_CHECK_MODULES(JACK, jack, HAVE_JACK=true, HAVE_JACK=false)
182 AC_SUBST(JACK_LIBS)
183 AC_SUBST(JACK_CFLAGS)
184 if test $HAVE_JACK = false; then
185 HAVE_JACK=0;
186 else
187 HAVE_JACK=1
188 have_audio_output_driver="true";
189 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 fi
191 AM_CONDITIONAL(HAVE_JACK, test $HAVE_JACK = 1)
192 AC_DEFINE_UNQUOTED(HAVE_JACK,$HAVE_JACK,[Define to 1 if you have JACK installed.])
193
194 # ARTS
195
196 m4_ifdef([m4_include(m4/arts.m4)],,
197 [sinclude([m4/arts.m4])])
198
199 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 # 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 # Check presence of libgig
233 libgig_version="2.0.2"
234 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 else
240 echo "yes, found libgig $libgig_version"
241 fi
242 AC_SUBST(GIG_CFLAGS)
243 AC_SUBST(GIG_LIBS)
244
245 # 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 echo "no, support for instrument DB will be disabled!"
252 else
253 HAVE_SQLITE3=1
254 echo "yes"
255 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
259 if test "$have_midi_input_driver" = "false"; then
260 echo "No supported MIDI input system found!"
261 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 exit -1;
266 fi
267 if test "$have_audio_output_driver" = "false"; then
268 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 ###########################################################################
275 # Handle Configuration Options
276
277 # TODO: should we use AC_ARG_VAR(variable, description) instead?
278
279 AC_ARG_ENABLE(asm,
280 [ --enable-asm
281 Enable hand-crafted assembly optimizations
282 (default=off). LinuxSampler provides CPU specific
283 assembly optimizations for the most important
284 synthesis algorithms. This is currently disabled
285 by default since current asm code is broken.],
286 [config_asm="yes"],
287 [config_asm="no"]
288 )
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 AC_ARG_ENABLE(dev-mode,
294 [ --disable-dev-mode
295 Disable development mode (default=on). In that mode
296 we do some extra sanity checks here and there.
297 This helps to spot possible problems, but reduces
298 efficiency a bit],
299 [config_dev_mode="no"],
300 [config_dev_mode="yes"]
301 )
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 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 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 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 oldestvoiceonkey (default):
489 Try to kill a voice on the same key first,
490 if no success, proceed with the oldest key.
491 oldestkey:
492 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 fi
501 ],
502 [config_voice_steal_algo="oldestvoiceonkey"]
503 )
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 fi
596 ],
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 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 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 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 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 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 -o "${enableval}" = "intmathabs" \
670 -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
679 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 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 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 -o "${enableval}" = "intmathabs" \
705 -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 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
730 AC_ARG_ENABLE(interpolate-volume,
731 [ --disable-interpolate-volume
732 Disable interpolation of volume modulation
733 (default=on). With this enabled, the volume changes
734 generated by for example the envelope generator
735 will be smoother, minimizing the risk for audio
736 clicks. Disable it to reduce CPU usage.],
737 [config_interpolate_volume="no"],
738 [config_interpolate_volume="yes"]
739 )
740 if test "$config_interpolate_volume" = "yes"; then
741 AC_DEFINE_UNQUOTED(CONFIG_INTERPOLATE_VOLUME, 1, [Define to 1 if you want to enable interpolation of volume modulation.])
742 fi
743
744
745 ###########################################################################
746 # Automatic Benchmarks (to detect the best algorithms for the system)
747
748 AC_LANG_SAVE
749
750 if test "$config_signed_triang_algo" = "benchmark"; then
751 echo -n "benchmarking for the best (signed) triangular oscillator algorithm... "
752 AC_LANG_CPLUSPLUS
753 AC_TRY_RUN([
754 #define SIGNED 1
755 #define SILENT 1
756 #include "${srcdir}/benchmarks/triang.cpp"
757 ],
758 triang_signed=0,
759 triang_signed=$?,
760 triang_signed=0
761 )
762 if test "$triang_signed" = "2"; then
763 config_signed_triang_algo="intmath"
764 echo "integer math"
765 elif test "$triang_signed" = "3"; then
766 config_signed_triang_algo="diharmonic"
767 echo "di harmonics"
768 elif test "$triang_signed" = "5"; then
769 config_signed_triang_algo="intmathabs"
770 echo "integer math using abs()"
771 else
772 echo "Benchmark of signed triangular wave algorithms failed!"
773 echo "Maybe you are doing cross compilation? In that case you have to select"
774 echo "an algorithm manually with './configure --enable-signed-triang-algo=...'"
775 echo "Call './configure --help' for further information or read configure.in."
776 exit -1;
777 fi
778 fi
779 AC_DEFINE_UNQUOTED(CONFIG_SIGNED_TRIANG_ALGO, ${triang_signed}, [Define signed triangular wave algorithm to be used.])
780
781 if test "$config_unsigned_triang_algo" = "benchmark"; then
782 echo -n "benchmarking for the best (unsigned) triangular oscillator algorithm... "
783 AC_LANG_CPLUSPLUS
784 AC_TRY_RUN([
785 #define SIGNED 0
786 #define SILENT 1
787 #include "${srcdir}/benchmarks/triang.cpp"
788 ],
789 triang_unsigned=0,
790 triang_unsigned=$?,
791 triang_unsigned=0
792 )
793 if test "$triang_unsigned" = "2"; then
794 config_unsigned_triang_algo="intmath"
795 echo "integer math"
796 elif test "$triang_unsigned" = "3"; then
797 config_unsigned_triang_algo="diharmonic"
798 echo "di harmonics"
799 elif test "$triang_unsigned" = "5"; then
800 config_unsigned_triang_algo="intmathabs"
801 echo "integer math using abs()"
802 else
803 echo "Benchmark of unsigned triangular wave algorithms failed!"
804 echo "Maybe you are doing cross compilation? In that case you have to select"
805 echo "an algorithm manually with './configure --enable-unsigned-triang-algo=...'"
806 echo "Call './configure --help' for further information or read configure.in."
807 exit -1;
808 fi
809 fi
810 AC_DEFINE_UNQUOTED(CONFIG_UNSIGNED_TRIANG_ALGO, ${triang_unsigned}, [Define unsigned triangular wave algorithm to be used.])
811
812 AC_LANG_RESTORE
813
814
815 ###########################################################################
816 # Create Build Files
817
818 AM_CONFIG_HEADER(config.h)
819 AM_INIT_AUTOMAKE(linuxsampler, "$LINUXSAMPLER_RELEASE_MAJOR.$LINUXSAMPLER_RELEASE_MINOR.$LINUXSAMPLER_RELEASE_BUILD")
820
821 AC_LANG_CPLUSPLUS
822 AC_PROG_CXX
823
824 # some gcc 4.0 versions need -msse for SSE register allocations
825 if test "$config_asm" = "yes"; then
826 if test "$def_arch_x86" = 1; then
827 CXXFLAGS="$CXXFLAGS -msse"
828 fi
829 fi
830
831 # autoconf 2.59/libtool 1.5.12 bug? work-around. Without a check like
832 # this, the dlfcn.h check in am_prog_libtool may fail.
833 AC_CHECK_HEADER(stdlib.h)
834
835 AC_OUTPUT( \
836 Makefile \
837 man/Makefile \
838 man/linuxsampler.1 \
839 src/Makefile \
840 src/network/Makefile \
841 src/engines/Makefile \
842 src/engines/gig/Makefile \
843 src/engines/common/Makefile \
844 src/common/Makefile src/lib/Makefile \
845 src/lib/fileloader/Makefile \
846 src/lib/fileloader/libgig/Makefile \
847 src/testcases/Makefile \
848 src/drivers/Makefile \
849 src/drivers/audio/Makefile \
850 src/drivers/midi/Makefile \
851 linuxsampler.spec \
852 debian/Makefile \
853 Artwork/Makefile \
854 scripts/Makefile \
855 osx/Makefile \
856 osx/LinuxSampler.xcode/Makefile \
857 Documentation/Makefile \
858 Documentation/Engines/Makefile \
859 Documentation/Engines/gig/Makefile \
860 linuxsampler.pc \
861 Doxyfile \
862 )
863
864
865 ###########################################################################
866 # Output All Configuration Options
867
868 echo ""
869 echo "#####################################################################"
870 echo "# LinuxSampler Configuration #"
871 echo "#-------------------------------------------------------------------#"
872 echo "# Assembly Optimizations: ${config_asm}"
873 echo "# Development Mode: ${config_dev_mode}"
874 echo "# Debug Level: ${config_debug_level}"
875 echo "# Use Exceptions in RT Context: ${config_rt_exceptions}"
876 echo "# Preload Samples: ${config_preload_samples}"
877 echo "# Maximum Pitch: ${config_max_pitch} (octaves)"
878 echo "# Maximum Events: ${config_max_events}"
879 echo "# Envelope Bottom Level: ${config_eg_bottom} (linear)"
880 echo "# Envelope Minimum Release Time: ${config_eg_min_release_time} s"
881 echo "# Streams to be refilled per Disk Thread Cycle: ${config_refill_streams}"
882 echo "# Minimum Stream Refill Size: ${config_stream_min_refill}"
883 echo "# Maximum Stream Refill Size: ${config_stream_max_refill}"
884 echo "# Stream Size: ${config_stream_size}"
885 echo "# Maximum Disk Streams: ${config_max_streams}"
886 echo "# Maximum Voices: ${config_max_voices}"
887 echo "# Default Subfragment Size: ${config_subfragment_size}"
888 echo "# Global Volume Attenuation: ${config_global_attenuation}"
889 echo "# Voice Stealing Algorithm: ${config_voice_steal_algo}"
890 echo "# Signed Triangular Oscillator Algorithm: ${config_signed_triang_algo}"
891 echo "# Unsigned Triangular Oscillator Algorithm: ${config_unsigned_triang_algo}"
892 echo "# SysEx Buffer Size: ${config_sysex_buffer_size} Byte"
893 echo "# Min. Portamento Time: ${config_portamento_time_min} s"
894 echo "# Max. Portamento Time: ${config_portamento_time_max} s"
895 echo "# Default Portamento Time: ${config_portamento_time_default} s"
896 echo "# Force Filter Usage: ${config_force_filter}"
897 echo "# Filter Cutoff Minimum: ${config_filter_cutoff_min} Hz"
898 echo "# Filter Cutoff Maximum: ${config_filter_cutoff_max} Hz"
899 echo "# Override Filter Cutoff Controller: ${config_override_cutoff_ctrl}"
900 echo "# Override Filter Resonance Controller: ${config_override_resonance_ctrl}"
901 echo "# Override Filter Type: ${config_override_filter_type}"
902 echo "# Assert GS SysEx Checksum: ${config_assert_gs_sysex_checksum}"
903 echo "# Process Muted Channels: ${config_process_muted_channels}"
904 echo "# Interpolate Volume: ${config_interpolate_volume}"
905 echo "#-------------------------------------------------------------------#"
906 echo "# Read './configure --help' or file 'configure.in' for details. #"
907 echo "#####################################################################"
908 echo ""
909 echo "Good. Now type 'make' to compile, followed by 'make install' as root."
910 echo ""

  ViewVC Help
Powered by ViewVC