/[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 830 by persson, Sun Jan 15 18:23:11 2006 UTC revision 1651 by persson, Sun Jan 27 15:07:11 2008 UTC
# Line 4  AC_INIT(configure.in) Line 4  AC_INIT(configure.in)
4  # LinuxSampler's / liblinuxsampler's "official" release version:  # LinuxSampler's / liblinuxsampler's "official" release version:
5    
6  LINUXSAMPLER_RELEASE_MAJOR=0  LINUXSAMPLER_RELEASE_MAJOR=0
7  LINUXSAMPLER_RELEASE_MINOR=3  LINUXSAMPLER_RELEASE_MINOR=5
8  LINUXSAMPLER_RELEASE_BUILD=3cvs  LINUXSAMPLER_RELEASE_BUILD=1
9    
10  #------------------------------------------------------------------------------------  #------------------------------------------------------------------------------------
11  # The following is the libtool / shared library version. This doesn't have to  # The following is the libtool / shared library version. This doesn't have to
# Line 24  LINUXSAMPLER_RELEASE_BUILD=3cvs Line 24  LINUXSAMPLER_RELEASE_BUILD=3cvs
24  #  6. If any interfaces have been removed since the last public release, then set age  #  6. If any interfaces have been removed since the last public release, then set age
25  #     to 0.  #     to 0.
26    
27  LIBLINUXSAMPLER_LT_CURRENT=0  LIBLINUXSAMPLER_LT_CURRENT=2
28  LIBLINUXSAMPLER_LT_REVISION=0  LIBLINUXSAMPLER_LT_REVISION=0
29  LIBLINUXSAMPLER_LT_AGE=0  LIBLINUXSAMPLER_LT_AGE=1
30  SHARED_VERSION_INFO="$LIBLINUXSAMPLER_LT_CURRENT:$LIBLINUXSAMPLER_LT_REVISION:$LIBLINUXSAMPLER_LT_AGE"  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=3
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  AM_PROG_LIBTOOL
42    
43  AC_SUBST(SHLIB_VERSION_ARG)  AC_SUBST(SHLIB_VERSION_ARG)
# Line 43  AC_SUBST(target_cpu) Line 52  AC_SUBST(target_cpu)
52  AC_SUBST(target_os)  AC_SUBST(target_os)
53  AC_SUBST(target_vendor)  AC_SUBST(target_vendor)
54    
55    PKG_PROG_PKG_CONFIG
56    
57  ###########################################################################  ###########################################################################
58  # General Checks  # General Checks
# Line 61  AC_DEFINE_UNQUOTED(ARCH_X86,$def_arch_x8 Line 71  AC_DEFINE_UNQUOTED(ARCH_X86,$def_arch_x8
71  # determine the right gcc switch for CPU specific optimizations  # determine the right gcc switch for CPU specific optimizations
72  # (only if the user did not provide one)  # (only if the user did not provide one)
73  CXX_CPU_SWITCH=  CXX_CPU_SWITCH=
 echo "X $CXXFLAGS "  
74  if ! echo "X $CXXFLAGS " | grep -q -- " \(-march=\|-mcpu=\|-mtune=\|-arch=\)" ; then  if ! echo "X $CXXFLAGS " | grep -q -- " \(-march=\|-mcpu=\|-mtune=\|-arch=\)" ; then
75    if test "$def_arch_x86" = 1; then    if test "$def_arch_x86" = 1; then
76      CXX_CPU_SWITCH="-march=$target_cpu"      CXX_CPU_SWITCH="-march=$target_cpu"
77    elif test "$target_cpu" = "powerpc"; then    elif test "$target_cpu" = "ppc"; then
78      CXX_CPU_SWITCH="-arch=$target_cpu"      CXX_CPU_SWITCH="-arch=$target_cpu"
79    fi    fi
80  fi  fi
81  AC_SUBST([CXX_CPU_SWITCH])  AC_SUBST([CXX_CPU_SWITCH])
82    
83    # check if we're on MS Windows
84    AC_CHECK_HEADERS(
85        mmsystem.h,
86        have_windows=1,
87        have_windows=0
88    )
89    AM_CONDITIONAL(HAVE_WINDOWS, test $have_windows = "1")
90    
91  AC_MSG_CHECKING([whether UNIX98 compatible])  AC_MSG_CHECKING([whether UNIX98 compatible])
92  AC_LANG_SAVE  AC_LANG_SAVE
93  AC_LANG_C  AC_LANG_C
# Line 93  have_unix98="no" Line 110  have_unix98="no"
110  )  )
111  AC_LANG_RESTORE  AC_LANG_RESTORE
112  AC_MSG_RESULT([$have_unix98])  AC_MSG_RESULT([$have_unix98])
113  if test "$have_unix98" = "no"; then  if test "$have_unix98" = "no" -a "have_windows" = "0"; then
114      if test "x$HAVE_UNIX98" = "x"; then      if test "x$HAVE_UNIX98" = "x"; then
115          echo "LinuxSampler only runs on UNIX98 compatible systems, which is mandatory for"          echo "LinuxSampler only runs on UNIX98 compatible systems, which is mandatory for"
116          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 106  fi Line 123  fi
123  # check for <features.h>  # check for <features.h>
124  AC_CHECK_HEADERS(features.h)  AC_CHECK_HEADERS(features.h)
125    
126    # test for POSIX thread library
127    m4_ifdef([m4_include(m4/pthread.m4)],,
128                 [sinclude([m4/pthread.m4])])
129    ACX_PTHREAD
130    LIBS="$PTHREAD_LIBS $LIBS"
131    CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
132    CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS"
133    CC="$PTHREAD_CC"
134    
135    # check for a bug in NPTL-enabled glibc
136    # (see Gentoo bug report #194076)
137    AC_ARG_ENABLE(nptl-bug-check,
138      [  --disable-nptl-bug-check
139                              Disable check for a bug in certain NPTL-enabled
140                              glibc versions that caused crashs.],
141      [config_check_nptl_bug="$enableval"],
142      [config_check_nptl_bug="yes"]
143    )
144    if test "$config_check_nptl_bug" = "yes"; then
145        m4_ifdef([m4_include(m4/nptl_bug.m4)],,
146                 [sinclude([m4/nptl_bug.m4])])
147        ACX_NPTL_GLIBC_BUG([
148            echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
149            echo "You seem to have a buggy PTHREAD library! LinuxSampler would"
150            echo "probably crash due to this. Please report us the system you are"
151            echo "using and/or file a bug report to the bug tracking system of"
152            echo "your distribution."
153            echo "If you have a NPTL-enabled glibc AND it was compiled for TLS as"
154            echo "well, you can try to circumvent this problem for now by setting"
155            echo "the environment variable LD_ASSUME_KERNEL=\"2.4.1\" , which"
156            echo "should cause this test to pass."
157            echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
158            AC_MSG_ERROR([possibly NPTL glibc bug detected])
159        ])
160    else
161        echo "NPTL glibc bug check disabled"
162    fi
163    
164    
165    
166    ###########################################################################
167  # Checks for available audio and MIDI systems / drivers  # Checks for available audio and MIDI systems / drivers
168  # (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)
169    
170  have_midi_input_driver="false"  have_midi_input_driver="false"
171  have_audio_output_driver="false"  have_audio_output_driver="false"
172    
173  AC_CHECK_HEADER(alsa/asoundlib.h,  # ALSA
174      AC_CHECK_LIB(asound, main,  AC_ARG_ENABLE(alsa-driver,
175                               have_alsa=1    [  --disable-alsa-driver
176                               ,                            Disable support for the Advanced Linux Sound
177                               have_alsa=0                            Architecture (ALSA).],
178                  )    [config_alsa_driver="$enableval"],
179                  ,    [config_alsa_driver="yes"]
180                  have_alsa=0  )
181  )  have_alsa=0
182  if test "$have_alsa" = "1"; then  if test "$config_alsa_driver" = "yes"; then
183      have_midi_input_driver="true"      AC_CHECK_HEADER(alsa/asoundlib.h,
184      have_audio_output_driver="true";          AC_CHECK_LIB(asound, main,
185                                     have_alsa=1
186                                     ,
187                                     have_alsa=0
188                        )
189                        ,
190                        have_alsa=0
191        )
192        if test "$have_alsa" = "1"; then
193            have_midi_input_driver="true"
194            have_audio_output_driver="true";
195        fi
196    
197        echo -n "checking Alsa version... "
198        AC_LANG_SAVE
199        AC_LANG_C
200        AC_TRY_RUN([
201            #include <alsa/asoundlib.h>
202            void main(void) {
203                /* ensure backward compatibility */
204                #if !defined(SND_LIB_MAJOR) && defined(SOUNDLIB_VERSION_MAJOR)
205                #define SND_LIB_MAJOR SOUNDLIB_VERSION_MAJOR
206                #endif
207                exit(SND_LIB_MAJOR);
208            }
209        ],
210        alsa_major=0,
211        alsa_major=$?,
212        alsa_major=0
213        )
214        AC_TRY_RUN([
215            #include <alsa/asoundlib.h>
216            void main(void) {
217                /* ensure backward compatibility */
218                #if !defined(SND_LIB_MINOR) && defined(SOUNDLIB_VERSION_MINOR)
219                #define SND_LIB_MINOR SOUNDLIB_VERSION_MINOR
220                #endif
221                exit(SND_LIB_MINOR);
222            }
223        ],
224        alsa_minor=0,
225        alsa_minor=$?,
226        alsa_minor=0
227        )
228        AC_TRY_RUN([
229            #include <alsa/asoundlib.h>
230            void main(void) {
231                /* ensure backward compatibility */
232                #if !defined(SND_LIB_SUBMINOR) && defined(SOUNDLIB_VERSION_SUBMINOR)
233                #define SND_LIB_SUBMINOR SOUNDLIB_VERSION_SUBMINOR
234                #endif
235                exit(SND_LIB_SUBMINOR);
236            }
237        ],
238        alsa_subminor=0,
239        alsa_subminor=$?,
240        alsa_subminor=0
241        )
242        AC_LANG_RESTORE
243        echo "$alsa_major.$alsa_minor.$alsa_subminor";
244        AC_DEFINE_UNQUOTED(ALSA_MAJOR,$alsa_major,[Define to the major version number of your Alsa installation.])
245        AC_DEFINE_UNQUOTED(ALSA_MINOR,$alsa_minor,[Define to the minor version number of your Alsa installation.])
246        AC_DEFINE_UNQUOTED(ALSA_SUBMINOR,$alsa_subminor,[Define to the subminor version number of your Alsa installation.])
247    else
248        echo "ALSA support disabled by configure script parameter"
249  fi  fi
250  AM_CONDITIONAL(HAVE_ALSA, test $have_alsa = "1")  AM_CONDITIONAL(HAVE_ALSA, test $have_alsa = "1")
251  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.])
252    
 echo -n "checking Alsa version... "  
 AC_LANG_SAVE  
 AC_LANG_C  
 AC_TRY_RUN([  
 #include <alsa/asoundlib.h>  
 void main(void) {  
 /* ensure backward compatibility */  
 #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  
 )  
 AC_TRY_RUN([  
 #include <alsa/asoundlib.h>  
 void main(void) {  
 /* ensure backward compatibility */  
 #if !defined(SND_LIB_MINOR) && defined(SOUNDLIB_VERSION_MINOR)  
 #define SND_LIB_MINOR SOUNDLIB_VERSION_MINOR  
 #endif  
 exit(SND_LIB_MINOR);  
 }  
 ],  
 alsa_minor=0,  
 alsa_minor=$?,  
 alsa_minor=0  
 )  
 AC_TRY_RUN([  
 #include <alsa/asoundlib.h>  
 void main(void) {  
 /* ensure backward compatibility */  
 #if !defined(SND_LIB_SUBMINOR) && defined(SOUNDLIB_VERSION_SUBMINOR)  
 #define SND_LIB_SUBMINOR SOUNDLIB_VERSION_SUBMINOR  
 #endif  
 exit(SND_LIB_SUBMINOR);  
 }  
 ],  
 alsa_subminor=0,  
 alsa_subminor=$?,  
 alsa_subminor=0  
 )  
 AC_LANG_RESTORE  
 echo "$alsa_major.$alsa_minor.$alsa_subminor";  
 AC_DEFINE_UNQUOTED(ALSA_MAJOR,$alsa_major,[Define to the major version number of your Alsa installation.])  
 AC_DEFINE_UNQUOTED(ALSA_MINOR,$alsa_minor,[Define to the minor version number of your Alsa installation.])  
 AC_DEFINE_UNQUOTED(ALSA_SUBMINOR,$alsa_subminor,[Define to the subminor version number of your Alsa installation.])  
   
253  # JACK  # JACK
254  PKG_CHECK_MODULES(JACK, jack, HAVE_JACK=true, HAVE_JACK=false)  AC_ARG_ENABLE(jack-driver,
255  AC_SUBST(JACK_LIBS)    [  --disable-jack-driver
256  AC_SUBST(JACK_CFLAGS)                            Disable support for the Jack Audio Connection Kit
257  if test $HAVE_JACK = false; then                            (JACK).],
258      HAVE_JACK=0;    [config_jack_driver="$enableval"],
259  else    [config_jack_driver="yes"]
260      HAVE_JACK=1  )
261      have_audio_output_driver="true";  have_jack=0
262      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)  if test "$config_jack_driver" = "yes"; then
263        PKG_CHECK_MODULES(JACK, jack, have_jack=1, have_jack=0)
264        if test $have_jack = "1"; then
265            AC_SUBST(JACK_LIBS)
266            AC_SUBST(JACK_CFLAGS)
267            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)
268            have_audio_output_driver="true";
269        fi
270    else
271        echo "JACK support disabled by configure script parameter"
272    fi
273    AM_CONDITIONAL(HAVE_JACK, test $have_jack = "1")
274    AC_DEFINE_UNQUOTED(HAVE_JACK,$have_jack,[Define to 1 if you have JACK installed.])
275    
276    # JACK MIDI
277    have_jack_midi=0
278    if test $have_jack = "1"; then
279       linuxsampler_save_CFLAGS=$CFLAGS
280       linuxsampler_save_LIBS=$LIBS
281       CFLAGS="$JACK_CFLAGS $CFLAGS"
282       LIBS="$JACK_LIBS $LIBS"
283       AC_CHECK_HEADER(jack/midiport.h, have_jack_midi=1, have_jack_midi=0)
284       if test $have_jack_midi = "1"; then
285         AC_CHECK_FUNCS(jack_midi_get_event_count)
286         AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <jack/midiport.h>]], [[
287             jack_midi_clear_buffer(0, 0);
288         ]])], [AC_DEFINE(JACK_MIDI_FUNCS_NEED_NFRAMES, 1,
289                 [Define to 1 if you have the old jack midi functions that need an nframes argument.])])
290       fi
291       CFLAGS=$linuxsampler_save_CFLAGS
292       LIBS=$linuxsampler_save_LIBS
293    fi
294    AM_CONDITIONAL(HAVE_JACK_MIDI, test $have_jack_midi = "1")
295    AC_DEFINE_UNQUOTED(HAVE_JACK_MIDI, $have_jack_midi,
296                       [Define to 1 if you have JACK with MIDI support installed.])
297    
298    # ARTS
299    AC_ARG_ENABLE(arts-driver,
300      [  --disable-arts-driver
301                              Disable support for the Analogue Realtime System
302                              (aRts).],
303      [config_arts_driver="$enableval"],
304      [config_arts_driver="yes"]
305    )
306    have_arts=0
307    if test "$config_arts_driver" = "yes"; then
308        m4_ifdef([m4_include(m4/arts.m4)],,
309                 [sinclude([m4/arts.m4])])
310        AM_PATH_ARTS(0.9.5, have_arts=1, have_arts=0)
311        if test "$have_arts" = "1"; then
312            have_audio_output_driver="true"
313        fi
314    else
315        echo "ARTS support disabled by configure script parameter"
316  fi  fi
317  AM_CONDITIONAL(HAVE_JACK, test $HAVE_JACK = 1)  AM_CONDITIONAL(HAVE_ARTS, test "$have_arts" = "1")
318  AC_DEFINE_UNQUOTED(HAVE_JACK,$HAVE_JACK,[Define to 1 if you have JACK installed.])  AC_DEFINE_UNQUOTED(HAVE_ARTS,$have_arts,[Define to 1 if you have aRts installed.])
319    
320    # ASIO AUDIO (Win32)
321    AC_ARG_ENABLE(asiosdk-dir,
322      [  --enable-asiosdk-dir
323                              Directory where the ASIO SDK is located, this automatically
324                              enables the compilation of the ASIO audio output driver.],
325      [config_asiosdk_dir="${enableval}"],
326      [config_asiosdk_dir="."]
327    )
328    AC_SUBST(config_asiosdk_dir)
329    
330    AC_ARG_ENABLE(asio-driver,
331      [  --disable-asio-driver
332                              Disable support for the Windows ASIO driver.],
333      [config_asio_driver="$enableval"],
334      [config_asio_driver="yes"]
335    )
336    have_asio=0
337    ASIOSDK_BASEDIR=
338    if test "$config_asio_driver" = "yes"; then
339        asiosdk_headerfile=$config_asiosdk_dir/ASIOSDK2/common/asio.h
340        echo -n "checking for ASIO headerfile: $asiosdk_headerfile ...."
341        if test -e $asiosdk_headerfile ; then
342            echo yes
343            have_asio=1
344            ASIOSDK_BASEDIR="$config_asiosdk_dir"
345        else
346            echo no
347            have_asio=0
348        fi
349        if test "$have_asio" = "1"; then
350            have_audio_output_driver="true"
351        fi
352    else
353        echo "Windows ASIO support disabled by configure script parameter"
354    fi
355    AC_SUBST(ASIOSDK_BASEDIR)
356    AM_CONDITIONAL(HAVE_ASIO, test $have_asio = "1")
357    AC_DEFINE_UNQUOTED(HAVE_ASIO,$have_asio,[Define to 1 if you have ASIO installed.])
358    
359  # MidiShare (Linux, OS X, Windows)  # MidiShare (Linux, OS X, Windows)
360  AC_CHECK_HEADER(MidiShare.h,  AC_ARG_ENABLE(midishare-driver,
361      AC_CHECK_LIB(MidiShare, MidiCountEvs,    [  --disable-midishare-driver
362                              have_midishare=1,                            Disable support for the MidiShare system.],
363                              have_midishare=0    [config_midishare_driver="$enableval"],
364                  )    [config_midishare_driver="yes"]
365                  ,  )
366                  have_midishare=0  have_midishare=0
367  )  if test "$config_midishare_driver" = "yes"; then
368  if test "$have_midishare" = "1"; then      AC_CHECK_HEADER(MidiShare.h,
369      have_midi_input_driver="true"          AC_CHECK_LIB(MidiShare, MidiCountEvs,
370                                    have_midishare=1,
371                                    have_midishare=0
372                        )
373                        ,
374                        have_midishare=0
375        )
376        if test "$have_midishare" = "1"; then
377            have_midi_input_driver="true"
378        fi
379    else
380        echo "MidiShare support disabled by configure script parameter"
381  fi  fi
382  AM_CONDITIONAL(HAVE_MIDISHARE, test $have_midishare = "1")  AM_CONDITIONAL(HAVE_MIDISHARE, test $have_midishare = "1")
383  AC_DEFINE_UNQUOTED(HAVE_MIDISHARE,$have_midishare,[Define to 1 if you have MidiShare installed.])  AC_DEFINE_UNQUOTED(HAVE_MIDISHARE,$have_midishare,[Define to 1 if you have MidiShare installed.])
384    
385  # CoreMIDI (OS X)  # CoreMIDI (OS X)
386  AC_CHECK_HEADER(CoreMIDI/CoreMIDI.h,  AC_ARG_ENABLE(coremidi-driver,
387                  have_coremidi=1,    [  --disable-coremidi-driver
388                  have_coremidi=0                            Disable support for the Apple CoreMIDI system.],
389  )    [config_coremidi_driver="$enableval"],
390  if test "$have_coremidi" = "1"; then    [config_coremidi_driver="yes"]
391      have_midi_input_driver="true"  )
392    have_coremidi=0
393    if test "$config_coremidi_driver" = "yes"; then
394        AC_CHECK_HEADER(CoreMIDI/CoreMIDI.h,
395            have_coremidi=1,
396            have_coremidi=0
397        )
398        if test "$have_coremidi" = "1"; then
399            have_midi_input_driver="true"
400        fi
401    else
402        echo "CoreMIDI support disabled by configure script parameter"
403  fi  fi
404  AM_CONDITIONAL(HAVE_COREMIDI, test $have_coremidi = "1")  AM_CONDITIONAL(HAVE_COREMIDI, test $have_coremidi = "1")
405  AC_DEFINE_UNQUOTED(HAVE_COREMIDI,$have_coremidi,[Define to 1 if you have CoreMIDI installed.])  AC_DEFINE_UNQUOTED(HAVE_COREMIDI,$have_coremidi,[Define to 1 if you have CoreMIDI installed.])
406    
407    # MME MIDI (Win32)
408    AC_ARG_ENABLE(mmemidi-driver,
409      [  --disable-mmemidi-driver
410                              Disable support for the Windows MME MIDI system.],
411      [config_mmemidi_driver="$enableval"],
412      [config_mmemidi_driver="yes"]
413    )
414    have_mmemidi=0
415    if test "$config_mmemidi_driver" = "yes"; then
416        AC_CHECK_HEADERS(mmsystem.h,
417            have_mmemidi=1,
418            have_mmemidi=0
419        )
420        if test "$have_mmemidi" = "1"; then
421            have_midi_input_driver="true"
422        fi
423    else
424        echo "MME MIDI support disabled by configure script parameter"
425    fi
426    AM_CONDITIONAL(HAVE_MME_MIDI, test $have_mmemidi = "1")
427    AC_DEFINE_UNQUOTED(HAVE_MME_MIDI,$have_mmemidi,[Define to 1 if you have MME MIDI installed.])
428    
429    # have we found at least one MIDI input and one audio output driver ?
430    if test "$have_midi_input_driver" = "false"; then
431        echo "No supported MIDI input system found!"
432        echo "Sorry, LinuxSampler only supports the following MIDI drivers at the moment:"
433        echo "ALSA, MIDIShare, CoreMIDI."
434        echo "If you think you have one of those available on your system, make sure you"
435        echo "also have the respective development (header) files installed."
436        exit -1;
437    fi
438    if test "$have_audio_output_driver" = "false"; then
439        echo "No supported audio output system found!"
440        echo "Sorry, LinuxSampler only supports ALSA, JACK and ARTS as audio output"
441        echo "driver at the moment!"
442        exit -1;
443    fi
444    
445    
446    
447    ###########################################################################
448    # Checks for various DLL libraries
449    
450  # Check presence of libgig  # Check presence of libgig
451  libgig_version="2.0.2"  libgig_version="3.2.1"
452  PKG_CHECK_MODULES(GIG, gig >= $libgig_version, HAVE_GIG=true, HAVE_GIG=false)  PKG_CHECK_MODULES(GIG, gig >= $libgig_version, HAVE_GIG=true, HAVE_GIG=false)
453  if test "$HAVE_GIG" = "false"; then  if test "$HAVE_GIG" = "false"; then
454      echo "Required libgig version not found!"      echo "Required libgig version not found!"
# Line 231  fi Line 460  fi
460  AC_SUBST(GIG_CFLAGS)  AC_SUBST(GIG_CFLAGS)
461  AC_SUBST(GIG_LIBS)  AC_SUBST(GIG_LIBS)
462    
463  # SQLITE3  # Instruments DB feature (requires SQLite 3.3)
464  PKG_CHECK_MODULES(SQLITE3, sqlite3, HAVE_SQLITE3=true, HAVE_SQLITE3=false)  AC_ARG_ENABLE(instruments-db,
465  AC_SUBST(SQLITE3_LIBS)    [  --disable-instruments-db
466  AC_SUBST(SQLITE3_CFLAGS)                            Disable compilation of the sampler's instruments
467  if test $HAVE_SQLITE3 = false; then                            database feature. You need to have SQLite 3.3
468      HAVE_SQLITE3=0;                            or younger installed for this feature.],
469      echo "no, support for instrument DB will be disabled!"    [config_instruments_db="$enableval"],
470      [config_instruments_db="yes"]
471    )
472    HAVE_SQLITE3=0;
473    if test "$config_instruments_db" = "yes"; then
474        # Check presence of sqlite3
475        sqlite_version="3.3"
476        PKG_CHECK_MODULES(SQLITE3, sqlite3 >= $sqlite_version, HAVE_SQLITE3=true, HAVE_SQLITE3=false)
477        AC_SUBST(SQLITE3_LIBS)
478        AC_SUBST(SQLITE3_CFLAGS)
479        if test $HAVE_SQLITE3 = false; then
480            HAVE_SQLITE3=0
481            config_instruments_db="no"
482            echo "*** Required sqlite version not found!"
483            echo "*** You need to have sqlite version ${sqlite_version} or higher"
484            echo "*** for instruments database support to be enabled."
485            echo "*** Support for instruments DB will be disabled!"
486        else
487            HAVE_SQLITE3=1
488        fi
489  else  else
490      HAVE_SQLITE3=1      echo "Instruments DB feature disabled by configure script parameter"
     echo "yes"  
