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

Diff of /linuxsampler/trunk/configure.in

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 553 by schoenebeck, Tue May 10 22:00:49 2005 UTC revision 554 by schoenebeck, Thu May 19 19:25:14 2005 UTC
# Line 9  AC_SUBST(target_os) Line 9  AC_SUBST(target_os)
9  AC_SUBST(target_vendor)  AC_SUBST(target_vendor)
10    
11    
12    ###########################################################################
13    # General Checks
14    
15  AC_MSG_CHECKING([whether x86 architecture])  AC_MSG_CHECKING([whether x86 architecture])
16  def_arch_x86=0  def_arch_x86=0
# Line 21  case $target_cpu in Line 23  case $target_cpu in
23  esac  esac
24  AC_DEFINE_UNQUOTED(ARCH_X86,$def_arch_x86,[Define to 1 if you build for x86 architecture.])  AC_DEFINE_UNQUOTED(ARCH_X86,$def_arch_x86,[Define to 1 if you build for x86 architecture.])
25    
   
26  # determine the right gcc switch for CPU specific optimizations  # determine the right gcc switch for CPU specific optimizations
27  CXX_CPU_SWITCH=  CXX_CPU_SWITCH=
28  if test "$def_arch_x86" = 1; then  if test "$def_arch_x86" = 1; then
# Line 31  elif test "$target_cpu" = "powerpc"; the Line 32  elif test "$target_cpu" = "powerpc"; the
32  fi  fi
33  AC_SUBST([CXX_CPU_SWITCH])  AC_SUBST([CXX_CPU_SWITCH])
34    
   
35  AC_MSG_CHECKING([whether UNIX98 compatible])  AC_MSG_CHECKING([whether UNIX98 compatible])
36  AC_LANG_SAVE  AC_LANG_SAVE
37  AC_LANG_C  AC_LANG_C
# Line 64  if test "$have_unix98" = "no"; then Line 64  if test "$have_unix98" = "no"; then
64      fi      fi
65  fi  fi
66    
   
67  # Checks for available audio and MIDI systems / drivers  # Checks for available audio and MIDI systems / drivers
68  # (we throw an error if there's not at least one system for audio output and MIDI input available)  # (we throw an error if there's not at least one system for audio output and MIDI input available)
69  have_midi_input_driver="false"  have_midi_input_driver="false"
# Line 86  fi Line 85  fi
85  AM_CONDITIONAL(HAVE_ALSA, test $have_alsa = "1")  AM_CONDITIONAL(HAVE_ALSA, test $have_alsa = "1")
86  AC_DEFINE_UNQUOTED(HAVE_ALSA,$have_alsa,[Define to 1 if you have ALSA installed.])  AC_DEFINE_UNQUOTED(HAVE_ALSA,$have_alsa,[Define to 1 if you have ALSA installed.])
87    
   
88  echo -n "checking Alsa version... "  echo -n "checking Alsa version... "
89  AC_LANG_SAVE  AC_LANG_SAVE
90  AC_LANG_C  AC_LANG_C
# Line 138  AC_DEFINE_UNQUOTED(ALSA_MAJOR,$alsa_majo Line 136  AC_DEFINE_UNQUOTED(ALSA_MAJOR,$alsa_majo
136  AC_DEFINE_UNQUOTED(ALSA_MINOR,$alsa_minor,[Define to the minor version number of your Alsa installation.])  AC_DEFINE_UNQUOTED(ALSA_MINOR,$alsa_minor,[Define to the minor version number of your Alsa installation.])
137  AC_DEFINE_UNQUOTED(ALSA_SUBMINOR,$alsa_subminor,[Define to the subminor version number of your Alsa installation.])  AC_DEFINE_UNQUOTED(ALSA_SUBMINOR,$alsa_subminor,[Define to the subminor version number of your Alsa installation.])
138    
   
