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

Legend:
Removed from v.288  
changed lines
  Added in v.830

  ViewVC Help
Powered by ViewVC