491  fi  fi
492  AM_CONDITIONAL(HAVE_SQLITE3, test $HAVE_SQLITE3 = 1)  AM_CONDITIONAL(HAVE_SQLITE3, test $HAVE_SQLITE3 = 1)
493  AC_DEFINE_UNQUOTED(HAVE_SQLITE3,$HAVE_SQLITE3,[Define to 1 if you have SQLITE3 installed.])  AC_DEFINE_UNQUOTED(HAVE_SQLITE3,$HAVE_SQLITE3,[Define to 1 if you want the instruments DB feature and have SQLITE3 installed.])
494    
 if test "$have_midi_input_driver" = "false"; then  
     echo "No supported MIDI input system found!"  
     echo "Sorry, LinuxSampler only supports the following MIDI drivers at the moment:"  
     echo "ALSA, MIDIShare, CoreMIDI."  
     echo "If you think you have one of those available on your system, make sure you"  
     echo "also have the respective development (header) files installed."  
     exit -1;  
 fi  
 if test "$have_audio_output_driver" = "false"; then  
     echo "No supported audio output system found!"  
     echo "Sorry, LinuxSampler only supports ALSA and JACK as audio output driver at the moment!"  
     exit -1;  
 fi  
495    
496    
497  ###########################################################################  ###########################################################################
# Line 266  fi Line 500  fi
500  # TODO: should we use AC_ARG_VAR(variable, description) instead?  # TODO: should we use AC_ARG_VAR(variable, description) instead?
501    
502  AC_ARG_ENABLE(asm,  AC_ARG_ENABLE(asm,
503    [  --enable-asm    [  --disable-asm
504                            Enable hand-crafted assembly optimizations                            Enable hand-crafted assembly optimizations
505                            (default=off). LinuxSampler provides CPU specific                            (default=on). LinuxSampler provides CPU specific
506                            assembly optimizations for the most important                            assembly optimizations. This is currently limited
507                            synthesis algorithms. This is currently disabled                            to just enter a fast (denormal) FPU mode on x86
508                            by default since current asm code is broken.],                            platforms. There are currently no synthesis core
509    [config_asm="yes"],                            assembly optimizations anymore since LS 0.4.0],
510    [config_asm="no"]    [config_asm="$enableval"],
511      [config_asm="yes"]
512  )  )
513  if test "$config_asm" = "yes"; then  if test "$config_asm" = "yes"; then
514    AC_DEFINE_UNQUOTED(CONFIG_ASM, 1, [Define to 1 if you want to enable hand-crafted asm optimizations.])    AC_DEFINE_UNQUOTED(CONFIG_ASM, 1, [Define to 1 if you want to enable asm optimizations.])
515  fi  fi
516    
517  AC_ARG_ENABLE(dev-mode,  AC_ARG_ENABLE(dev-mode,
518    [  --disable-dev-mode    [  --enable-dev-mode
519                            Disable development mode (default=on). In that mode                            Enable development mode (default=off). In that mode
520                            we do some extra sanity checks here and there.                            we do some extra sanity checks here and there.
521                            This helps to spot possible problems, but reduces                            This helps to spot possible problems, but reduces
522                            efficiency a bit],                            efficiency a bit],
523    [config_dev_mode="no"],    [config_dev_mode="$enableval"],
524    [config_dev_mode="yes"]    [config_dev_mode="no"]
525  )  )
526  if test "$config_dev_mode" = "yes"; then  if test "$config_dev_mode" = "yes"; then
527    AC_DEFINE_UNQUOTED(CONFIG_DEVMODE, 1, [Define to 1 if you want to enable development mode.])    AC_DEFINE_UNQUOTED(CONFIG_DEVMODE, 1, [Define to 1 if you want to enable development mode.])
# Line 313  AC_ARG_ENABLE(rt-exceptions, Line 548  AC_ARG_ENABLE(rt-exceptions,
548                            context as well. Otherwise if disabled                            context as well. Otherwise if disabled
549                            segmentation faults will be forced by the                            segmentation faults will be forced by the
550                            application on critical errors.],                            application on critical errors.],
551    [config_rt_exceptions="yes"],    [config_rt_exceptions="$enableval"],
552    [config_rt_exceptions="no"]    [config_rt_exceptions="no"]
553  )  )
554  if test "$config_rt_exceptions" = "yes"; then  if test "$config_rt_exceptions" = "yes"; then
555    AC_DEFINE_UNQUOTED(CONFIG_RT_EXCEPTIONS, 1, [Define to 1 to allow exceptions in the realtime context.])    AC_DEFINE_UNQUOTED(CONFIG_RT_EXCEPTIONS, 1, [Define to 1 to allow exceptions in the realtime context.])
556  fi  fi
557    
558    AC_ARG_ENABLE(pthread-testcancel,
559      [  --enable-pthread-testcancel
560                              Enable pthread_testcancel() calls and avoid asynchronous
561                              cancel of pthreads (default=no).],
562      [config_pthread_testcancel="$enableval"],
563      [config_pthread_testcancel="no"]
564    )
565    if test "$config_pthread_testcancel" = "yes"; then
566      AC_DEFINE_UNQUOTED(CONFIG_PTHREAD_TESTCANCEL, 1, [Define to 1 to enable pthread_testcancel() calls.])
567    fi
568    
569  AC_ARG_ENABLE(preload-samples,  AC_ARG_ENABLE(preload-samples,
570    [  --enable-preload-samples    [  --enable-preload-samples
571                            Due to seeking and latency issues with hard drives                            Due to seeking and latency issues with hard drives
# Line 458  AC_ARG_ENABLE(subfragment-size, Line 704  AC_ARG_ENABLE(subfragment-size,
704  )  )
705  AC_DEFINE_UNQUOTED(CONFIG_DEFAULT_SUBFRAGMENT_SIZE, $config_subfragment_size, [Define default subfragment size (in sample points).])  AC_DEFINE_UNQUOTED(CONFIG_DEFAULT_SUBFRAGMENT_SIZE, $config_subfragment_size, [Define default subfragment size (in sample points).])
706    
707  AC_ARG_ENABLE(global-attenuation,  AC_ARG_ENABLE(global-attenuation-default,
708    [  --enable-global-attenuation    [  --enable-global-attenuation-default
709                            To prevent clipping all samples will be lowered                            To prevent clipping all samples will be lowered
710                            in amplitude by this given factor.                            in amplitude by this given default factor (can
711                              be overridden at runtime).
712                            (default=0.35)],                            (default=0.35)],
713    [config_global_attenuation="${enableval}"],    [config_global_attenuation_default="${enableval}"],
714    [config_global_attenuation="0.35"]    [config_global_attenuation_default="0.35"]
715  )  )
716  AC_DEFINE_UNQUOTED(CONFIG_GLOBAL_ATTENUATION, $config_global_attenuation, [Define global volume attenuation (as floating point factor).])  AC_DEFINE_UNQUOTED(CONFIG_GLOBAL_ATTENUATION_DEFAULT, $config_global_attenuation_default, [Define default global volume attenuation (as floating point factor).])
717    
718  AC_ARG_ENABLE(voice-steal-algo,  AC_ARG_ENABLE(voice-steal-algo,
719    [  --enable-voice-steal-algo    [  --enable-voice-steal-algo
# Line 506  AC_ARG_ENABLE(force-filter, Line 753  AC_ARG_ENABLE(force-filter,
753                            If enabled will force filter to be used even if                            If enabled will force filter to be used even if
754                            no usage was define in instrument patch files.                            no usage was define in instrument patch files.
755                            (default=no).],                            (default=no).],
756    [config_force_filter="yes"],    [config_force_filter="$enableval"],
757    [config_force_filter="no"]    [config_force_filter="no"]
758  )  )
759  if test "$config_force_filter" = "yes"; then  if test "$config_force_filter" = "yes"; then
# Line 596  AC_ARG_ENABLE(gs-checksum, Line 843  AC_ARG_ENABLE(gs-checksum,
843                            messages which do not provide a correct checksum                            messages which do not provide a correct checksum
844                            will be ignored. This is disabled by default as                            will be ignored. This is disabled by default as
845                            not all devices honor GS checksums.],                            not all devices honor GS checksums.],
846    [config_assert_gs_sysex_checksum="yes"],    [config_assert_gs_sysex_checksum="$enableval"],
847    [config_assert_gs_sysex_checksum="no"]    [config_assert_gs_sysex_checksum="no"]
848  )  )
849  if test "config_assert_gs_sysex_checksum" = "yes"; then  if test "config_assert_gs_sysex_checksum" = "yes"; then
# Line 642  AC_ARG_ENABLE(signed-triang-algo, Line 889  AC_ARG_ENABLE(signed-triang-algo,
889                                Similar to intmath but uses abs() function.                                Similar to intmath but uses abs() function.
890                                Depending on compiler and platrofm this could                                Depending on compiler and platrofm this could
891                                perform better than integer math as it avoids                                perform better than integer math as it avoids
892                                an extra integer multiply instruction.                                an extra integer multiply instruction.
   
