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

Contents of /linuxsampler/trunk/configure.ac

Parent Directory Parent Directory | Revision Log Revision Log


Revision 838 - (show annotations) (download)
Fri Feb 10 14:57:40 2006 UTC (12 years, 11 months ago) by schoenebeck
Original Path: linuxsampler/trunk/configure.in
File size: 37526 byte(s)
* added aRts audio output driver (by no means RT safe)

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

  ViewVC Help
Powered by ViewVC