/[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 411 by schoenebeck, Sat Feb 26 02:01:14 2005 UTC revision 1502 by senoner, Wed Nov 21 07:29:52 2007 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=5
8    LINUXSAMPLER_RELEASE_BUILD=0
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=1
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    #------------------------------------------------------------------------------------
33    # the LSCP specification version this LinuSampler release complies with:
34    
35    LSCP_RELEASE_MAJOR=1
36    LSCP_RELEASE_MINOR=2
37    
38    AC_DEFINE_UNQUOTED(LSCP_RELEASE_MAJOR, ${LSCP_RELEASE_MAJOR}, [LSCP spec major version this release complies with.])
39    AC_DEFINE_UNQUOTED(LSCP_RELEASE_MINOR, ${LSCP_RELEASE_MINOR}, [LSCP spec minor version this release complies with.])
40    
41    AM_PROG_LIBTOOL
42    
43    AC_SUBST(SHLIB_VERSION_ARG)
44    AC_SUBST(SHARED_VERSION_INFO)
45    
46  AC_C_BIGENDIAN  AC_C_BIGENDIAN
47  AC_CANONICAL_SYSTEM  AC_CANONICAL_SYSTEM
48    
# Line 9  AC_SUBST(target_os) Line 53  AC_SUBST(target_os)
53  AC_SUBST(target_vendor)  AC_SUBST(target_vendor)
54    
55    
56    ###########################################################################
57    # General Checks
58    
59  echo -n "checking whether x86 architecture... "  AC_MSG_CHECKING([whether x86 architecture])
60  def_arch_x86=0  def_arch_x86=0
61  case $target_cpu in  case $target_cpu in
62    "i386" | "i486" | "i586" | "i686" | "i786")    "i386" | "i486" | "i586" | "i686" | "i786")
# Line 21  case $target_cpu in Line 67  case $target_cpu in
67  esac  esac
68  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.])
69    
70    # determine the right gcc switch for CPU specific optimizations
71    # (only if the user did not provide one)
72    CXX_CPU_SWITCH=
73    if ! echo "X $CXXFLAGS " | grep -q -- " \(-march=\|-mcpu=\|-mtune=\|-arch=\)" ; then
74      if test "$def_arch_x86" = 1; then
75        CXX_CPU_SWITCH="-march=$target_cpu"
76      elif test "$target_cpu" = "ppc"; then
77        CXX_CPU_SWITCH="-arch=$target_cpu"
78      fi
79    fi
80    AC_SUBST([CXX_CPU_SWITCH])
81    
82    # check if we're on MS Windows
83    AC_CHECK_HEADERS(
84        mmsystem.h,
85        have_windows=1,
86        have_windows=0
87    )
88    AM_CONDITIONAL(HAVE_WINDOWS, test $have_windows = "1")
89    
90  AC_MSG_CHECKING([whether UNIX98 compatible])  AC_MSG_CHECKING([whether UNIX98 compatible])
91  AC_LANG_SAVE  AC_LANG_SAVE
# Line 44  have_unix98="no" Line 109  have_unix98="no"
109  )  )
110  AC_LANG_RESTORE  AC_LANG_RESTORE
111  AC_MSG_RESULT([$have_unix98])  AC_MSG_RESULT([$have_unix98])
112  if test "$have_unix98" = "no"; then  if test "$have_unix98" = "no" -a "have_windows" = "0"; then
113      if test "x$HAVE_UNIX98" = "x"; then      if test "x$HAVE_UNIX98" = "x"; then
114          echo "LinuxSampler only runs on UNIX98 compatible systems, which is mandatory for"          echo "LinuxSampler only runs on UNIX98 compatible systems, which is mandatory for"
115          echo "pthread_mutexattr_settype() call in Mutex.cpp. You may want to run          echo "pthread_mutexattr_settype() call in Mutex.cpp. You may want to run
# Line 54  if test "$have_unix98" = "no"; then Line 119  if test "$have_unix98" = "no"; then
119      fi      fi
120  fi  fi
121    
122    # check for <features.h>
123    AC_CHECK_HEADERS(features.h)
124    
125    # test for POSIX thread library
126    m4_ifdef([m4_include(m4/pthread.m4)],,
127                 [sinclude([m4/pthread.m4])])
128    ACX_PTHREAD
129    LIBS="$PTHREAD_LIBS $LIBS"
130    CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
131    CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS"
132    CC="$PTHREAD_CC"
133    
134    # check for a bug in NPTL-enabled glibc
135    # (see Gentoo bug report #194076)
136    AC_ARG_ENABLE(nptl-bug-check,
137      [  --disable-nptl-bug-check
138                              Disable check for a bug in certain NPTL-enabled
139                              glibc versions that caused crashs.],
140      [config_check_nptl_bug="$enableval"],
141      [config_check_nptl_bug="yes"]
142    )
143    if test "$config_check_nptl_bug" = "yes"; then
144        m4_ifdef([m4_include(m4/nptl_bug.m4)],,
145                 [sinclude([m4/nptl_bug.m4])])
146        ACX_NPTL_GLIBC_BUG([
147            echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
148            echo "You seem to have a buggy PTHREAD library! LinuxSampler would"
149            echo "probably crash due to this. Please report us the system you are"
150            echo "using and/or file a bug report to the bug tracking system of"
151            echo "your distribution."
152            echo "If you have a NPTL-enabled glibc AND it was compiled for TLS as"
153            echo "well, you can try to circumvent this problem for now by setting"
154            echo "the environment variable LD_ASSUME_KERNEL=\"2.4.1\" , which"
155            echo "should cause this test to pass."
156            echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
157            AC_MSG_ERROR([possibly NPTL glibc bug detected])
158        ])
159    else
160        echo "NPTL glibc bug check disabled"
161    fi
162    
163    
164    
165    ###########################################################################
166  # Checks for available audio and MIDI systems / drivers  # Checks for available audio and MIDI systems / drivers
167  # (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)
168    
169  have_midi_input_driver="false"  have_midi_input_driver="false"
170  have_audio_output_driver="false"  have_audio_output_driver="false"
171    
172  AC_CHECK_HEADER(alsa/asoundlib.h,  # ALSA
173      AC_CHECK_LIB(asound, main,  AC_ARG_ENABLE(alsa-driver,
174                               have_alsa=1    [  --disable-alsa-driver
175                               ,                            Disable support for the Advanced Linux Sound
176                               have_alsa=0                            Architecture (ALSA).],
177                  )    [config_alsa_driver="$enableval"],
178                  ,    [config_alsa_driver="yes"]
179                  have_alsa=0  )
180  )  have_alsa=0
181  if test "$have_alsa" = "1"; then  if test "$config_alsa_driver" = "yes"; then
182      have_midi_input_driver="true"      AC_CHECK_HEADER(alsa/asoundlib.h,
183      have_audio_output_driver="true";          AC_CHECK_LIB(asound, main,
184                                     have_alsa=1
185                                     ,
186                                     have_alsa=0
187                        )
188                        ,
189                        have_alsa=0
190        )
191        if test "$have_alsa" = "1"; then
192            have_midi_input_driver="true"
193            have_audio_output_driver="true";
194        fi
195    
196        echo -n "checking Alsa version... "
197        AC_LANG_SAVE
198        AC_LANG_C
199        AC_TRY_RUN([
200            #include <alsa/asoundlib.h>
201            void main(void) {
202                /* ensure backward compatibility */
203                #if !defined(SND_LIB_MAJOR) && defined(SOUNDLIB_VERSION_MAJOR)
204                #define SND_LIB_MAJOR SOUNDLIB_VERSION_MAJOR
205                #endif
206                exit(SND_LIB_MAJOR);
207            }
208        ],
209        alsa_major=0,
210        alsa_major=$?,
211        alsa_major=0
212        )
213        AC_TRY_RUN([
214            #include <alsa/asoundlib.h>
215            void main(void) {
216                /* ensure backward compatibility */
217                #if !defined(SND_LIB_MINOR) && defined(SOUNDLIB_VERSION_MINOR)
218                #define SND_LIB_MINOR SOUNDLIB_VERSION_MINOR
219                #endif
220                exit(SND_LIB_MINOR);
221            }
222        ],
223        alsa_minor=0,
224        alsa_minor=$?,
225        alsa_minor=0
226        )
227        AC_TRY_RUN([
228            #include <alsa/asoundlib.h>
229            void main(void) {
230                /* ensure backward compatibility */
231                #if !defined(SND_LIB_SUBMINOR) && defined(SOUNDLIB_VERSION_SUBMINOR)
232                #define SND_LIB_SUBMINOR SOUNDLIB_VERSION_SUBMINOR
233                #endif
234                exit(SND_LIB_SUBMINOR);
235            }
236        ],
237        alsa_subminor=0,
238        alsa_subminor=$?,
239        alsa_subminor=0
240        )
241        AC_LANG_RESTORE
242        echo "$alsa_major.$alsa_minor.$alsa_subminor";
243        AC_DEFINE_UNQUOTED(ALSA_MAJOR,$alsa_major,[Define to the major version number of your Alsa installation.])
244        AC_DEFINE_UNQUOTED(ALSA_MINOR,$alsa_minor,[Define to the minor version number of your Alsa installation.])
245        AC_DEFINE_UNQUOTED(ALSA_SUBMINOR,$alsa_subminor,[Define to the subminor version number of your Alsa installation.])
246    else
247        echo "ALSA support disabled by configure script parameter"
248  fi  fi
249  AM_CONDITIONAL(HAVE_ALSA, test $have_alsa = "1")  AM_CONDITIONAL(HAVE_ALSA, test $have_alsa = "1")
250  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.])
251    
252    # JACK
253    AC_ARG_ENABLE(jack-driver,
254      [  --disable-jack-driver
255                              Disable support for the Jack Audio Connection Kit
256                              (JACK).],
257      [config_jack_driver="$enableval"],
258      [config_jack_driver="yes"]
259    )
260    have_jack=0
261    if test "$config_jack_driver" = "yes"; then
262        PKG_CHECK_MODULES(JACK, jack, have_jack=1, have_jack=0)
263        if test $have_jack = "1"; then
264            AC_SUBST(JACK_LIBS)
265            AC_SUBST(JACK_CFLAGS)
266            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)
267            have_audio_output_driver="true";
268        fi
269    else
270        echo "JACK support disabled by configure script parameter"
271    fi
272    AM_CONDITIONAL(HAVE_JACK, test $have_jack = "1")
273    AC_DEFINE_UNQUOTED(HAVE_JACK,$have_jack,[Define to 1 if you have JACK installed.])
274    
275  echo -n "checking Alsa version... "  # ARTS
276  AC_LANG_SAVE  AC_ARG_ENABLE(arts-driver,
277  AC_LANG_C    [  --disable-arts-driver
278  AC_TRY_RUN([                            Disable support for the Analogue Realtime System
279  #include <alsa/asoundlib.h>                            (aRts).],
280  void main(void) {    [config_arts_driver="$enableval"],
281  /* ensure backward compatibility */    [config_arts_driver="yes"]
 #if !defined(SND_LIB_MAJOR) && defined(SOUNDLIB_VERSION_MAJOR)  
 #define SND_LIB_MAJOR SOUNDLIB_VERSION_MAJOR  
 #endif  
 exit(SND_LIB_MAJOR);  
 }  
 ],  
 alsa_major=0,  
 alsa_major=$?,  
 alsa_major=0  
282  )  )
283  AC_TRY_RUN([  have_arts=0
284  #include <alsa/asoundlib.h>  if test "$config_arts_driver" = "yes"; then
285  void main(void) {      m4_ifdef([m4_include(m4/arts.m4)],,
286  /* ensure backward compatibility */               [sinclude([m4/arts.m4])])
287  #if !defined(SND_LIB_MINOR) && defined(SOUNDLIB_VERSION_MINOR)      AM_PATH_ARTS(0.9.5, have_arts=1, have_arts=0)
288  #define SND_LIB_MINOR SOUNDLIB_VERSION_MINOR      if test "$have_arts" = "1"; then
289  #endif          have_audio_output_driver="true"
290  exit(SND_LIB_MINOR);      fi
291  }  else
292  ],      echo "ARTS support disabled by configure script parameter"
293  alsa_minor=0,  fi
294  alsa_minor=$?,  AM_CONDITIONAL(HAVE_ARTS, test "$have_arts" = "1")
295  alsa_minor=0  AC_DEFINE_UNQUOTED(HAVE_ARTS,$have_arts,[Define to 1 if you have aRts installed.])
296    
297    # ASIO AUDIO (Win32)
298    AC_ARG_ENABLE(asiosdk-dir,
299      [  --enable-asiosdk-dir
300                              Directory where the ASIO SDK is located, this automatically
301                              enables the compilation of the ASIO audio output driver.],
302      [config_asiosdk_dir="${enableval}"],
303      [config_asiosdk_dir="."]
304  )  )
305  AC_TRY_RUN([  AC_SUBST(config_asiosdk_dir)
306  #include <alsa/asoundlib.h>  
307  void main(void) {  AC_ARG_ENABLE(asio-driver,
308  /* ensure backward compatibility */    [  --disable-asio-driver
309  #if !defined(SND_LIB_SUBMINOR) && defined(SOUNDLIB_VERSION_SUBMINOR)                            Disable support for the Windows ASIO driver.],
310  #define SND_LIB_SUBMINOR SOUNDLIB_VERSION_SUBMINOR    [config_asio_driver="$enableval"],
311  #endif    [config_asio_driver="yes"]
 exit(SND_LIB_SUBMINOR);  
 }  
 ],  
 alsa_subminor=0,  
 alsa_subminor=$?,  
 alsa_subminor=0  
312  )  )
313  AC_LANG_RESTORE  have_asio=0
314  echo "$alsa_major.$alsa_minor.$alsa_subminor";  ASIOSDK_BASEDIR=
315  AC_DEFINE_UNQUOTED(ALSA_MAJOR,$alsa_major,[Define to the major version number of your Alsa installation.])  if test "$config_asio_driver" = "yes"; then
316  AC_DEFINE_UNQUOTED(ALSA_MINOR,$alsa_minor,[Define to the minor version number of your Alsa installation.])      asiosdk_headerfile=$config_asiosdk_dir/ASIOSDK2/common/asio.h
317  AC_DEFINE_UNQUOTED(ALSA_SUBMINOR,$alsa_subminor,[Define to the subminor version number of your Alsa installation.])      echo -n "checking for ASIO headerfile: $asiosdk_headerfile ...."
318        if test -e $asiosdk_headerfile ; then
319            echo yes
320            have_asio=1
321            ASIOSDK_BASEDIR="$config_asiosdk_dir"
322        else
323            echo no
324            have_asio=0
325        fi
326        if test "$have_asio" = "1"; then
327            have_audio_output_driver="true"
328        fi
329    else
330        echo "Windows ASIO support disabled by configure script parameter"
331    fi
332    AC_SUBST(ASIOSDK_BASEDIR)
333    AM_CONDITIONAL(HAVE_ASIO, test $have_asio = "1")
334    AC_DEFINE_UNQUOTED(HAVE_ASIO,$have_asio,[Define to 1 if you have ASIO installed.])
335    
336    # MidiShare (Linux, OS X, Windows)
337    AC_ARG_ENABLE(midishare-driver,
338      [  --disable-midishare-driver
339                              Disable support for the MidiShare system.],
340      [config_midishare_driver="$enableval"],
341      [config_midishare_driver="yes"]
342    )
343    have_midishare=0
344    if test "$config_midishare_driver" = "yes"; then
345        AC_CHECK_HEADER(MidiShare.h,
346            AC_CHECK_LIB(MidiShare, MidiCountEvs,
347                                    have_midishare=1,
348                                    have_midishare=0
349                        )
350                        ,
351                        have_midishare=0
352        )
353        if test "$have_midishare" = "1"; then
354            have_midi_input_driver="true"
355        fi
356    else
357        echo "MidiShare support disabled by configure script parameter"
358    fi
359    AM_CONDITIONAL(HAVE_MIDISHARE, test $have_midishare = "1")
360    AC_DEFINE_UNQUOTED(HAVE_MIDISHARE,$have_midishare,[Define to 1 if you have MidiShare installed.])
361    
362  # JACK  # CoreMIDI (OS X)
363  PKG_CHECK_MODULES(JACK, jack, HAVE_JACK=true, HAVE_JACK=false)  AC_ARG_ENABLE(coremidi-driver,
364  AC_SUBST(JACK_LIBS)    [  --disable-coremidi-driver
365  AC_SUBST(JACK_CFLAGS)                            Disable support for the Apple CoreMIDI system.],
366  if test $HAVE_JACK = false; then    [config_coremidi_driver="$enableval"],
367      HAVE_JACK=0;    [config_coremidi_driver="yes"]
368  else  )
369      HAVE_JACK=1  have_coremidi=0
370      have_audio_output_driver="true";  if test "$config_coremidi_driver" = "yes"; then
371      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)      AC_CHECK_HEADER(CoreMIDI/CoreMIDI.h,
372  fi          have_coremidi=1,
373  AM_CONDITIONAL(HAVE_JACK, test $HAVE_JACK = 1)          have_coremidi=0
374  AC_DEFINE_UNQUOTED(HAVE_JACK,$HAVE_JACK,[Define to 1 if you have JACK installed.])      )
375        if test "$have_coremidi" = "1"; then
376  # SQLITE3          have_midi_input_driver="true"
377  PKG_CHECK_MODULES(SQLITE3, sqlite3, HAVE_SQLITE3=true, HAVE_SQLITE3=false)      fi
 AC_SUBST(SQLITE3_LIBS)  
 AC_SUBST(SQLITE3_CFLAGS)  
 if test $HAVE_SQLITE3 = false; then  
     HAVE_SQLITE3=0;  
378  else  else
379      HAVE_SQLITE3=1      echo "CoreMIDI support disabled by configure script parameter"
380  fi  fi
381  AM_CONDITIONAL(HAVE_SQLITE3, test $HAVE_SQLITE3 = 1)  AM_CONDITIONAL(HAVE_COREMIDI, test $have_coremidi = "1")
382  AC_DEFINE_UNQUOTED(HAVE_SQLITE3,$HAVE_SQLITE3,[Define to 1 if you have SQLITE3 installed.])  AC_DEFINE_UNQUOTED(HAVE_COREMIDI,$have_coremidi,[Define to 1 if you have CoreMIDI installed.])
383    
384    # MME MIDI (Win32)
385    AC_ARG_ENABLE(mmemidi-driver,
386      [  --disable-mmemidi-driver
387                              Disable support for the Windows MME MIDI system.],
388      [config_mmemidi_driver="$enableval"],
389      [config_mmemidi_driver="yes"]
390    )
391    have_mmemidi=0
392    if test "$config_mmemidi_driver" = "yes"; then
393        AC_CHECK_HEADERS(mmsystem.h,
394            have_mmemidi=1,
395            have_mmemidi=0
396        )
397        if test "$have_mmemidi" = "1"; then
398            have_midi_input_driver="true"
399        fi
400    else
401        echo "MME MIDI support disabled by configure script parameter"
402    fi
403    AM_CONDITIONAL(HAVE_MME_MIDI, test $have_mmemidi = "1")
404    AC_DEFINE_UNQUOTED(HAVE_MME_MIDI,$have_mmemidi,[Define to 1 if you have MME MIDI installed.])
405    
406    # have we found at least one MIDI input and one audio output driver ?
407  if test "$have_midi_input_driver" = "false"; then  if test "$have_midi_input_driver" = "false"; then
408      echo "No supported MIDI input system found!"      echo "No supported MIDI input system found!"
409      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:"
410        echo "ALSA, MIDIShare, CoreMIDI."
411        echo "If you think you have one of those available on your system, make sure you"
412        echo "also have the respective development (header) files installed."
413      exit -1;      exit -1;
414  fi  fi
415  if test "$have_audio_output_driver" = "false"; then  if test "$have_audio_output_driver" = "false"; then
416      echo "No supported audio output system found!"      echo "No supported audio output system found!"
417      echo "Sorry, LinuxSampler only supports ALSA and JACK as audio output driver at the moment!"      echo "Sorry, LinuxSampler only supports ALSA, JACK and ARTS as audio output"
418        echo "driver at the moment!"
419        exit -1;
420    fi
421    
422    
423    
424    ###########################################################################
425    # Checks for various DLL libraries
426    
427    # Check presence of libgig
428    libgig_version="3.2.0"
429    PKG_CHECK_MODULES(GIG, gig >= $libgig_version, HAVE_GIG=true, HAVE_GIG=false)
430    if test "$HAVE_GIG" = "false"; then
431        echo "Required libgig version not found!"
432        echo "You need to have libgig version ${libgig_version} installed!"
433      exit -1;      exit -1;
434    else
435        echo "yes, found libgig $libgig_version"
436    fi
437    AC_SUBST(GIG_CFLAGS)
438    AC_SUBST(GIG_LIBS)
439    
440    # Instruments DB feature (requires SQLite 3.3)
441    AC_ARG_ENABLE(instruments-db,
442      [  --disable-instruments-db
443                              Disable compilation of the sampler's instruments
444                              database feature. You need to have SQLite 3.3
445                              or younger installed for this feature.],
446      [config_instruments_db="$enableval"],
447      [config_instruments_db="yes"]
448    )
449    HAVE_SQLITE3=0;
450    if test "$config_instruments_db" = "yes"; then
451        # Check presence of sqlite3
452        sqlite_version="3.3"
453        PKG_CHECK_MODULES(SQLITE3, sqlite3 >= $sqlite_version, HAVE_SQLITE3=true, HAVE_SQLITE3=false)
454        AC_SUBST(SQLITE3_LIBS)
455        AC_SUBST(SQLITE3_CFLAGS)
456        if test $HAVE_SQLITE3 = false; then
457            HAVE_SQLITE3=0
458            config_instruments_db="no"
459            echo "*** Required sqlite version not found!"
460            echo "*** You need to have sqlite version ${sqlite_version} or higher"
461            echo "*** for instruments database support to be enabled."
462            echo "*** Support for instruments DB will be disabled!"
463        else
464            HAVE_SQLITE3=1
465        fi
466    else
467        echo "Instruments DB feature disabled by configure script parameter"
468    fi
469    AM_CONDITIONAL(HAVE_SQLITE3, test $HAVE_SQLITE3 = 1)
470    AC_DEFINE_UNQUOTED(HAVE_SQLITE3,$HAVE_SQLITE3,[Define to 1 if you want the instruments DB feature and have SQLITE3 installed.])
471    
472    
473    
474    ###########################################################################
475    # Handle Configuration Options
476    
477    # TODO: should we use AC_ARG_VAR(variable, description) instead?
478    
479    AC_ARG_ENABLE(asm,
480      [  --disable-asm
481                              Enable hand-crafted assembly optimizations
482                              (default=on). LinuxSampler provides CPU specific
483                              assembly optimizations. This is currently limited
484                              to just enter a fast (denormal) FPU mode on x86
485                              platforms. There are currently no synthesis core
486                              assembly optimizations anymore since LS 0.4.0],
487      [config_asm="$enableval"],
488      [config_asm="yes"]
489    )
490    if test "$config_asm" = "yes"; then
491      AC_DEFINE_UNQUOTED(CONFIG_ASM, 1, [Define to 1 if you want to enable asm optimizations.])
492    fi
493    
494    AC_ARG_ENABLE(dev-mode,
495      [  --enable-dev-mode
496                              Enable development mode (default=off). In that mode
497                              we do some extra sanity checks here and there.
498                              This helps to spot possible problems, but reduces
499                              efficiency a bit],
500      [config_dev_mode="$enableval"],
501      [config_dev_mode="no"]
502    )
503    if test "$config_dev_mode" = "yes"; then
504      AC_DEFINE_UNQUOTED(CONFIG_DEVMODE, 1, [Define to 1 if you want to enable development mode.])
505    fi
506    
507    AC_ARG_ENABLE(debug-level,
508      [  --enable-debug-level
509                              Specify verbosity of console messages (default=1).
510                              The higher the value, the higher will be verbosity.
511                              A value of 0 means no console output at all.
512                              There's not really an upper limit but the usual
513                              level of all messages is currently somewhere less
514                              than 10.],
515      [config_debug_level="${enableval}"],
516      [config_debug_level="1"]
517    )
518    AC_DEFINE_UNQUOTED(CONFIG_DEBUG_LEVEL, $config_debug_level, [Define console verbosity.])
519    
520    AC_ARG_ENABLE(rt-exceptions,
521      [  --enable-rt-exceptions
522                              Enable exceptions in the realtime thread
523                              (default=no). If this is enabled, exceptions will
524                              be thrown on critical errors in the realtime
525                              context as well. Otherwise if disabled
526                              segmentation faults will be forced by the
527                              application on critical errors.],
528      [config_rt_exceptions="$enableval"],
529      [config_rt_exceptions="no"]
530    )
531    if test "$config_rt_exceptions" = "yes"; then
532      AC_DEFINE_UNQUOTED(CONFIG_RT_EXCEPTIONS, 1, [Define to 1 to allow exceptions in the realtime context.])
533    fi
534    
535    AC_ARG_ENABLE(preload-samples,
536      [  --enable-preload-samples
537                              Due to seeking and latency issues with hard drives
538                              we have to cache a small part of samples' head in
539                              RAM (default=32768). The higher this value the
540                              more memory will be occupied for each sample, but
541                              the safer this will be in regards of possible
542                              droputs. A 'good' value depends on the running
543                              system and usage dependant factors.],
544      [config_preload_samples="${enableval}"],
545      [config_preload_samples="32768"]
546    )
547    AC_DEFINE_UNQUOTED(CONFIG_PRELOAD_SAMPLES, $config_preload_samples, [Define amount of sample points to be cached in RAM.])
548    
549    AC_ARG_ENABLE(max-pitch,
550      [  --enable-max-pitch
551                              Specify the maximum allowed pitch value in octaves
552                              (default=4). To lower memory usage you might want
553                              set a smaller value.],
554      [config_max_pitch="${enableval}"],
555      [config_max_pitch="4"]
556    )
557    AC_DEFINE_UNQUOTED(CONFIG_MAX_PITCH, $config_max_pitch, [Define max. allowed pitch.])
558    
559    AC_ARG_ENABLE(max-events,
560      [  --enable-max-events
561                              Specify the maximum allowed amount of events to be
562                              processed per fragment (default=1024).],
563      [config_max_events="${enableval}"],
564      [config_max_events="1024"]
565    )
566    AC_DEFINE_UNQUOTED(CONFIG_MAX_EVENTS_PER_FRAGMENT, $config_max_events, [Define max. allowed events per fragment.])
567    
568    AC_ARG_ENABLE(eg-bottom,
569      [  --enable-eg-bottom
570                              Bottom limit of envelope generators
571                              (default=0.001). Certain kinds of curve types like
572                              exponential curves converge against 0 but never
573                              reach 0. So we have to define a certain low value
574                              after which we should consider all smaller values
575                              to be 'almost zero'. The smaller this value, the
576                              longer will voices survive in EG's release stage
577                              and thus waste voices. If this value is too high
578                              will cause click sounds though.],
579      [config_eg_bottom="${enableval}"],
580      [config_eg_bottom="0.001"]
581    )
582    AC_DEFINE_UNQUOTED(CONFIG_EG_BOTTOM, $config_eg_bottom, [Define bottom limit of envelopes.])
583    
584    AC_ARG_ENABLE(eg-min-release-time,
585      [  --enable-eg-min-release-time
586                              Specify the lowest allowed release time in seconds
587                              (default=0.0025). This value will also be used to
588                              ramp down voices on voice stealing. This value
589                              should always be less than the period time of the
590                              used audio driver, as in case of voice stealing
591                              the killed voice needs to be completely ramped
592                              down in the same fragment.],
593      [config_eg_min_release_time="${enableval}"],
594      [config_eg_min_release_time="0.0025"]
595    )
596    AC_DEFINE_UNQUOTED(CONFIG_EG_MIN_RELEASE_TIME, $config_eg_min_release_time, [Define min. release time.])
597    
598    AC_ARG_ENABLE(refill-streams,
599      [  --enable-refill-streams
600                              Number of streams that should be refilled in each
601                              disk thread cycle (default=4).],
602      [config_refill_streams="${enableval}"],
603      [config_refill_streams="4"]
604    )
605    AC_DEFINE_UNQUOTED(CONFIG_REFILL_STREAMS_PER_RUN, $config_refill_streams, [Define amount of streams to be refilled per cycle.])
606    
607    AC_ARG_ENABLE(stream-min-refill,
608      [  --enable-stream-min-refill
609                              Minimum refill size for disk streams (default=1024).
610                              The disk thread will go to sleep for a while if no
611                              stream had to be refilled more than this value in
612                              a disk thread cycle.],
613      [config_stream_min_refill="${enableval}"],
614      [config_stream_min_refill="1024"]
615    )
616    AC_DEFINE_UNQUOTED(CONFIG_STREAM_MIN_REFILL_SIZE, $config_stream_min_refill, [Define min. stream refill size.])
617    
618    AC_ARG_ENABLE(stream-max-refill,
619      [  --enable-stream-max-refill
620                              Maximum refill size for disk streams
621                              (default=65536). The disk thread will refill
622                              each stream only by a size of this value per
623                              disk thread cycle.],
624      [config_stream_max_refill="${enableval}"],
625      [config_stream_max_refill="65536"]
626    )
627    AC_DEFINE_UNQUOTED(CONFIG_STREAM_MAX_REFILL_SIZE, $config_stream_max_refill, [Define max. stream refill size.])
628    
629    AC_ARG_ENABLE(stream-size,
630      [  --enable-stream-size
631                              Size of each stream's ring buffer in sample points
632                              (default=262144).],
633      [config_stream_size="${enableval}"],
634      [config_stream_size="262144"]
635    )
636    AC_DEFINE_UNQUOTED(CONFIG_STREAM_BUFFER_SIZE, $config_stream_size, [Define each stream's ring buffer size.])
637    
638    AC_ARG_ENABLE(max-streams,
639      [  --enable-max-streams
640                              Maximum amount of disk streams (default=90). This
641                              value should always be higher than the maximum
642                              amount of voices.],
643      [config_max_streams="${enableval}"],
644      [config_max_streams="90"]
645    )
646    AC_DEFINE_UNQUOTED(CONFIG_MAX_STREAMS, $config_max_streams, [Define max. streams.])
647    
648    AC_ARG_ENABLE(max-voices,
649      [  --enable-max-voices
650                              Maximum amount of voices (default=64). This value
651                              should always be lower than the maximum amount of
652                              disk streams.],
653      [config_max_voices="${enableval}"],
654      [config_max_voices="64"]
655    )
656    AC_DEFINE_UNQUOTED(CONFIG_MAX_VOICES, $config_max_voices, [Define max. voices.])
657    
658    AC_ARG_ENABLE(subfragment-size,
659      [  --enable-subfragment-size
660                              Every audio fragment will be splitted into
661                              subfragments. Where each subfragment renders
662                              audio with constant synthesis parameters. This is
663                              done for efficiency reasons. This parameter
664                              defines the default size of a subfragment in
665                              sample points. A large value means less CPU time
666                              whereas a low value means better audio quality
667                              (default=32).],
668      [config_subfragment_size="${enableval}"],
669      [config_subfragment_size="32"]
670    )
671    AC_DEFINE_UNQUOTED(CONFIG_DEFAULT_SUBFRAGMENT_SIZE, $config_subfragment_size, [Define default subfragment size (in sample points).])
672    
673    AC_ARG_ENABLE(global-attenuation-default,
674      [  --enable-global-attenuation-default
675                              To prevent clipping all samples will be lowered
676                              in amplitude by this given default factor (can
677                              be overridden at runtime).
678                              (default=0.35)],
679      [config_global_attenuation_default="${enableval}"],
680      [config_global_attenuation_default="0.35"]
681    )
682    AC_DEFINE_UNQUOTED(CONFIG_GLOBAL_ATTENUATION_DEFAULT, $config_global_attenuation_default, [Define default global volume attenuation (as floating point factor).])
683    
684    AC_ARG_ENABLE(voice-steal-algo,
685      [  --enable-voice-steal-algo
686                              Voice stealing algorithm to be used. Currently
687                              available options:
688                                none:
689                                  Disable voice stealing completely.
690                                oldestvoiceonkey (default):
691                                  Try to kill a voice on the same key first,
692                                  if no success, proceed with the oldest key.
693                                oldestkey:
694                                  Try to kill a voice from the oldest active
695                                  key.],
696      [ if test ! "(" "${enableval}" = "none" \
697                  -o "${enableval}" = "oldestvoiceonkey" \
698                  -o "${enableval}" = "oldestkey" ")" ; then
699          AC_MSG_ERROR([Unknown voice stealing algorithm for parameter --enable-voice-steal-algo])
700        else
701          config_voice_steal_algo="${enableval}"
702        fi
703      ],
704      [config_voice_steal_algo="oldestvoiceonkey"]
705    )
706    AC_DEFINE_UNQUOTED(CONFIG_VOICE_STEAL_ALGO, voice_steal_algo_${config_voice_steal_algo}, [Define voice stealing algorithm to be used.])
707    
708    AC_ARG_ENABLE(sysex-buffer-size,
709      [  --enable-sysex-buffer-size
710                              System Exclusive Message buffer size in kB
711                              (default=2048).],
712      [config_sysex_buffer_size="${enableval}"],
713      [config_sysex_buffer_size="2048"]
714    )
715    AC_DEFINE_UNQUOTED(CONFIG_SYSEX_BUFFER_SIZE, $config_sysex_buffer_size, [Define SysEx buffer size.])
716    
717    AC_ARG_ENABLE(force-filter,
718      [  --enable-force-filter
719                              If enabled will force filter to be used even if
720                              no usage was define in instrument patch files.
721                              (default=no).],
722      [config_force_filter="$enableval"],
723      [config_force_filter="no"]
724    )
725    if test "$config_force_filter" = "yes"; then
726      AC_DEFINE_UNQUOTED(CONFIG_FORCE_FILTER, 1, [Define to 1 to force filter usage.])
727  fi  fi
728    
729    AC_ARG_ENABLE(filter-cutoff-min,
730      [  --enable-filter-cutoff-min
731                              Minimum filter cutoff frequency in Hz
732                              (default=100.0).],
733      [config_filter_cutoff_min="${enableval}"],
734      [config_filter_cutoff_min="100.0"]
735    )
736    AC_DEFINE_UNQUOTED(CONFIG_FILTER_CUTOFF_MIN, ${config_filter_cutoff_min}f, [Define min. filter cutoff frequency.])
737    
738    AC_ARG_ENABLE(filter-cutoff-max,
739      [  --enable-filter-cutoff-max
740                              Maximum filter cutoff frequency in Hz
741                              (default=10000.0).],
742      [config_filter_cutoff_max="${enableval}"],
743      [config_filter_cutoff_max="10000.0"]
744    )
745    AC_DEFINE_UNQUOTED(CONFIG_FILTER_CUTOFF_MAX, ${config_filter_cutoff_max}f, [Define max. filter cutoff frequency.])
746    
747    AC_ARG_ENABLE(override-cutoff-ctrl,
748      [  --enable-override-cutoff-ctrl
749                              Override filter cutoff MIDI controller (default=no).
750                              Note: you have to define the MIDI controller number
751                              here, it's not a boolean parameter type! If this
752                              option is used, controller number given by
753                              instrument patch will be ignored and instead this
754                              supplied value will be used.],
755      [config_override_cutoff_ctrl="${enableval}"],
756      [config_override_cutoff_ctrl="no"]
757    )
758    if test ! "$config_override_cutoff_ctrl" = "no"; then
759      AC_DEFINE_UNQUOTED(CONFIG_OVERRIDE_CUTOFF_CTRL, $config_override_cutoff_ctrl, [Define to a MIDI controller number to override cutoff control.])
760    fi
761    
762    AC_ARG_ENABLE(override-resonance-ctrl,
763      [  --enable-override-resonance-ctrl
764                              Override filter resonance MIDI controller
765                              (default=no). Note: you have to define the MIDI
766                              controller number here, it's not a boolean
767                              parameter type! If this option is used, controller
768                              number given by instrument patch will be ignored
769                              and instead this supplied value will be used.],
770      [config_override_resonance_ctrl="${enableval}"],
771      [config_override_resonance_ctrl="no"]
772    )
773    if test ! "$config_override_resonance_ctrl" = "no"; then
774      AC_DEFINE_UNQUOTED(CONFIG_OVERRIDE_RESONANCE_CTRL, $config_override_resonance_ctrl, [Define to a MIDI controller number to override resonance control.])
775    fi
776    
777    AC_ARG_ENABLE(override-filter-type,
778      [  --enable-override-filter-type
779                              Override filter type (default=no). Options:
780                              hp: for highpass
781                              bp: for bandpass
782                              br: for bandreject
783                              lp: for lowpass
784                              lpt: for lowpass turbo],
785      [ if   test "${enableval}" = "hp" ; then
786           config_override_filter_type="::gig::vcf_type_highpass"
787        elif test "${enableval}" = "bp" ; then
788           config_override_filter_type="::gig::vcf_type_bandpass"
789        elif test "${enableval}" = "br" ; then
790           config_override_filter_type="::gig::vcf_type_bandreject"
791        elif test "${enableval}" = "lp" ; then
792           config_override_filter_type="::gig::vcf_type_lowpass"
793        elif test "${enableval}" = "lpt" ; then
794           config_override_filter_type="::gig::vcf_type_lowpassturbo"
795        elif test ! "${enableval}" = "no"; then
796           AC_MSG_ERROR([Unknown filter type for parameter --enable-override-filter-type])
797        fi
798      ],
799      [config_override_filter_type="no"]
800    )
801    if test ! "$config_override_filter_type" = "no"; then
802      AC_DEFINE_UNQUOTED(CONFIG_OVERRIDE_FILTER_TYPE, $config_override_filter_type, [Define to a filter type to always force that filter type.])
803    fi
804    
805    AC_ARG_ENABLE(gs-checksum,
806      [  --enable-gs-checksum
807                              Enable Roland General Synth SysEx checksum check
808                              (default=no). If this is enabled, all GS SysEx
809                              messages which do not provide a correct checksum
810                              will be ignored. This is disabled by default as
811                              not all devices honor GS checksums.],
812      [config_assert_gs_sysex_checksum="$enableval"],
813      [config_assert_gs_sysex_checksum="no"]
814    )
815    if test "config_assert_gs_sysex_checksum" = "yes"; then
816      AC_DEFINE_UNQUOTED(CONFIG_ASSERT_GS_SYSEX_CHECKSUM, 1, [Define to 1 if you want to enable GS SysEx check.])
817    fi
818    
819    AC_ARG_ENABLE(portamento-time-min,
820      [  --enable-portamento-time-min
821                              Minimum Portamento time in seconds
822                              (default=0.1).],
823      [config_portamento_time_min="${enableval}"],
824      [config_portamento_time_min="0.1"]
825    )
826    AC_DEFINE_UNQUOTED(CONFIG_PORTAMENTO_TIME_MIN, $config_portamento_time_min, [Define min. portamento time.])
827    
828    AC_ARG_ENABLE(portamento-time-max,
829      [  --enable-portamento-time-max
830                              Maximum Portamento time in seconds
831                              (default=32).],
832      [config_portamento_time_max="${enableval}"],
833      [config_portamento_time_max="32"]
834    )
835    AC_DEFINE_UNQUOTED(CONFIG_PORTAMENTO_TIME_MAX, $config_portamento_time_max, [Define max. portamento time.])
836    
837    AC_ARG_ENABLE(portamento-time-default,
838      [  --enable-portamento-time-default
839                              Default Portamento time in seconds
840                              (default=1).],
841      [config_portamento_time_default="${enableval}"],
842      [config_portamento_time_default="1"]
843    )
844    AC_DEFINE_UNQUOTED(CONFIG_PORTAMENTO_TIME_DEFAULT, $config_portamento_time_default, [Define default portamento time.])
845    
846    AC_ARG_ENABLE(signed-triang-algo,
847      [  --enable-signed-triang-algo
848                              Signed triangular wave algorithm to be used (e.g. for LFOs).
849                              Currently available options:
850                                intmath:
851                                  Uses integer math without any branch will then be
852                                  converted to floating point value for each sample point.
853                                  This int->float conversion might hurt on some systems.
854                                intmathabs:
855                                  Similar to intmath but uses abs() function.
856                                  Depending on compiler and platrofm this could
857                                  perform better than integer math as it avoids
858                                  an extra integer multiply instruction.
859                                diharmonic:
860                                  The triangular wave will be approximated by adding two
861                                  sinusoidials. This solution might especially hurt on
862                                  systems with weak floating point unit.
863                                benchmark (default):
864                                  This is not an algorithm. Use this option if the
865                                  appropriate algorithm should be automatically
866                                  chosen by the configure script by performing a
867                                  benchmark between the algorithms mentioned above.
868                                  This will NOT work for cross compilation!],
869      [ if test ! "(" "${enableval}" = "intmath" \
870                  -o "${enableval}" = "intmathabs" \
871                  -o "${enableval}" = "diharmonic" ")" ; then
872          AC_MSG_ERROR([Unknown triangular wave algorithm for parameter --enable-signed-triang-algo])
873        else
874          config_signed_triang_algo="${enableval}"
875        fi
876      ],
877      [config_signed_triang_algo="benchmark"]
878    )
879    
880    AC_ARG_ENABLE(unsigned-triang-algo,
881      [  --enable-unsigned-triang-algo
882                              Unsigned triangular wave algorithm to be used (e.g. for LFOs).
883                              Currently available options:
884                                intmath:
885                                  Uses integer math without any branch will then be
886                                  converted to floating point value for each sample point.
887                                  This int->float conversion might hurt on some systems.
888                                intmathabs:
889                                  Similar to intmath but uses abs() function.
890                                  Depending on compiler and platrofm this could
891                                  perform better than integer math as it avoids
892                                  an extra integer multiply instruction.
893                                diharmonic:
894                                  The triangular wave will be approximated by adding two
895                                  sinusoidials. This solution might especially hurt on
896                                  systems with weak floating point unit.
897                                benchmark (default):
898                                  This is not an algorithm. Use this option if the
899                                  appropriate algorithm should be automatically
900                                  chosen by the configure script by performing a
901                                  benchmark between the algorithms mentioned above.
902                                  This will NOT work for cross compilation!],
903      [ if test ! "(" "${enableval}" = "intmath" \
904                  -o "${enableval}" = "intmathabs" \
905                  -o "${enableval}" = "diharmonic" ")" ; then
906          AC_MSG_ERROR([Unknown triangular wave algorithm for parameter --enable-unsigned-triang-algo])
907        else
908          config_unsigned_triang_algo="${enableval}"
909        fi
910      ],
911      [config_unsigned_triang_algo="benchmark"]
912    )
913    
914    AC_ARG_ENABLE(process-muted-channels,
915      [  --enable-process-muted-channels
916                              Enable processing of muted channels (default=no).
917                              In that mode all MIDI events in the muted channels
918                              will be processed. This will provide information
919                              about the active voices in the muted channels and
920                              will not discard notes, triggered in mute mode,
921                              when the channel is unmuted. But also will reduce
922                              the efficiency.],
923      [config_process_muted_channels="$enableval"],
924      [config_process_muted_channels="no"]
925    )
926    if test "$config_process_muted_channels" = "yes"; then
927      AC_DEFINE_UNQUOTED(CONFIG_PROCESS_MUTED_CHANNELS, 1, [Define to 1 if you want to enable processing of muted channels.])
928    fi
929    
930    AC_ARG_ENABLE(process-all-notes-off,
931      [  --disable-process-all-notes-off
932                              Disable interpretation of All-Notes-Off MIDI
933                              messages (default=on). By default LS will release
934                              all voices whenever it receives an All-Notes-Off
935                              MIDI message. You can disable this behavior, so
936                              that LS simply ignores such messages.],
937      [config_process_all_notes_off="$enableval"],
938      [config_process_all_notes_off="yes"]
939    )
940    if test "$config_process_all_notes_off" = "yes"; then
941      AC_DEFINE_UNQUOTED(CONFIG_PROCESS_ALL_NOTES_OFF, 1, [Define to 1 if you want to enable processing of All-Notes-Off MIDI messages.])
942    fi
943    
944    AC_ARG_ENABLE(interpolate-volume,
945      [  --disable-interpolate-volume
946                              Disable interpolation of volume modulation
947                              (default=on). With this enabled, the volume changes
948                              generated by for example the envelope generator
949                              will be smoother, minimizing the risk for audio
950                              clicks. Disable it to reduce CPU usage.],
951      [config_interpolate_volume="$enableval"],
952      [config_interpolate_volume="yes"]
953    )
954    if test "$config_interpolate_volume" = "yes"; then
955      AC_DEFINE_UNQUOTED(CONFIG_INTERPOLATE_VOLUME, 1, [Define to 1 if you want to enable interpolation of volume modulation.])
956    fi
957    
958    AC_ARG_ENABLE(plugin-dir,
959      [  --enable-plugin-dir
960                              Directory where the sampler shall look for potential plugins,
961                              that is 3rd party shared libraries that should be loaded by
962                              the sampler on startup. By default the sampler will search
963                              for plugins in the subdirectory "plugins" below its own
964                              library directory.
965                              (i.e. /usr/local/lib/linuxsampler/plugins)],
966      [config_plugin_dir="${enableval}"],
967      [config_plugin_dir="${libdir}/linuxsampler/plugins"]
968    )
969    AC_SUBST(config_plugin_dir)
970    
971    AC_ARG_ENABLE(default-instruments-db-location,
972      [  --enable-default-instruments-db-location
973                              Only when instruments DB feature is enabled: file name
974                              which shall be taken as default location of the
975                              instruments DB file. This location can still be
976                              overridden at runtime with a command line switch.
977                              (default: /var/lib/linuxsampler/instruments.db)],
978      [config_default_instruments_db_file="${enableval}"],
979      [config_default_instruments_db_file="/var/lib/linuxsampler/instruments.db"]
980    )
981    AC_DEFINE_UNQUOTED(
982        CONFIG_DEFAULT_INSTRUMENTS_DB_LOCATION,
983        "$config_default_instruments_db_file",
984        [Only when instruments DB feature is enabled: default location of the DB file.]
985    )
986    AC_SUBST(config_default_instruments_db_file)
987    
988    
989    ###########################################################################
990    # Automatic Benchmarks (to detect the best algorithms for the system)
991    
992    AC_LANG_SAVE
993    
994    if test "$config_signed_triang_algo" = "benchmark"; then
995        echo -n "benchmarking for the best (signed) triangular oscillator algorithm... "
996        AC_LANG_CPLUSPLUS
997        AC_TRY_RUN([
998                #define SIGNED 1
999                #define SILENT 1
1000                #include "${srcdir}/benchmarks/triang.cpp"
1001            ],
1002            triang_signed=0,
1003            triang_signed=$?,
1004            triang_signed=0
1005        )
1006        if test "$triang_signed" = "2"; then
1007            config_signed_triang_algo="intmath"
1008            echo "integer math"
1009        elif test "$triang_signed" = "3"; then
1010            config_signed_triang_algo="diharmonic"
1011            echo "di harmonics"
1012        elif test "$triang_signed" = "5"; then
1013            config_signed_triang_algo="intmathabs"
1014            echo "integer math using abs()"
1015        else
1016            echo "Benchmark of signed triangular wave algorithms failed!"
1017            echo "Maybe you are doing cross compilation? In that case you have to select"
1018            echo "an algorithm manually with './configure --enable-signed-triang-algo=...'"
1019            echo "Call './configure --help' for further information or read configure.in."
1020            exit -1;
1021        fi
1022    else
1023        case "$config_signed_triang_algo" in
1024            intmath)
1025                triang_signed=2 ;;
1026            diharmonic)
1027                triang_signed=3 ;;
1028            intmathabs)
1029                triang_signed=5 ;;
1030        esac
1031    fi
1032    AC_DEFINE_UNQUOTED(CONFIG_SIGNED_TRIANG_ALGO, ${triang_signed}, [Define signed triangular wave algorithm to be used.])
1033    
1034    if test "$config_unsigned_triang_algo" = "benchmark"; then
1035        echo -n "benchmarking for the best (unsigned) triangular oscillator algorithm... "
1036        AC_LANG_CPLUSPLUS
1037        AC_TRY_RUN([
1038                #define SIGNED 0
1039                #define SILENT 1
1040                #include "${srcdir}/benchmarks/triang.cpp"
1041            ],
1042            triang_unsigned=0,
1043            triang_unsigned=$?,
1044            triang_unsigned=0
1045        )
1046        if test "$triang_unsigned" = "2"; then
1047            config_unsigned_triang_algo="intmath"
1048            echo "integer math"
1049        elif test "$triang_unsigned" = "3"; then
1050            config_unsigned_triang_algo="diharmonic"
1051            echo "di harmonics"
1052        elif test "$triang_unsigned" = "5"; then
1053            config_unsigned_triang_algo="intmathabs"
1054            echo "integer math using abs()"
1055        else
1056            echo "Benchmark of unsigned triangular wave algorithms failed!"
1057            echo "Maybe you are doing cross compilation? In that case you have to select"
1058            echo "an algorithm manually with './configure --enable-unsigned-triang-algo=...'"
1059            echo "Call './configure --help' for further information or read configure.in."
1060            exit -1;
1061        fi
1062    else
1063        case "$config_unsigned_triang_algo" in
1064            intmath)
1065                triang_unsigned=2 ;;
1066            diharmonic)
1067                triang_unsigned=3 ;;
1068            intmathabs)
1069                triang_unsigned=5 ;;
1070        esac
1071    fi
1072    AC_DEFINE_UNQUOTED(CONFIG_UNSIGNED_TRIANG_ALGO, ${triang_unsigned}, [Define unsigned triangular wave algorithm to be used.])
1073    
1074    AC_LANG_RESTORE
1075    
1076    
1077    ###########################################################################
1078    # Create Build Files
1079    
1080  AM_CONFIG_HEADER(config.h)  AM_CONFIG_HEADER(config.h)
1081  AM_INIT_AUTOMAKE(linuxsampler, 0.3.0)  AM_INIT_AUTOMAKE(linuxsampler, "$LINUXSAMPLER_RELEASE_MAJOR.$LINUXSAMPLER_RELEASE_MINOR.$LINUXSAMPLER_RELEASE_BUILD")
1082    
1083  AC_LANG_CPLUSPLUS  AC_LANG_CPLUSPLUS
1084  AC_PROG_CXX  AC_PROG_CXX
 AM_PROG_LIBTOOL  