893                              diharmonic:                              diharmonic:
894                                The triangular wave will be approximated by adding two                                The triangular wave will be approximated by adding two
895                                sinusoidials. This solution might especially hurt on                                sinusoidials. This solution might especially hurt on
# Line 677  AC_ARG_ENABLE(unsigned-triang-algo, Line 923  AC_ARG_ENABLE(unsigned-triang-algo,
923                                Similar to intmath but uses abs() function.                                Similar to intmath but uses abs() function.
924                                Depending on compiler and platrofm this could                                Depending on compiler and platrofm this could
925                                perform better than integer math as it avoids                                perform better than integer math as it avoids
926                                an extra integer multiply instruction.                                an extra integer multiply instruction.
   
927                              diharmonic:                              diharmonic:
928                                The triangular wave will be approximated by adding two                                The triangular wave will be approximated by adding two
929                                sinusoidials. This solution might especially hurt on                                sinusoidials. This solution might especially hurt on
# Line 709  AC_ARG_ENABLE(process-muted-channels, Line 954  AC_ARG_ENABLE(process-muted-channels,
954                            will not discard notes, triggered in mute mode,                            will not discard notes, triggered in mute mode,
955                            when the channel is unmuted. But also will reduce                            when the channel is unmuted. But also will reduce
956                            the efficiency.],                            the efficiency.],
957    [config_process_muted_channels="yes"],    [config_process_muted_channels="$enableval"],
958    [config_process_muted_channels="no"]    [config_process_muted_channels="no"]
959  )  )
960  if test "$config_process_muted_channels" = "yes"; then  if test "$config_process_muted_channels" = "yes"; then
961    AC_DEFINE_UNQUOTED(CONFIG_PROCESS_MUTED_CHANNELS, 1, [Define to 1 if you want to enable processing of muted channels.])    AC_DEFINE_UNQUOTED(CONFIG_PROCESS_MUTED_CHANNELS, 1, [Define to 1 if you want to enable processing of muted channels.])
962  fi  fi
963    
964    AC_ARG_ENABLE(process-all-notes-off,
965      [  --disable-process-all-notes-off
966                              Disable interpretation of All-Notes-Off MIDI
967                              messages (default=on). By default LS will release
968                              all voices whenever it receives an All-Notes-Off
969                              MIDI message. You can disable this behavior, so
970                              that LS simply ignores such messages.],
971      [config_process_all_notes_off="$enableval"],
972      [config_process_all_notes_off="yes"]
973    )
974    if test "$config_process_all_notes_off" = "yes"; then
975      AC_DEFINE_UNQUOTED(CONFIG_PROCESS_ALL_NOTES_OFF, 1, [Define to 1 if you want to enable processing of All-Notes-Off MIDI messages.])
976    fi
977    
978  AC_ARG_ENABLE(interpolate-volume,  AC_ARG_ENABLE(interpolate-volume,
979    [  --disable-interpolate-volume    [  --disable-interpolate-volume
980                            Disable interpolation of volume modulation                            Disable interpolation of volume modulation
# Line 723  AC_ARG_ENABLE(interpolate-volume, Line 982  AC_ARG_ENABLE(interpolate-volume,
982                            generated by for example the envelope generator                            generated by for example the envelope generator
983                            will be smoother, minimizing the risk for audio                            will be smoother, minimizing the risk for audio
984                            clicks. Disable it to reduce CPU usage.],                            clicks. Disable it to reduce CPU usage.],
985    [config_interpolate_volume="no"],    [config_interpolate_volume="$enableval"],
986    [config_interpolate_volume="yes"]    [config_interpolate_volume="yes"]
987  )  )
988  if test "$config_interpolate_volume" = "yes"; then  if test "$config_interpolate_volume" = "yes"; then
989    AC_DEFINE_UNQUOTED(CONFIG_INTERPOLATE_VOLUME, 1, [Define to 1 if you want to enable interpolation of volume modulation.])    AC_DEFINE_UNQUOTED(CONFIG_INTERPOLATE_VOLUME, 1, [Define to 1 if you want to enable interpolation of volume modulation.])
990  fi  fi
991    
992    AC_ARG_ENABLE(plugin-dir,
993      [  --enable-plugin-dir
994                              Directory where the sampler shall look for potential plugins,
995                              that is 3rd party shared libraries that should be loaded by
996                              the sampler on startup. By default the sampler will search
997                              for plugins in the subdirectory "plugins" below its own
998                              library directory.
999                              (i.e. /usr/local/lib/linuxsampler/plugins)],
1000      [config_plugin_dir="${enableval}"],
1001      [config_plugin_dir="${libdir}/linuxsampler/plugins"]
1002    )
1003    AC_SUBST(config_plugin_dir)
1004    
1005    AC_ARG_ENABLE(default-instruments-db-location,
1006      [  --enable-default-instruments-db-location
1007                              Only when instruments DB feature is enabled: file name
1008                              which shall be taken as default location of the
1009                              instruments DB file. This location can still be
1010                              overridden at runtime with a command line switch.
1011                              (default: /var/lib/linuxsampler/instruments.db)],
1012      [config_default_instruments_db_file="${enableval}"],
1013      [config_default_instruments_db_file="/var/lib/linuxsampler/instruments.db"]
1014    )
1015    AC_DEFINE_UNQUOTED(
1016        CONFIG_DEFAULT_INSTRUMENTS_DB_LOCATION,
1017        "$config_default_instruments_db_file",
1018        [Only when instruments DB feature is enabled: default location of the DB file.]
1019    )
1020    AC_SUBST(config_default_instruments_db_file)
1021    
1022    
1023  ###########################################################################  ###########################################################################
1024  # Automatic Benchmarks (to detect the best algorithms for the system)  # Automatic Benchmarks (to detect the best algorithms for the system)
# Line 764  if test "$config_signed_triang_algo" = " Line 1053  if test "$config_signed_triang_algo" = "
1053          echo "Call './configure --help' for further information or read configure.in."          echo "Call './configure --help' for further information or read configure.in."
1054          exit -1;          exit -1;
1055      fi      fi
1056    else
1057        case "$config_signed_triang_algo" in
1058            intmath)
1059                triang_signed=2 ;;
1060            diharmonic)
1061                triang_signed=3 ;;
1062            intmathabs)
1063                triang_signed=5 ;;
1064        esac
1065  fi  fi
1066  AC_DEFINE_UNQUOTED(CONFIG_SIGNED_TRIANG_ALGO, ${triang_signed}, [Define signed triangular wave algorithm to be used.])  AC_DEFINE_UNQUOTED(CONFIG_SIGNED_TRIANG_ALGO, ${triang_signed}, [Define signed triangular wave algorithm to be used.])
1067    
# Line 795  if test "$config_unsigned_triang_algo" = Line 1093  if test "$config_unsigned_triang_algo" =
1093          echo "Call './configure --help' for further information or read configure.in."          echo "Call './configure --help' for further information or read configure.in."
1094          exit -1;          exit -1;
1095      fi      fi
1096    else
1097        case "$config_unsigned_triang_algo" in
1098            intmath)
1099                triang_unsigned=2 ;;
1100            diharmonic)
1101                triang_unsigned=3 ;;
1102            intmathabs)
1103                triang_unsigned=5 ;;
1104        esac
1105  fi  fi
1106  AC_DEFINE_UNQUOTED(CONFIG_UNSIGNED_TRIANG_ALGO, ${triang_unsigned}, [Define unsigned triangular wave algorithm to be used.])  AC_DEFINE_UNQUOTED(CONFIG_UNSIGNED_TRIANG_ALGO, ${triang_unsigned}, [Define unsigned triangular wave algorithm to be used.])
1107    
# Line 826  AC_OUTPUT( \ Line 1133  AC_OUTPUT( \
1133      man/Makefile \      man/Makefile \
1134      man/linuxsampler.1 \      man/linuxsampler.1 \
1135      src/Makefile \      src/Makefile \
1136        src/db/Makefile \
1137      src/network/Makefile \      src/network/Makefile \
1138      src/engines/Makefile \      src/engines/Makefile \
1139      src/engines/gig/Makefile \      src/engines/gig/Makefile \
1140      src/engines/common/Makefile \      src/engines/common/Makefile \
1141      src/common/Makefile src/lib/Makefile \      src/common/Makefile \
     src/lib/fileloader/Makefile \  
     src/lib/fileloader/libgig/Makefile \  