139  # JACK  # JACK
140  PKG_CHECK_MODULES(JACK, jack, HAVE_JACK=true, HAVE_JACK=false)  PKG_CHECK_MODULES(JACK, jack, HAVE_JACK=true, HAVE_JACK=false)
141  AC_SUBST(JACK_LIBS)  AC_SUBST(JACK_LIBS)
# Line 153  fi Line 150  fi
150  AM_CONDITIONAL(HAVE_JACK, test $HAVE_JACK = 1)  AM_CONDITIONAL(HAVE_JACK, test $HAVE_JACK = 1)
151  AC_DEFINE_UNQUOTED(HAVE_JACK,$HAVE_JACK,[Define to 1 if you have JACK installed.])  AC_DEFINE_UNQUOTED(HAVE_JACK,$HAVE_JACK,[Define to 1 if you have JACK installed.])
152    
   
153  # Check presence of libgig  # Check presence of libgig
154  libgig_version="2.0.0"  libgig_version="2.0.0"
155  PKG_CHECK_MODULES(GIG, gig >= $libgig_version, HAVE_GIG=true, HAVE_GIG=false)  PKG_CHECK_MODULES(GIG, gig >= $libgig_version, HAVE_GIG=true, HAVE_GIG=false)
# Line 165  fi Line 161  fi
161  AC_SUBST(GIG_CFLAGS)  AC_SUBST(GIG_CFLAGS)
162  AC_SUBST(GIG_LIBS)  AC_SUBST(GIG_LIBS)
163    
   
164  # SQLITE3  # SQLITE3
165  PKG_CHECK_MODULES(SQLITE3, sqlite3, HAVE_SQLITE3=true, HAVE_SQLITE3=false)  PKG_CHECK_MODULES(SQLITE3, sqlite3, HAVE_SQLITE3=true, HAVE_SQLITE3=false)
166  AC_SUBST(SQLITE3_LIBS)  AC_SUBST(SQLITE3_LIBS)
# Line 178  fi Line 173  fi
173  AM_CONDITIONAL(HAVE_SQLITE3, test $HAVE_SQLITE3 = 1)  AM_CONDITIONAL(HAVE_SQLITE3, test $HAVE_SQLITE3 = 1)
174  AC_DEFINE_UNQUOTED(HAVE_SQLITE3,$HAVE_SQLITE3,[Define to 1 if you have SQLITE3 installed.])  AC_DEFINE_UNQUOTED(HAVE_SQLITE3,$HAVE_SQLITE3,[Define to 1 if you have SQLITE3 installed.])
175    
   