1085    
1086  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
1087    if test "$config_asm" = "yes"; then
1088      if test "$def_arch_x86" = 1; then
1089        CXXFLAGS="$CXXFLAGS -msse"
1090      fi
1091    fi
1092    
1093    # autoconf 2.59/libtool 1.5.12 bug? work-around. Without a check like
1094    # this, the dlfcn.h check in am_prog_libtool may fail.
1095    AC_CHECK_HEADER(stdlib.h)
1096    
1097    AC_OUTPUT( \
1098        Makefile \
1099        man/Makefile \
1100        man/linuxsampler.1 \
1101        src/Makefile \
1102        src/db/Makefile \
1103        src/network/Makefile \
1104        src/engines/Makefile \
1105        src/engines/gig/Makefile \
1106        src/engines/common/Makefile \
1107        src/common/Makefile \
1108        src/testcases/Makefile \
1109        src/drivers/Makefile \
1110        src/drivers/audio/Makefile \
1111        src/drivers/midi/Makefile \
1112        src/plugins/Makefile \
1113        linuxsampler.spec \
1114        debian/Makefile \
1115        Artwork/Makefile \
1116        scripts/Makefile \
1117        osx/Makefile \
1118        osx/linuxsampler.xcodeproj/Makefile \
1119        Documentation/Makefile \
1120        Documentation/Engines/Makefile \
1121        Documentation/Engines/gig/Makefile \
1122        linuxsampler.pc \
1123        Doxyfile \
1124    )
1125    
1126    # resolve all nested variables in '${config_plugin_dir}'
1127    # (merely for providing a human readable summary below)
1128    while test $config_plugin_dir != `eval echo ${config_plugin_dir}` ; do
1129            config_plugin_dir=`eval echo ${config_plugin_dir}`
1130    done
1131    
1132    
1133    ###########################################################################
1134    # Output All Configuration Options
1135    
1136    echo ""
1137    echo "#####################################################################"
1138    echo "# LinuxSampler Configuration                                        #"
1139    echo "#-------------------------------------------------------------------#"
1140    echo "# Assembly Optimizations: ${config_asm}"
1141    echo "# Development Mode: ${config_dev_mode}"
1142    echo "# Debug Level: ${config_debug_level}"
1143    echo "# Use Exceptions in RT Context: ${config_rt_exceptions}"
1144    echo "# Preload Samples: ${config_preload_samples}"
1145    echo "# Maximum Pitch: ${config_max_pitch} (octaves)"
1146    echo "# Maximum Events: ${config_max_events}"
1147    echo "# Envelope Bottom Level: ${config_eg_bottom} (linear)"
1148    echo "# Envelope Minimum Release Time: ${config_eg_min_release_time} s"
1149    echo "# Streams to be refilled per Disk Thread Cycle: ${config_refill_streams}"
1150    echo "# Minimum Stream Refill Size: ${config_stream_min_refill}"
1151    echo "# Maximum Stream Refill Size: ${config_stream_max_refill}"
1152    echo "# Stream Size: ${config_stream_size}"
1153    echo "# Maximum Disk Streams: ${config_max_streams}"
1154    echo "# Maximum Voices: ${config_max_voices}"
1155    echo "# Default Subfragment Size: ${config_subfragment_size}"
1156    echo "# Default Global Volume Attenuation: ${config_global_attenuation_default}"
1157    echo "# Voice Stealing Algorithm: ${config_voice_steal_algo}"
1158    echo "# Signed Triangular Oscillator Algorithm: ${config_signed_triang_algo}"
1159    echo "# Unsigned Triangular Oscillator Algorithm: ${config_unsigned_triang_algo}"
1160    echo "# SysEx Buffer Size: ${config_sysex_buffer_size} Byte"
1161    echo "# Min. Portamento Time: ${config_portamento_time_min} s"
1162    echo "# Max. Portamento Time: ${config_portamento_time_max} s"
1163    echo "# Default Portamento Time: ${config_portamento_time_default} s"
1164    echo "# Force Filter Usage: ${config_force_filter}"
1165    echo "# Filter Cutoff Minimum: ${config_filter_cutoff_min} Hz"
1166    echo "# Filter Cutoff Maximum: ${config_filter_cutoff_max} Hz"
1167    echo "# Override Filter Cutoff Controller: ${config_override_cutoff_ctrl}"
1168    echo "# Override Filter Resonance Controller: ${config_override_resonance_ctrl}"
1169    echo "# Override Filter Type: ${config_override_filter_type}"
1170    echo "# Assert GS SysEx Checksum: ${config_assert_gs_sysex_checksum}"
1171    echo "# Process Muted Channels: ${config_process_muted_channels}"
1172    echo "# Process All-Notes-Off MIDI message: ${config_process_all_notes_off}"
1173    echo "# Interpolate Volume: ${config_interpolate_volume}"
1174    echo "# Instruments database support: ${config_instruments_db}"
1175    if test "$config_instruments_db" = "yes"; then
1176    echo "# Instruments DB default location: ${config_default_instruments_db_file}"
1177    fi
1178    echo "# Plugin Path: ${config_plugin_dir}"
1179    echo "#-------------------------------------------------------------------#"
1180    echo "# Read './configure --help' or file 'configure.in' for details.     #"
1181    echo "#####################################################################"
1182    echo ""
1183    echo "Good. Now type 'make' to compile, followed by 'make install' as root."
1184    echo ""

Legend:
Removed from v.411  
changed lines
  Added in v.1502

  ViewVC Help
Powered by ViewVC