1142      src/testcases/Makefile \      src/testcases/Makefile \
1143      src/drivers/Makefile \      src/drivers/Makefile \
1144      src/drivers/audio/Makefile \      src/drivers/audio/Makefile \
1145      src/drivers/midi/Makefile \      src/drivers/midi/Makefile \
1146        src/plugins/Makefile \
1147      linuxsampler.spec \      linuxsampler.spec \
1148      debian/Makefile \      debian/Makefile \
1149      Artwork/Makefile \      Artwork/Makefile \
1150      scripts/Makefile \      scripts/Makefile \
1151      osx/Makefile \      osx/Makefile \
1152      osx/LinuxSampler.xcode/Makefile \      osx/linuxsampler.xcodeproj/Makefile \
1153      Documentation/Makefile \      Documentation/Makefile \
1154      Documentation/Engines/Makefile \      Documentation/Engines/Makefile \
1155      Documentation/Engines/gig/Makefile \      Documentation/Engines/gig/Makefile \
# Line 850  AC_OUTPUT( \ Line 1157  AC_OUTPUT( \
1157      Doxyfile \      Doxyfile \
1158  )  )
1159    
1160    # resolve all nested variables in '${config_plugin_dir}'
1161    # (merely for providing a human readable summary below)
1162    while test $config_plugin_dir != `eval echo ${config_plugin_dir}` ; do
1163            config_plugin_dir=`eval echo ${config_plugin_dir}`
1164    done
1165    
1166    
1167  ###########################################################################  ###########################################################################
1168  # Output All Configuration Options  # Output All Configuration Options
# Line 874  echo "# Stream Size: ${config_stream_siz Line 1187  echo "# Stream Size: ${config_stream_siz
1187  echo "# Maximum Disk Streams: ${config_max_streams}"  echo "# Maximum Disk Streams: ${config_max_streams}"
1188  echo "# Maximum Voices: ${config_max_voices}"  echo "# Maximum Voices: ${config_max_voices}"
1189  echo "# Default Subfragment Size: ${config_subfragment_size}"  echo "# Default Subfragment Size: ${config_subfragment_size}"
1190  echo "# Global Volume Attenuation: ${config_global_attenuation}"  echo "# Default Global Volume Attenuation: ${config_global_attenuation_default}"
1191  echo "# Voice Stealing Algorithm: ${config_voice_steal_algo}"  echo "# Voice Stealing Algorithm: ${config_voice_steal_algo}"
1192  echo "# Signed Triangular Oscillator Algorithm: ${config_signed_triang_algo}"  echo "# Signed Triangular Oscillator Algorithm: ${config_signed_triang_algo}"
1193  echo "# Unsigned Triangular Oscillator Algorithm: ${config_unsigned_triang_algo}"  echo "# Unsigned Triangular Oscillator Algorithm: ${config_unsigned_triang_algo}"
# Line 890  echo "# Override Filter Resonance Contro Line 1203  echo "# Override Filter Resonance Contro
1203  echo "# Override Filter Type: ${config_override_filter_type}"  echo "# Override Filter Type: ${config_override_filter_type}"
1204  echo "# Assert GS SysEx Checksum: ${config_assert_gs_sysex_checksum}"  echo "# Assert GS SysEx Checksum: ${config_assert_gs_sysex_checksum}"
1205  echo "# Process Muted Channels: ${config_process_muted_channels}"  echo "# Process Muted Channels: ${config_process_muted_channels}"
1206    echo "# Process All-Notes-Off MIDI message: ${config_process_all_notes_off}"
1207  echo "# Interpolate Volume: ${config_interpolate_volume}"  echo "# Interpolate Volume: ${config_interpolate_volume}"
1208    echo "# Instruments database support: ${config_instruments_db}"
1209    if test "$config_instruments_db" = "yes"; then
1210    echo "# Instruments DB default location: ${config_default_instruments_db_file}"
1211    fi
1212    echo "# Plugin Path: ${config_plugin_dir}"
1213  echo "#-------------------------------------------------------------------#"  echo "#-------------------------------------------------------------------#"
1214  echo "# Read './configure --help' or file 'configure.in' for details.     #"  echo "# Read './configure --help' or file 'configure.in' for details.     #"
1215  echo "#####################################################################"  echo "#####################################################################"

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

  ViewVC Help
Powered by ViewVC