176  if test "$have_midi_input_driver" = "false"; then  if test "$have_midi_input_driver" = "false"; then
177      echo "No supported MIDI input system found!"      echo "No supported MIDI input system found!"
178      echo "Sorry, LinuxSampler only supports ALSA as MIDI input driver at the moment!"      echo "Sorry, LinuxSampler only supports ALSA as MIDI input driver at the moment!"
# Line 191  if test "$have_audio_output_driver" = "f Line 185  if test "$have_audio_output_driver" = "f
185  fi  fi
186    
187    
188    ###########################################################################
189    # Handle Configuration Options
190    
191    # TODO: should we use AC_ARG_VAR(variable, description) instead?
192    
193    AC_ARG_ENABLE(dev-mode,
194      [  --enable-dev-mode
195                              Enable development mode (default=no). In that mode
196                              we do some extra sanity checks here and there.
197                              This helps to spot possible problems, but reduces
198                              efficiency a bit],
199      [config_dev_mode="yes"],
200      [config_dev_mode="no"]
201    )
202    if test "$config_dev_mode" = "yes"; then
203      AC_DEFINE_UNQUOTED(CONFIG_DEVMODE, 1, [Define to 1 if you want to enable development mode.])
204    fi
205    
206    AC_ARG_ENABLE(debug-level,
207      [  --enable-debug-level
208                              Specify verbosity of console messages (default=1).
209                              The higher the value, the higher will be verbosity.
210                              A value of 0 means no console output at all.
211                              There's not really an upper limit but the usual
212                              level of all messages is currently somewhere less
213                              than 10.],
214      [config_debug_level="${enableval}"],
215      [config_debug_level="1"]
216    )
217    AC_DEFINE_UNQUOTED(CONFIG_DEBUG_LEVEL, $config_debug_level, [Define console verbosity.])
218    
219    AC_ARG_ENABLE(rt-exceptions,
220      [  --enable-rt-exceptions
221                              Enable exceptions in the realtime thread
222                              (default=no). If this is enabled, exceptions will
223                              be thrown on critical errors in the realtime
224                              context as well. Otherwise if disabled
225                              segmentation faults will be forced by the
226                              application on critical errors.],
227      [config_rt_exceptions="yes"],
228      [config_rt_exceptions="no"]
229    )
230    if test "$config_rt_exceptions" = "yes"; then
231      AC_DEFINE_UNQUOTED(CONFIG_RT_EXCEPTIONS, 1, [Define to 1 to allow exceptions in the realtime context.])
232    fi
233    
234    AC_ARG_ENABLE(preload-samples,
235      [  --enable-preload-samples
236                              Due to seeking and latency issues with hard drives
237                              we have to cache a small part of samples' head in
238                              RAM (default=32768). The higher this value the
239                              more memory will be occupied for each sample, but
240                              the safer this will be in regards of possible
241                              droputs. A 'good' value depends on the running
242                              system and usage dependant factors.],
243      [config_preload_samples="${enableval}"],
244      [config_preload_samples="32768"]
245    )
246    AC_DEFINE_UNQUOTED(CONFIG_PRELOAD_SAMPLES, $config_preload_samples, [Define amount of sample points to be cached in RAM.])
247    
248    AC_ARG_ENABLE(max-pitch,
249      [  --enable-max-pitch
250                              Specify the maximum allowed pitch value in octaves
251                              (default=4). To lower memory usage you might want
252                              set a smaller value.],
253      [config_max_pitch="${enableval}"],
254      [config_max_pitch="4"]
255    )
256    AC_DEFINE_UNQUOTED(CONFIG_MAX_PITCH, $config_max_pitch, [Define max. allowed pitch.])
257    
258    AC_ARG_ENABLE(max-events,
259      [  --enable-max-events
260                              Specify the maximum allowed amount of events to be
261                              processed per fragment (default=1024).],
262      [config_max_events="${enableval}"],
263      [config_max_events="1024"]
264    )
265    AC_DEFINE_UNQUOTED(CONFIG_MAX_EVENTS_PER_FRAGMENT, $config_max_events, [Define max. allowed events per fragment.])
266    
267    AC_ARG_ENABLE(eg-bottom,
268      [  --enable-eg-bottom
269                              Bottom limit of envelope generators
270                              (default=0.001). Certain kinds of curve types like
271                              exponential curves converge against 0 but never
272                              reach 0. So we have to define a certain low value
273                              after which we should consider all smaller values
274                              to be 'almost zero'. The smaller this value, the
275                              longer will voices survive in EG's release stage
276                              and thus waste voices. If this value is too high
277                              will cause click sounds though.],
278      [config_eg_bottom="${enableval}"],
279      [config_eg_bottom="0.001"]
280    )
281    AC_DEFINE_UNQUOTED(CONFIG_EG_BOTTOM, $config_eg_bottom, [Define bottom limit of envelopes.])
282    
283    AC_ARG_ENABLE(eg-min-release-time,
284      [  --enable-eg-min-release-time
285                              Specify the lowest allowed release time in seconds
286                              (default=0.0025). This value will also be used to
287                              ramp down voices on voice stealing. This value
288                              should always be less than the period time of the
289                              used audio driver, as in case of voice stealing
290                              the killed voice needs to be completely ramped
291                              down in the same fragment.],
292      [config_eg_min_release_time="${enableval}"],
293      [config_eg_min_release_time="0.0025"]
294    )
295    AC_DEFINE_UNQUOTED(CONFIG_EG_MIN_RELEASE_TIME, $config_eg_min_release_time, [Define min. release time.])
296    
297    AC_ARG_ENABLE(refill-streams,
298      [  --enable-refill-streams
299                              Number of streams that should be refilled in each
300                              disk thread cycle (default=4).],
301      [config_refill_streams="${enableval}"],
302      [config_refill_streams="4"]
303    )
304    AC_DEFINE_UNQUOTED(CONFIG_REFILL_STREAMS_PER_RUN, $config_refill_streams, [Define amount of streams to be refilled per cycle.])
305    
306    AC_ARG_ENABLE(stream-min-refill,
307      [  --enable-stream-min-refill
308                              Minimum refill size for disk streams (default=1024).
309                              The disk thread will go to sleep for a while if no
310                              stream had to be refilled more than this value in
311                              a disk thread cycle.],
312      [config_stream_min_refill="${enableval}"],
313      [config_stream_min_refill="1024"]
314    )
315    AC_DEFINE_UNQUOTED(CONFIG_STREAM_MIN_REFILL_SIZE, $config_stream_min_refill, [Define min. stream refill size.])
316    
317    AC_ARG_ENABLE(stream-max-refill,
318      [  --enable-stream-max-refill
319                              Maximum refill size for disk streams
320                              (default=65536). The disk thread will refill
321                              each stream only by a size of this value per
322                              disk thread cycle.],
323      [config_stream_max_refill="${enableval}"],
324      [config_stream_max_refill="65536"]
325    )
326    AC_DEFINE_UNQUOTED(CONFIG_STREAM_MAX_REFILL_SIZE, $config_stream_max_refill, [Define max. stream refill size.])
327    
328    AC_ARG_ENABLE(stream-size,
329      [  --enable-stream-size
330                              Size of each stream's ring buffer in sample points
331                              (default=262144).],
332      [config_stream_size="${enableval}"],
333      [config_stream_size="262144"]
334    )
335    AC_DEFINE_UNQUOTED(CONFIG_STREAM_BUFFER_SIZE, $config_stream_size, [Define each stream's ring buffer size.])
336    
337    AC_ARG_ENABLE(max-streams,
338      [  --enable-max-streams
339                              Maximum amount of disk streams (default=90). This
340                              value should always be higher than the maximum
341                              amount of voices.],
342      [config_max_streams="${enableval}"],
343      [config_max_streams="90"]
344    )
345    AC_DEFINE_UNQUOTED(CONFIG_MAX_STREAMS, $config_max_streams, [Define max. streams.])
346    
347    AC_ARG_ENABLE(max-voices,
348      [  --enable-max-voices
349                              Maximum amount of voices (default=64). This value
350                              should always be lower than the maximum amount of
351                              disk streams.],
352      [config_max_voices="${enableval}"],
353      [config_max_voices="64"]
354    )
355    AC_DEFINE_UNQUOTED(CONFIG_MAX_VOICES, $config_max_voices, [Define max. voices.])
356    
357    AC_ARG_ENABLE(voice-steal-algo,
358      [  --enable-voice-steal-algo
359                              Voice stealing algorithm to be used. Currently
360                              available options:
361                                none:
362                                  Disable voice stealing completely.
363                                oldestvoiceonkey:
364                                  Try to kill a voice on the same key first,
365                                  if no success, proceed with the oldest key.
366                                oldestkey (default):
367                                  Try to kill a voice from the oldest active
368                                  key.],
369      [ if test ! "(" "${enableval}" = "none" \
370                  -o "${enableval}" = "oldestvoiceonkey" \
371                  -o "${enableval}" = "oldestkey" ")" ; then
372          AC_MSG_ERROR([Unknown voice stealing algorithm for parameter --enable-voice-steal-algo])
373        else
374          config_voice_steal_algo="${enableval}"
375        fi  
376      ],
377      [config_voice_steal_algo="oldestkey"]
378    )
379    AC_DEFINE_UNQUOTED(CONFIG_VOICE_STEAL_ALGO, voice_steal_algo_${config_voice_steal_algo}, [Define voice stealing algorithm to be used.])
380    
381    AC_ARG_ENABLE(sysex-buffer-size,
382      [  --enable-sysex-buffer-size
383                              System Exclusive Message buffer size in kB
384                              (default=2048).],
385      [config_sysex_buffer_size="${enableval}"],
386      [config_sysex_buffer_size="2048"]
387    )
388    AC_DEFINE_UNQUOTED(CONFIG_SYSEX_BUFFER_SIZE, $config_sysex_buffer_size, [Define SysEx buffer size.])
389    
390    AC_ARG_ENABLE(filter-update-steps,
391      [  --enable-filter-update-steps
392                              Amount of sample points after which filter
393                              parameters (cutoff, resonance) are going to be
394                              updated (default=64). Higher value means less CPU
395                              load, but also worse parameter resolution, this
396                              value will be aligned to a power of two.],
397      [config_filter_update_steps="${enableval}"],
398      [config_filter_update_steps="64"]
399    )
400    AC_DEFINE_UNQUOTED(CONFIG_FILTER_UPDATE_STEPS, $config_filter_update_steps, [Define amount of steps to refresh filter coefficients.])
401    
402    AC_ARG_ENABLE(force-filter,
403      [  --enable-force-filter
404                              If enabled will force filter to be used even if
405                              no usage was define in instrument patch files.
406                              (default=no).],
407      [config_force_filter="yes"],
408      [config_force_filter="no"]
409    )
410    if test "$config_force_filter" = "yes"; then
411      AC_DEFINE_UNQUOTED(CONFIG_FORCE_FILTER, 1, [Define to 1 to force filter usage.])
412    fi
413    
414    AC_ARG_ENABLE(filter-cutoff-min,
415      [  --enable-filter-cutoff-min
416                              Minimum filter cutoff frequency in Hz
417                              (default=100.0).],
418      [config_filter_cutoff_min="${enableval}"],
419      [config_filter_cutoff_min="100.0"]
420    )
421    AC_DEFINE_UNQUOTED(CONFIG_FILTER_CUTOFF_MIN, ${config_filter_cutoff_min}f, [Define min. filter cutoff frequency.])
422    
423    AC_ARG_ENABLE(filter-cutoff-max,
424      [  --enable-filter-cutoff-max
425                              Maximum filter cutoff frequency in Hz
426                              (default=10000.0).],
427      [config_filter_cutoff_max="${enableval}"],
428      [config_filter_cutoff_max="10000.0"]
429    )
430    AC_DEFINE_UNQUOTED(CONFIG_FILTER_CUTOFF_MAX, ${config_filter_cutoff_max}f, [Define max. filter cutoff frequency.])
431    
432    AC_ARG_ENABLE(override-cutoff-ctrl,
433      [  --enable-override-cutoff-ctrl
434                              Override filter cutoff MIDI controller (default=no).
435                              Note: you have to define the MIDI controller number
436                              here, it's not a boolean parameter type! If this
437                              option is used, controller number given by
438                              instrument patch will be ignored and instead this
439                              supplied value will be used.],
440      [config_override_cutoff_ctrl="${enableval}"],
441      [config_override_cutoff_ctrl="no"]
442    )
443    if test ! "$config_override_cutoff_ctrl" = "no"; then
444      AC_DEFINE_UNQUOTED(CONFIG_OVERRIDE_CUTOFF_CTRL, $config_override_cutoff_ctrl, [Define to a MIDI controller number to override cutoff control.])
445    fi
446    
447    AC_ARG_ENABLE(override-resonance-ctrl,
448      [  --enable-override-resonance-ctrl
449                              Override filter resonance MIDI controller
450                              (default=no). Note: you have to define the MIDI
451                              controller number here, it's not a boolean
452                              parameter type! If this option is used, controller
453                              number given by instrument patch will be ignored
454                              and instead this supplied value will be used.],
455      [config_override_resonance_ctrl="${enableval}"],
456      [config_override_resonance_ctrl="no"]
457    )
458    if test ! "$config_override_resonance_ctrl" = "no"; then
459      AC_DEFINE_UNQUOTED(CONFIG_OVERRIDE_RESONANCE_CTRL, $config_override_resonance_ctrl, [Define to a MIDI controller number to override resonance control.])
460    fi
461    
462    AC_ARG_ENABLE(override-filter-type,
463      [  --enable-override-filter-type
464                              Override filter type (default=no). Options:
465                              hp: for highpass
466                              bp: for bandpass
467                              br: for bandreject
468                              lp: for lowpass
469                              lpt: for lowpass turbo],
470      [ if   test "${enableval}" = "hp" ; then
471           config_override_filter_type="::gig::vcf_type_highpass"
472        elif test "${enableval}" = "bp" ; then
473           config_override_filter_type="::gig::vcf_type_bandpass"
474        elif test "${enableval}" = "br" ; then
475           config_override_filter_type="::gig::vcf_type_bandreject"
476        elif test "${enableval}" = "lp" ; then
477           config_override_filter_type="::gig::vcf_type_lowpass"
478        elif test "${enableval}" = "lpt" ; then
479           config_override_filter_type="::gig::vcf_type_lowpassturbo"
480        elif test ! "${enableval}" = "no"; then
481           AC_MSG_ERROR([Unknown filter type for parameter --enable-override-filter-type])
482        fi  
483      ],
484      [config_override_filter_type="no"]
485    )
486    if test ! "$config_override_filter_type" = "no"; then
487      AC_DEFINE_UNQUOTED(CONFIG_OVERRIDE_FILTER_TYPE, $config_override_filter_type, [Define to a filter type to always force that filter type.])
488    fi
489    
490    ###########################################################################
491    # Create Build Files
492    
493  AM_CONFIG_HEADER(config.h)  AM_CONFIG_HEADER(config.h)
494  AM_INIT_AUTOMAKE(linuxsampler, 0.3.1)  AM_INIT_AUTOMAKE(linuxsampler, 0.3.1)
495    
# Line 204  AC_CHECK_HEADER(stdlib.h) Line 503  AC_CHECK_HEADER(stdlib.h)
503  AM_PROG_LIBTOOL  AM_PROG_LIBTOOL
504    
505  AC_OUTPUT(Makefile src/Makefile src/network/Makefile src/engines/Makefile src/engines/gig/Makefile src/engines/common/Makefile src/common/Makefile src/lib/Makefile src/lib/fileloader/Makefile src/lib/fileloader/libgig/Makefile src/testcases/Makefile src/drivers/Makefile src/drivers/audio/Makefile src/drivers/midi/Makefile)  AC_OUTPUT(Makefile src/Makefile src/network/Makefile src/engines/Makefile src/engines/gig/Makefile src/engines/common/Makefile src/common/Makefile src/lib/Makefile src/lib/fileloader/Makefile src/lib/fileloader/libgig/Makefile src/testcases/Makefile src/drivers/Makefile src/drivers/audio/Makefile src/drivers/midi/Makefile)
506    
507    
508    ###########################################################################
509    # Output All Configuration Options
510    
511    echo ""
512    echo "#####################################################################"
513    echo "# LinuxSampler Configuration                                        #"
514    echo "#-------------------------------------------------------------------#"
515    echo "# Development Mode: ${config_dev_mode}"
516    echo "# Debug Level: ${config_debug_level}"
517    echo "# Use Exceptions in RT Context: ${config_rt_exceptions}"
518    echo "# Preload Samples: ${config_preload_samples}"
519    echo "# Maximum Pitch: ${config_max_pitch} (octaves)"
520    echo "# Maximum Events: ${config_max_events}"
521    echo "# Envelope Bottom Level: ${config_eg_bottom} (linear)"
522    echo "# Envelope Minimum Release Time: ${config_eg_min_release_time} s"
523    echo "# Streams to be refilled per Disk Thread Cycle: ${config_refill_streams}"
524    echo "# Minimum Stream Refill Size: ${config_stream_min_refill}"
525    echo "# Maximum Stream Refill Size: ${config_stream_max_refill}"
526    echo "# Stream Size: ${config_stream_size}"
527    echo "# Maximum Disk Streams: ${config_max_streams}"
528    echo "# Maximum Voices: ${config_max_voices}"
529    echo "# SysEx Buffer Size: ${config_sysex_buffer_size} Byte"
530    echo "# Filter Update Steps: ${config_filter_update_steps}"
531    echo "# Force Filter Usage: ${config_force_filter}"
532    echo "# Filter Cutoff Minimum: ${config_filter_cutoff_min} Hz"
533    echo "# Filter Cutoff Maximum: ${config_filter_cutoff_max} Hz"
534    echo "# Override Filter Cutoff Controller: ${config_override_cutoff_ctrl}"
535    echo "# Override Filter Resonance Controller: ${config_override_resonance_ctrl}"
536    echo "# Override Filter Type: ${config_override_filter_type}"
537    echo "#-------------------------------------------------------------------#"
538    echo "# Read './configure --help' or file 'configure.in' for details.     #"
539    echo "#####################################################################"
540    echo ""
541    echo "Good. Now type 'make' to compile, followed by 'make install' as root."
542    echo ""

Legend:
Removed from v.553  
changed lines
  Added in v.554

  ViewVC Help
Powered by ViewVC