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

Diff of /linuxsampler/trunk/configure.ac

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

linuxsampler/trunk/configure.in revision 692 by schoenebeck, Fri Jul 15 16:59:35 2005 UTC linuxsampler/trunk/configure.ac revision 2559 by schoenebeck, Sun May 18 17:38:25 2014 UTC
# Line 1  Line 1 
1  AC_INIT(configure.in)  #------------------------------------------------------------------------------------
2  AC_C_BIGENDIAN  # LinuxSampler's / liblinuxsampler's "official" release version:
3  AC_CANONICAL_SYSTEM  
4    m4_define(linuxsampler_release_major, 1)
5    m4_define(linuxsampler_release_minor, 0)
6    m4_define(linuxsampler_release_build, 0.svn39)
7    
8    
9    AC_INIT([linuxsampler],[linuxsampler_release_major.linuxsampler_release_minor.linuxsampler_release_build])
10    AC_CONFIG_SRCDIR([configure.ac])
11    
12    #------------------------------------------------------------------------------------
13    # The following is the libtool / shared library version. This doesn't have to
14    # do anything with the release version. It MUST conform to the following rules:
15    #
16    #  1. Start with version information of `0:0:0' for each libtool library.
17    #  2. Update the version information only immediately before a public release of
18    #     your software. More frequent updates are unnecessary, and only guarantee
19    #     that the current interface number gets larger faster.
20    #  3. If the library source code has changed at all since the last update, then
21    #     increment revision (`c:r:a' becomes `c:r+1:a').
22    #  4. If any interfaces have been added, removed, or changed since the last update,
23    #     increment current, and set revision to 0.
24    #  5. If any interfaces have been added since the last public release, then increment
25    #     age.
26    #  6. If any interfaces have been removed since the last public release, then set age
27    #     to 0.
28    
29    LIBLINUXSAMPLER_LT_CURRENT=3
30    LIBLINUXSAMPLER_LT_REVISION=0
31    LIBLINUXSAMPLER_LT_AGE=0
32    SHARED_VERSION_INFO="$LIBLINUXSAMPLER_LT_CURRENT:$LIBLINUXSAMPLER_LT_REVISION:$LIBLINUXSAMPLER_LT_AGE"
33    
34    #------------------------------------------------------------------------------------
35    # the LSCP specification version this LinuSampler release complies with:
36    
37    LSCP_RELEASE_MAJOR=1
38    LSCP_RELEASE_MINOR=6
39    
40    AC_DEFINE_UNQUOTED(LSCP_RELEASE_MAJOR, ${LSCP_RELEASE_MAJOR}, [LSCP spec major version this release complies with.])
41    AC_DEFINE_UNQUOTED(LSCP_RELEASE_MINOR, ${LSCP_RELEASE_MINOR}, [LSCP spec minor version this release complies with.])
42    
43    AC_PROG_CC
44    AC_PROG_CXX
45    AC_LIBTOOL_WIN32_DLL
46    AC_PROG_LIBTOOL
47    AC_PROG_YACC
48    
49  AC_SUBST(target)  AC_SUBST(SHLIB_VERSION_ARG)
50  AC_SUBST(target_alias)  AC_SUBST(SHARED_VERSION_INFO)
 AC_SUBST(target_cpu)  
 AC_SUBST(target_os)  
 AC_SUBST(target_vendor)  
51    
52    module=yes eval LIB_EXT=$shrext_cmds
53    AC_SUBST(LIB_EXT)
54    
55    AC_C_BIGENDIAN
56    AC_CANONICAL_HOST
57    
58    PKG_PROG_PKG_CONFIG
59    
60  ###########################################################################  ###########################################################################
61  # General Checks  # General Checks
62    
63    AM_CONDITIONAL(CROSS_COMPILING, test $cross_compiling = yes)
64    
65  AC_MSG_CHECKING([whether x86 architecture])  AC_MSG_CHECKING([whether x86 architecture])
66  def_arch_x86=0  def_arch_x86=0
67  case $target_cpu in  case $host_cpu in
68    "i386" | "i486" | "i586" | "i686" | "i786")    "i386" | "i486" | "i586" | "i686" | "i786" | "x86_64")
69      echo "yes"      echo "yes"
70      def_arch_x86=1;;      def_arch_x86=1;;
71    *)    *)
# Line 24  esac Line 74  esac
74  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.])
75    
76  # determine the right gcc switch for CPU specific optimizations  # determine the right gcc switch for CPU specific optimizations
77    # (only if the user did not provide one)
78  CXX_CPU_SWITCH=  CXX_CPU_SWITCH=
79  if test "$def_arch_x86" = 1; then  if ! echo "X $CXXFLAGS " | grep -q -- " \(-march=\|-mcpu=\|-mtune=\|-arch=\)" ; then
80    CXX_CPU_SWITCH="-march=$target_cpu"    if test "$def_arch_x86" = 1 -a "$host_cpu" != "x86_64"; then
81  elif test "$target_cpu" = "powerpc"; then      CXX_CPU_SWITCH="-march=$host_cpu"
82    CXX_CPU_SWITCH="-arch=$target_cpu"    elif test "$target_cpu" = "ppc"; then
83        CXX_CPU_SWITCH="-arch=$host_cpu"
84      fi
85  fi  fi
86  AC_SUBST([CXX_CPU_SWITCH])  AC_SUBST([CXX_CPU_SWITCH])
87    
88    mac=no
89    linux=no
90    case "$host" in
91        *-*-darwin*)
92            mac=yes
93            ;;
94        *-*-linux*)
95            linux=yes
96            ;;
97    esac
98    AM_CONDITIONAL(LINUX, test "$linux" = yes)
99    AM_CONDITIONAL(MAC, test "$mac" = yes)
100    
101    # check if we're on MS Windows
102    AC_CHECK_HEADERS(
103        mmsystem.h,
104        have_windows=1,
105        have_windows=0,
106        [#include <windef.h>]
107    )
108    AM_CONDITIONAL(HAVE_WINDOWS, test $have_windows = "1")
109    
110  AC_MSG_CHECKING([whether UNIX98 compatible])  AC_MSG_CHECKING([whether UNIX98 compatible])
111  AC_LANG_SAVE  AC_LANG_PUSH([C])
112  AC_LANG_C  AC_RUN_IFELSE([AC_LANG_SOURCE([[
 AC_TRY_RUN([  
113  #ifndef _GNU_SOURCE  #ifndef _GNU_SOURCE
114  #define _GNU_SOURCE 1  #define _GNU_SOURCE 1
115  #endif  #endif
# Line 47  exit(0); /* UNIX98 compatible */ Line 121  exit(0); /* UNIX98 compatible */
121  exit(-1); /* not UNIX98 compatible */  exit(-1); /* not UNIX98 compatible */
122  #endif  #endif
123  }  }
124  ],  ]])],
125  have_unix98="yes",  have_unix98="yes",
126  have_unix98="no",  have_unix98="no",
127  have_unix98="no"  have_unix98="no"
128  )  )
129  AC_LANG_RESTORE  AC_LANG_POP([C])
130  AC_MSG_RESULT([$have_unix98])  AC_MSG_RESULT([$have_unix98])
131  if test "$have_unix98" = "no"; then  if test "$have_unix98" = "no" -a "$have_windows" = "0" -a "$mac" = "no" ; then
132      if test "x$HAVE_UNIX98" = "x"; then      if test "x$HAVE_UNIX98" = "x"; then
133          echo "LinuxSampler only runs on UNIX98 compatible systems, which is mandatory for"          echo "LinuxSampler only runs on UNIX98 compatible systems, which is mandatory for"
134          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"
135          echo "./configure with environment variable HAVE_UNIX98=1 in case you think you          echo "./configure with environment variable HAVE_UNIX98=1 in case you think you"
136          echo "have a UNIX98 compatible system."          echo "have a UNIX98 compatible system."
137          exit -1;          exit -1;
138      fi      fi
139  fi  fi
140    
141    # check for <features.h>
142    AC_CHECK_HEADERS(features.h)
143    
144    # test for POSIX thread library
145    m4_ifdef([m4_include(m4/pthread.m4)],,
146                 [sinclude([m4/pthread.m4])])
147    ACX_PTHREAD
148    LIBS="$PTHREAD_LIBS $LIBS"
149    CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
150    CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS"
151    CC="$PTHREAD_CC"
152    
153    # check for a bug in NPTL-enabled glibc
154    # (see Gentoo bug report #194076)
155    AC_ARG_ENABLE(nptl-bug-check,
156      [  --disable-nptl-bug-check
157                              Disable check for a bug in certain NPTL-enabled
158                              glibc versions that caused crashs.],
159      [config_check_nptl_bug="$enableval"],
160      [config_check_nptl_bug="yes"]
161    )
162    if test "$config_check_nptl_bug" = "yes"; then
163        m4_ifdef([m4_include(m4/nptl_bug.m4)],,
164                 [sinclude([m4/nptl_bug.m4])])
165        ACX_NPTL_GLIBC_BUG([
166            echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
167            echo "You seem to have a buggy PTHREAD library! LinuxSampler would"
168            echo "probably crash due to this. Please report us the system you are"
169            echo "using and/or file a bug report to the bug tracking system of"
170            echo "your distribution."
171            echo "If you have a NPTL-enabled glibc AND it was compiled for TLS as"
172            echo "well, you can try to circumvent this problem for now by setting"
173            echo "the environment variable LD_ASSUME_KERNEL=\"2.4.1\" , which"
174            echo "should cause this test to pass."
175            echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
176            AC_MSG_ERROR([possibly NPTL glibc bug detected])
177        ])
178    else
179        echo "NPTL glibc bug check disabled"
180    fi
181    
182    # FIXME: this is actually a dependency of libgig, not of LS directly, why
183    # isn't it hidden by libgig?
184    AC_CHECK_HEADERS(uuid/uuid.h)
185    AC_SEARCH_LIBS(uuid_generate, uuid)
186    
187    # In case Bison is available, determine the exact version, since we need to
188    # use different custom parser code for Bison 2.x vs. Bison 3.x generated
189    # parser yacc tables.
190    if echo "$YACC" | grep -q bison; then
191        # NOTE: m4 removes [], that's why it needs to be escaped
192        bison_version=[`$YACC --version | head -n 1 | sed -e 's/[^0-9.]*\([-0-9.]\+\)$/\1/'`]
193        bison_version_major=`echo $bison_version | cut -d. -f1`
194        bison_version_minor=`echo $bison_version | cut -d. -f2`
195        AC_DEFINE_UNQUOTED(HAVE_BISON_MAJ,$bison_version_major,[Define to the major version of the GNU Bison program installed.])
196        AC_DEFINE_UNQUOTED(HAVE_BISON_MIN,$bison_version_minor,[Define to the minor version of the GNU Bison program installed.])
197    fi
198    
199    
200    
201    ###########################################################################
202  # Checks for available audio and MIDI systems / drivers  # Checks for available audio and MIDI systems / drivers
203  # (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)
204    
205  have_midi_input_driver="false"  have_midi_input_driver="false"
206  have_audio_output_driver="false"  have_audio_output_driver="false"
207    
208  AC_CHECK_HEADER(alsa/asoundlib.h,  # ALSA
209      AC_CHECK_LIB(asound, main,  AC_ARG_ENABLE(alsa-driver,
210                               have_alsa=1    [  --disable-alsa-driver
211                               ,                            Disable support for the Advanced Linux Sound
212                               have_alsa=0                            Architecture (ALSA).],
213                  )    [config_alsa_driver="$enableval"],
214                  ,    [config_alsa_driver="yes"]
215                  have_alsa=0  )
216  )  have_alsa=0
217  if test "$have_alsa" = "1"; then  if test "$config_alsa_driver" = "yes"; then
218      have_midi_input_driver="true"      AC_CHECK_HEADER(alsa/asoundlib.h,
219      have_audio_output_driver="true";          AC_CHECK_LIB(asound, main,
220                                     have_alsa=1
221                                     ,
222                                     have_alsa=0
223                        )
224                        ,
225                        have_alsa=0
226        )
227        if test "$have_alsa" = "1"; then
228            have_midi_input_driver="true"
229            have_audio_output_driver="true";
230        fi
231    
232        echo -n "checking Alsa version... "
233        AC_LANG_PUSH([C])
234        AC_RUN_IFELSE([AC_LANG_SOURCE([[
235            #include <alsa/asoundlib.h>
236            void main(void) {
237                /* ensure backward compatibility */
238                #if !defined(SND_LIB_MAJOR) && defined(SOUNDLIB_VERSION_MAJOR)
239                #define SND_LIB_MAJOR SOUNDLIB_VERSION_MAJOR
240                #endif
241                exit(SND_LIB_MAJOR);
242            }
243        ]])],
244        alsa_major=0,
245        alsa_major=$?,
246        alsa_major=0
247        )
248        AC_RUN_IFELSE([AC_LANG_SOURCE([[
249            #include <alsa/asoundlib.h>
250            void main(void) {
251                /* ensure backward compatibility */
252                #if !defined(SND_LIB_MINOR) && defined(SOUNDLIB_VERSION_MINOR)
253                #define SND_LIB_MINOR SOUNDLIB_VERSION_MINOR
254                #endif
255                exit(SND_LIB_MINOR);
256            }
257        ]])],
258        alsa_minor=0,
259        alsa_minor=$?,
260        alsa_minor=0
261        )
262        AC_RUN_IFELSE([AC_LANG_SOURCE([[
263            #include <alsa/asoundlib.h>
264            void main(void) {
265                /* ensure backward compatibility */
266                #if !defined(SND_LIB_SUBMINOR) && defined(SOUNDLIB_VERSION_SUBMINOR)
267                #define SND_LIB_SUBMINOR SOUNDLIB_VERSION_SUBMINOR
268                #endif
269                exit(SND_LIB_SUBMINOR);
270            }
271        ]])],
272        alsa_subminor=0,
273        alsa_subminor=$?,
274        alsa_subminor=0
275        )
276        AC_LANG_POP([C])
277        echo "$alsa_major.$alsa_minor.$alsa_subminor";
278        AC_DEFINE_UNQUOTED(ALSA_MAJOR,$alsa_major,[Define to the major version number of your Alsa installation.])
279        AC_DEFINE_UNQUOTED(ALSA_MINOR,$alsa_minor,[Define to the minor version number of your Alsa installation.])
280        AC_DEFINE_UNQUOTED(ALSA_SUBMINOR,$alsa_subminor,[Define to the subminor version number of your Alsa installation.])
281    else
282        echo "ALSA support disabled by configure script parameter"
283  fi  fi
284  AM_CONDITIONAL(HAVE_ALSA, test $have_alsa = "1")  AM_CONDITIONAL(HAVE_ALSA, test $have_alsa = "1")
285  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.])
286    config_have_alsa="no"
287  echo -n "checking Alsa version... "  if test $have_alsa = "1"; then
288  AC_LANG_SAVE      config_have_alsa="yes"
289  AC_LANG_C  fi
 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.])  
290    
291  # JACK  # JACK
292  PKG_CHECK_MODULES(JACK, jack, HAVE_JACK=true, HAVE_JACK=false)  AC_ARG_ENABLE(jack-driver,
293  AC_SUBST(JACK_LIBS)    [  --disable-jack-driver
294  AC_SUBST(JACK_CFLAGS)                            Disable support for the Jack Audio Connection Kit
295  if test $HAVE_JACK = false; then                            (JACK).],
296      HAVE_JACK=0;    [config_jack_driver="$enableval"],
297  else    [config_jack_driver="yes"]
298      HAVE_JACK=1  )
299      have_audio_output_driver="true";  have_jack=0
300      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
301        PKG_CHECK_MODULES(JACK, jack, have_jack=1, have_jack=0)
302        if test $have_jack = "1"; then
303            AC_SUBST(JACK_LIBS)
304            AC_SUBST(JACK_CFLAGS)
305            linuxsampler_save_LIBS=$LIBS
306            LIBS="$JACK_LIBS $LIBS"
307            AC_CHECK_FUNCS(jack_client_name_size jack_client_open \
308                           jack_on_info_shutdown)
309            LIBS=$linuxsampler_save_LIBS
310            have_audio_output_driver="true";
311        fi
312    else
313        echo "JACK support disabled by configure script parameter"
314    fi
315    AM_CONDITIONAL(HAVE_JACK, test $have_jack = "1")
316    AC_DEFINE_UNQUOTED(HAVE_JACK,$have_jack,[Define to 1 if you have JACK installed.])
317    config_have_jack="no"
318    if test $have_jack = "1"; then
319        config_have_jack="yes"
320    fi
321    
322    # JACK MIDI
323    have_jack_midi=0
324    if test $have_jack = "1"; then
325        linuxsampler_save_CFLAGS=$CFLAGS
326        linuxsampler_save_LIBS=$LIBS
327        CFLAGS="$JACK_CFLAGS $CFLAGS"
328        LIBS="$JACK_LIBS $LIBS"
329        AC_CHECK_HEADER(jack/midiport.h, have_jack_midi=1, have_jack_midi=0)
330        if test $have_jack_midi = "1"; then
331            AC_CHECK_FUNCS(jack_midi_get_event_count)
332            AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <jack/midiport.h>]], [[
333                jack_midi_clear_buffer(0, 0);
334            ]])], [AC_DEFINE(JACK_MIDI_FUNCS_NEED_NFRAMES, 1,
335                      [Define to 1 if you have the old jack midi functions that need an nframes argument.])])
336            have_midi_input_driver="true"
337        fi
338        CFLAGS=$linuxsampler_save_CFLAGS
339        LIBS=$linuxsampler_save_LIBS
340    fi
341    AM_CONDITIONAL(HAVE_JACK_MIDI, test $have_jack_midi = "1")
342    AC_DEFINE_UNQUOTED(HAVE_JACK_MIDI, $have_jack_midi,
343                       [Define to 1 if you have JACK with MIDI support installed.])
344    config_have_jack_midi="no"
345    if test $have_jack_midi = "1"; then
346        config_have_jack_midi="yes"
347    fi
348    
349    # ARTS
350    AC_ARG_ENABLE(arts-driver,
351      [  --disable-arts-driver
352                              Disable support for the Analogue Realtime System
353                              (aRts).],
354      [config_arts_driver="$enableval"],
355      [config_arts_driver="yes"]
356    )
357    have_arts=0
358    if test "$config_arts_driver" = "yes"; then
359        m4_ifdef([m4_include(m4/arts.m4)],,
360                 [sinclude([m4/arts.m4])])
361        AM_PATH_ARTS(0.9.5, have_arts=1, have_arts=0)
362        if test "$have_arts" = "1"; then
363            have_audio_output_driver="true"
364        fi
365    else
366        echo "ARTS support disabled by configure script parameter"
367    fi
368    AM_CONDITIONAL(HAVE_ARTS, test "$have_arts" = "1")
369    AC_DEFINE_UNQUOTED(HAVE_ARTS,$have_arts,[Define to 1 if you have aRts installed.])
370    config_have_arts="no"
371    if test $have_arts = "1"; then
372        config_have_arts="yes"
373    fi
374    
375    # ASIO AUDIO (Win32)
376    AC_ARG_ENABLE(asiosdk-dir,
377      [  --enable-asiosdk-dir
378                              Directory where the ASIO SDK is located, this automatically
379                              enables the compilation of the ASIO audio output driver.],
380      [config_asiosdk_dir="${enableval}"],
381      [config_asiosdk_dir="."]
382    )
383    AC_SUBST(config_asiosdk_dir)
384    
385    AC_ARG_ENABLE(asio-driver,
386      [  --disable-asio-driver
387                              Disable support for the Windows ASIO driver.],
388      [config_asio_driver="$enableval"],
389      [config_asio_driver="yes"]
390    )
391    have_asio=0
392    ASIOSDK_BASEDIR=
393    if test "$config_asio_driver" = "yes"; then
394        asiosdk_headerfile=$config_asiosdk_dir/ASIOSDK2/common/asio.h
395        echo -n "checking for ASIO headerfile: $asiosdk_headerfile ...."
396        if test -e $asiosdk_headerfile ; then
397            echo yes
398            have_asio=1
399            ASIOSDK_BASEDIR="$config_asiosdk_dir"
400        else
401            echo no
402            have_asio=0
403        fi
404        if test "$have_asio" = "1"; then
405            have_audio_output_driver="true"
406        fi
407    else
408        echo "Windows ASIO support disabled by configure script parameter"
409    fi
410    AC_SUBST(ASIOSDK_BASEDIR)
411    AM_CONDITIONAL(HAVE_ASIO, test $have_asio = "1")
412    AC_DEFINE_UNQUOTED(HAVE_ASIO,$have_asio,[Define to 1 if you have ASIO installed.])
413    config_have_asio="no"
414    if test $have_asio = "1"; then
415        config_have_asio="yes"
416  fi  fi
 AM_CONDITIONAL(HAVE_JACK, test $HAVE_JACK = 1)  
 AC_DEFINE_UNQUOTED(HAVE_JACK,$HAVE_JACK,[Define to 1 if you have JACK installed.])  
417    
418  # MidiShare (Linux, OS X, Windows)  # MidiShare (Linux, OS X, Windows)
419  AC_CHECK_HEADER(MidiShare.h,  AC_ARG_ENABLE(midishare-driver,
420      AC_CHECK_LIB(MidiShare, MidiCountEvs,    [  --disable-midishare-driver
421                              have_midishare=1,                            Disable support for the MidiShare system.],
422                              have_midishare=0    [config_midishare_driver="$enableval"],
423                  )    [config_midishare_driver="yes"]
424                  ,  )
425                  have_midishare=0  have_midishare=0
426  )  if test "$config_midishare_driver" = "yes"; then
427  if test "$have_midishare" = "1"; then      AC_CHECK_HEADER(MidiShare.h,
428      have_midi_input_driver="true"          AC_CHECK_LIB(MidiShare, MidiCountEvs,
429                                    have_midishare=1,
430                                    have_midishare=0
431                        )
432                        ,
433                        have_midishare=0
434        )
435        if test "$have_midishare" = "1"; then
436            have_midi_input_driver="true"
437        fi
438    else
439        echo "MidiShare support disabled by configure script parameter"
440  fi  fi
441  AM_CONDITIONAL(HAVE_MIDISHARE, test $have_midishare = "1")  AM_CONDITIONAL(HAVE_MIDISHARE, test $have_midishare = "1")
442  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.])
443    config_have_midishare="no"
444    if test $have_midishare = "1"; then
445        config_have_midishare="yes"
446    fi
447    
448  # CoreMIDI (OS X)  # CoreMIDI (OS X)
449  AC_CHECK_HEADER(CoreMIDI/CoreMIDI.h,  AC_ARG_ENABLE(coremidi-driver,
450                  have_coremidi=1,    [  --disable-coremidi-driver
451                  have_coremidi=0                            Disable support for the Apple CoreMIDI system.],
452  )    [config_coremidi_driver="$enableval"],
453  if test "$have_coremidi" = "1"; then    [config_coremidi_driver="yes"]
454      have_midi_input_driver="true"  )
455    have_coremidi=0
456    if test "$config_coremidi_driver" = "yes"; then
457        AC_CHECK_HEADER(CoreMIDI/CoreMIDI.h,
458            have_coremidi=1,
459            have_coremidi=0
460        )
461        if test "$have_coremidi" = "1"; then
462            have_midi_input_driver="true"
463        fi
464    else
465        echo "CoreMIDI support disabled by configure script parameter"
466  fi  fi
467  AM_CONDITIONAL(HAVE_COREMIDI, test $have_coremidi = "1")  AM_CONDITIONAL(HAVE_COREMIDI, test $have_coremidi = "1")
468  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.])
469    config_have_coremidi="no"
470    if test $have_coremidi = "1"; then
471        config_have_coremidi="yes"
472    fi
473    
474  # Check presence of libgig  # CoreAudio (OS X)
475  libgig_version="2.0.1"  AC_ARG_ENABLE(coreaudio-driver,
476  PKG_CHECK_MODULES(GIG, gig >= $libgig_version, HAVE_GIG=true, HAVE_GIG=false)    [  --disable-coreaudio-driver
477  if test "$HAVE_GIG" = "false"; then                            Disable support for the Apple CoreAudio system.],
478      echo "Required libgig version not found!"    [config_coreaudio_driver="$enableval"],
479      echo "You need to have libgig version ${libgig_version} installed!"    [config_coreaudio_driver="yes"]
480      exit -1;  )
481    have_coreaudio=0
482    if test "$config_coreaudio_driver" = "yes"; then
483        AC_CHECK_HEADER(CoreAudio/CoreAudio.h,
484            have_coreaudio=1,
485            have_coreaudio=0
486        )
487        if test "$have_coreaudio" = "1"; then
488            have_audio_output_driver="true"
489        fi
490    else
491        echo "CoreAudio support disabled by configure script parameter"
492    fi
493    AM_CONDITIONAL(HAVE_COREAUDIO, test $have_coreaudio = "1")
494    AC_DEFINE_UNQUOTED(HAVE_COREAUDIO,$have_coreaudio,[Define to 1 if you have CoreAudio installed.])
495    config_have_coreaudio="no"
496    if test $have_coreaudio = "1"; then
497        config_have_coreaudio="yes"
498  fi  fi
 AC_SUBST(GIG_CFLAGS)  
 AC_SUBST(GIG_LIBS)  
499    
500  # SQLITE3  # MME MIDI (Win32)
501  PKG_CHECK_MODULES(SQLITE3, sqlite3, HAVE_SQLITE3=true, HAVE_SQLITE3=false)  AC_ARG_ENABLE(mmemidi-driver,
502  AC_SUBST(SQLITE3_LIBS)    [  --disable-mmemidi-driver
503  AC_SUBST(SQLITE3_CFLAGS)                            Disable support for the Windows MME MIDI system.],
504  if test $HAVE_SQLITE3 = false; then    [config_mmemidi_driver="$enableval"],
505      HAVE_SQLITE3=0;    [config_mmemidi_driver="yes"]
506    )
507    have_mmemidi=0
508    if test "$config_mmemidi_driver" = "yes"; then
509        AC_CHECK_HEADERS(mmsystem.h,
510            have_mmemidi=1,
511            have_mmemidi=0
512        )
513        if test "$have_mmemidi" = "1"; then
514            have_midi_input_driver="true"
515        fi
516  else  else
517      HAVE_SQLITE3=1      echo "MME MIDI support disabled by configure script parameter"
518  fi  fi
519  AM_CONDITIONAL(HAVE_SQLITE3, test $HAVE_SQLITE3 = 1)  AM_CONDITIONAL(HAVE_MME_MIDI, test $have_mmemidi = "1")
520  AC_DEFINE_UNQUOTED(HAVE_SQLITE3,$HAVE_SQLITE3,[Define to 1 if you have SQLITE3 installed.])  AC_DEFINE_UNQUOTED(HAVE_MME_MIDI,$have_mmemidi,[Define to 1 if you have MME MIDI installed.])
521    config_have_mme="no"
522    if test $have_mmemidi = "1"; then
523        config_have_mme="yes"
524    fi
525    
526    # DSSI
527    AC_CHECK_HEADERS(dssi.h,
528            config_have_dssi="yes",
529            config_have_dssi="no")
530    AM_CONDITIONAL(HAVE_DSSI, test $config_have_dssi = "yes")
531    
532    # LV2
533    PKG_CHECK_MODULES(LV2, lv2 >= 1.0.0, config_have_lv2="yes", config_have_lv2="no")
534    AC_SUBST(LV2_CFLAGS)
535    AC_SUBST(LV2_LIBS)
536    AM_CONDITIONAL(HAVE_LV2, test $config_have_lv2 = "yes")
537    
538    # VST
539    AC_ARG_ENABLE(vstsdk-dir,
540      [  --enable-vstsdk-dir
541                              Directory where the VST SDK is located.
542                              This automatically enables the compilation
543                              of the VST plugin.],
544      [VSTSDK_DIR="${enableval}"],
545      [VSTSDK_DIR=]
546    )
547    AC_SUBST(VSTSDK_DIR)
548    AM_CONDITIONAL(HAVE_VST, test "x$VSTSDK_DIR" != "x")
549    config_have_vst="no"
550    if test "x$VSTSDK_DIR" != "x"; then
551        config_have_vst="yes"
552    fi
553    
554    # AU
555    AC_CHECK_HEADERS(AudioUnit/AudioUnit.h,
556            config_have_au="yes",
557            config_have_au="no")
558    AM_CONDITIONAL(HAVE_AU, test $config_have_au = "yes")
559    AM_CONDITIONAL(HAVE_AUFLAGS, test "$AUFLAGS" != "")
560    
561    if test $config_have_au = "yes" ; then
562        if test "x$DEVELOPER_EXTRAS_DIR" = "x" ; then
563            if test -d /Developer/Extras ; then
564                DEVELOPER_EXTRAS_DIR=/Developer/Extras
565            else      
566                DEVELOPER_EXTRAS_DIR=/Developer/Examples
567            fi
568        fi
569        AC_SUBST(DEVELOPER_EXTRAS_DIR)
570    fi
571    
572    if test "x$MAC_PLUGIN_INSTALL_DIR" = "x" ; then
573        MAC_PLUGIN_INSTALL_DIR=/Library/Audio/Plug-Ins
574    fi
575    AC_SUBST(MAC_PLUGIN_INSTALL_DIR)
576    
577    # have we found at least one MIDI input and one audio output driver ?
578  if test "$have_midi_input_driver" = "false"; then  if test "$have_midi_input_driver" = "false"; then
579      echo "No supported MIDI input system found!"      echo "No supported MIDI input system found!"
580      echo "Sorry, LinuxSampler only supports the following MIDI drivers at the moment:"      echo "Sorry, LinuxSampler only supports the following MIDI drivers at the moment:"
581      echo "ALSA, MIDIShare, CoreMIDI."      echo "ALSA, JACK, MIDIShare, CoreMIDI, MME."
582      echo "If you think you have one of those available on your system, make sure you"      echo "If you think you have one of those available on your system, make sure you"
583      echo "also have the respective development (header) files installed."      echo "also have the respective development (header) files installed."
584      exit -1;      exit -1;
585  fi  fi
586  if test "$have_audio_output_driver" = "false"; then  if test "$have_audio_output_driver" = "false"; then
587      echo "No supported audio output system found!"      echo "No supported audio output system found!"
588      echo "Sorry, LinuxSampler only supports ALSA and JACK as audio output driver at the moment!"      echo "Sorry, LinuxSampler only supports ALSA, JACK, ARTS and ASIO as audio output"
589        echo "driver at the moment!"
590      exit -1;      exit -1;
591  fi  fi
592    
593    
594    
595    ###########################################################################
596    # Checks for various DLL libraries
597    
598    # Check presence of libgig
599    libgig_version="3.3.0"
600    PKG_CHECK_MODULES(GIG, gig >= $libgig_version, HAVE_GIG=true, HAVE_GIG=false)
601    if test "$HAVE_GIG" = "false"; then
602        echo "Required libgig version not found!"
603        echo "You need to have libgig version ${libgig_version} installed!"
604        exit -1;
605    else
606        echo "yes, found libgig $libgig_version"
607    fi
608    AC_SUBST(GIG_CFLAGS)
609    AC_SUBST(GIG_LIBS)
610    
611    # SF2 Engine (requires libgig)
612    AC_ARG_ENABLE(sf2-engine,
613      [  --disable-sf2-engine
614                              Disable compilation of the SF2 engine.
615                              You need to have libgig installed.],
616      [config_sf2_engine="$enableval"],
617      [config_sf2_engine="yes"]
618    )
619    HAVE_SF2=0;
620    if test "$config_sf2_engine" = "yes"; then
621        HAVE_SF2=1
622    else
623        echo "SF2 engine disabled by configure script parameter"
624    fi
625    AM_CONDITIONAL(HAVE_SF2, test $HAVE_SF2 = 1)
626    AC_DEFINE_UNQUOTED(HAVE_SF2,$HAVE_SF2,[Define to 1 if you want SF2 engine and have libsf2 installed.])
627    config_have_sf2="no"
628    if test $HAVE_SF2 = "1"; then
629        config_have_sf2="yes"
630    fi
631    
632    # Check presence of libsndfile
633    libsndfile_version="1.0"
634    PKG_CHECK_MODULES(SNDFILE, sndfile >= $libsndfile_version, HAVE_SNDFILE=true, HAVE_SNDFILE=false)
635    if test "$HAVE_SNDFILE" = "false"; then
636        echo "Required libsndfile version not found!"
637        echo "You need to have libsndfile version ${libsndfile_version} installed!"
638        exit -1;
639    else
640        echo "yes, found libsndfile $libsndfile_version"
641    fi
642    AC_SUBST(SNDFILE_CFLAGS)
643    AC_SUBST(SNDFILE_LIBS)
644    
645    # Check for Vorbis and FLAC support in libsndfile
646    linuxsampler_save_CFLAGS=$CFLAGS
647    CFLAGS="$SNDFILE_CFLAGS $CFLAGS"
648    AC_CHECK_DECLS([SF_FORMAT_VORBIS, SF_FORMAT_FLAC], [], [], [[#include <sndfile.h>]])
649    
650    # Check for loop functionality in libsndfile
651    AC_CHECK_MEMBERS([SF_INSTRUMENT.loops],,
652                     [AC_MSG_WARN([Your version of libsndfile does not support
653        reading of loop information. LinuxSampler will not be able to
654        extract loop information from sample files.])],
655                     [#include <sndfile.h>])
656    CFLAGS=$linuxsampler_save_CFLAGS
657    
658    # Instruments DB feature (requires SQLite 3.3)
659    AC_ARG_ENABLE(instruments-db,
660      [  --disable-instruments-db
661                              Disable compilation of the sampler's instruments
662                              database feature. You need to have SQLite 3.3
663                              or younger installed for this feature.],
664      [config_instruments_db="$enableval"],
665      [config_instruments_db="yes"]
666    )
667    HAVE_SQLITE3=0;
668    if test "$config_instruments_db" = "yes"; then
669        # Check presence of sqlite3
670        sqlite_version="3.3"
671        PKG_CHECK_MODULES(SQLITE3, sqlite3 >= $sqlite_version, HAVE_SQLITE3=true, HAVE_SQLITE3=false)
672        AC_SUBST(SQLITE3_LIBS)
673        AC_SUBST(SQLITE3_CFLAGS)
674        if test $HAVE_SQLITE3 = false; then
675            HAVE_SQLITE3=0
676            config_instruments_db="no"
677            echo "*** Required sqlite version not found!"
678            echo "*** You need to have sqlite version ${sqlite_version} or higher"
679            echo "*** for instruments database support to be enabled."
680            echo "*** Support for instruments DB will be disabled!"
681        else
682            HAVE_SQLITE3=1
683        fi
684    else
685        echo "Instruments DB feature disabled by configure script parameter"
686    fi
687    AM_CONDITIONAL(HAVE_SQLITE3, test $HAVE_SQLITE3 = 1)
688    AC_DEFINE_UNQUOTED(HAVE_SQLITE3,$HAVE_SQLITE3,[Define to 1 if you want the instruments DB feature and have SQLITE3 installed.])
689    
690    
691    
692  ###########################################################################  ###########################################################################
693  # Handle Configuration Options  # Handle Configuration Options
694    
# Line 221  fi Line 696  fi
696    
697  AC_ARG_ENABLE(asm,  AC_ARG_ENABLE(asm,
698    [  --disable-asm    [  --disable-asm
699                            Disable hand-crafted assembly optimizations                            Enable hand-crafted assembly optimizations
700                            (default=on). LinuxSampler provides CPU specific                            (default=on). LinuxSampler provides CPU specific
701                            assembly optimizations for the most important                            assembly optimizations. This is currently limited
702                            synthesis algorithms. You usually don't want to                            to just enter a fast (denormal) FPU mode on x86
703                            disable that.],                            platforms. There are currently no synthesis core
704    [config_asm="no"],                            assembly optimizations anymore since LS 0.4.0],
705      [config_asm="$enableval"],
706    [config_asm="yes"]    [config_asm="yes"]
707  )  )
708  if test "$config_asm" = "yes"; then  if test "$config_asm" = "yes"; then
709    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.])
710  fi  fi
711    
712  AC_ARG_ENABLE(dev-mode,  AC_ARG_ENABLE(dev-mode,
713    [  --enable-dev-mode    [  --enable-dev-mode
714                            Enable development mode (default=no). In that mode                            Enable development mode (default=off). In that mode
715                            we do some extra sanity checks here and there.                            we do some extra sanity checks here and there.
716                            This helps to spot possible problems, but reduces                            This helps to spot possible problems, but reduces
717                            efficiency a bit],                            efficiency a bit],
718    [config_dev_mode="yes"],    [config_dev_mode="$enableval"],
719    [config_dev_mode="no"]    [config_dev_mode="no"]
720  )  )
721  if test "$config_dev_mode" = "yes"; then  if test "$config_dev_mode" = "yes"; then
# Line 267  AC_ARG_ENABLE(rt-exceptions, Line 743  AC_ARG_ENABLE(rt-exceptions,
743                            context as well. Otherwise if disabled                            context as well. Otherwise if disabled
744                            segmentation faults will be forced by the                            segmentation faults will be forced by the
745                            application on critical errors.],                            application on critical errors.],
746    [config_rt_exceptions="yes"],    [config_rt_exceptions="$enableval"],
747    [config_rt_exceptions="no"]    [config_rt_exceptions="no"]
748  )  )
749  if test "$config_rt_exceptions" = "yes"; then  if test "$config_rt_exceptions" = "yes"; then
750    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.])
751  fi  fi
752    
753    config_pthread_testcancel="$mac"
754    AC_ARG_ENABLE(pthread-testcancel,
755      [  --enable-pthread-testcancel
756                              Enable pthread_testcancel() calls and avoid
757                              asynchronous cancel of pthreads (default=yes
758                              for Mac targets, no otherwise).],
759      [config_pthread_testcancel="$enableval"],
760      [])
761    if test "$config_pthread_testcancel" = "yes"; then
762      AC_DEFINE_UNQUOTED(CONFIG_PTHREAD_TESTCANCEL, 1, [Define to 1 to enable pthread_testcancel() calls.])
763    fi
764    
765  AC_ARG_ENABLE(preload-samples,  AC_ARG_ENABLE(preload-samples,
766    [  --enable-preload-samples    [  --enable-preload-samples
767                            Due to seeking and latency issues with hard drives                            Due to seeking and latency issues with hard drives
# Line 379  AC_DEFINE_UNQUOTED(CONFIG_STREAM_BUFFER_ Line 867  AC_DEFINE_UNQUOTED(CONFIG_STREAM_BUFFER_
867    
868  AC_ARG_ENABLE(max-streams,  AC_ARG_ENABLE(max-streams,
869    [  --enable-max-streams    [  --enable-max-streams
870                            Maximum amount of disk streams (default=90). This                            Initial maximum amount of disk streams
871                            value should always be higher than the maximum                            (default=90). This value can be changed at
872                            amount of voices.],                            runtime. It should always be higher than the
873                              maximum amount of voices.],
874    [config_max_streams="${enableval}"],    [config_max_streams="${enableval}"],
875    [config_max_streams="90"]    [config_max_streams="90"]
876  )  )
877  AC_DEFINE_UNQUOTED(CONFIG_MAX_STREAMS, $config_max_streams, [Define max. streams.])  AC_DEFINE_UNQUOTED(CONFIG_DEFAULT_MAX_STREAMS, $config_max_streams, [Define initial max. streams.])
878    
879  AC_ARG_ENABLE(max-voices,  AC_ARG_ENABLE(max-voices,
880    [  --enable-max-voices    [  --enable-max-voices
881                            Maximum amount of voices (default=64). This value                            Initial maximum amount of voices (default=64).
882                            should always be lower than the maximum amount of                            This value can be changed at runtime. It should
883                            disk streams.],                            always be lower than the maximum amount of disk
884                              streams.],
885    [config_max_voices="${enableval}"],    [config_max_voices="${enableval}"],
886    [config_max_voices="64"]    [config_max_voices="64"]
887  )  )
888  AC_DEFINE_UNQUOTED(CONFIG_MAX_VOICES, $config_max_voices, [Define max. voices.])  AC_DEFINE_UNQUOTED(CONFIG_DEFAULT_MAX_VOICES, $config_max_voices, [Define initial max. voices.])
889    
890    AC_ARG_ENABLE(subfragment-size,
891      [  --enable-subfragment-size
892                              Every audio fragment will be splitted into
893                              subfragments. Where each subfragment renders
894                              audio with constant synthesis parameters. This is
895                              done for efficiency reasons. This parameter
896                              defines the default size of a subfragment in
897                              sample points. A large value means less CPU time
898                              whereas a low value means better audio quality
899                              (default=32).],
900      [config_subfragment_size="${enableval}"],
901      [config_subfragment_size="32"]
902    )
903    AC_DEFINE_UNQUOTED(CONFIG_DEFAULT_SUBFRAGMENT_SIZE, $config_subfragment_size, [Define default subfragment size (in sample points).])
904    
905    AC_ARG_ENABLE(global-attenuation-default,
906      [  --enable-global-attenuation-default
907                              To prevent clipping all samples will be lowered
908                              in amplitude by this given default factor (can
909                              be overridden at runtime).
910                              (default=0.35)],
911      [config_global_attenuation_default="${enableval}"],
912      [config_global_attenuation_default="0.35"]
913    )
914    AC_DEFINE_UNQUOTED(CONFIG_GLOBAL_ATTENUATION_DEFAULT, $config_global_attenuation_default, [Define default global volume attenuation (as floating point factor).])
915    
916  AC_ARG_ENABLE(voice-steal-algo,  AC_ARG_ENABLE(voice-steal-algo,
917    [  --enable-voice-steal-algo    [  --enable-voice-steal-algo
# Line 430  AC_ARG_ENABLE(sysex-buffer-size, Line 946  AC_ARG_ENABLE(sysex-buffer-size,
946  )  )
947  AC_DEFINE_UNQUOTED(CONFIG_SYSEX_BUFFER_SIZE, $config_sysex_buffer_size, [Define SysEx buffer size.])  AC_DEFINE_UNQUOTED(CONFIG_SYSEX_BUFFER_SIZE, $config_sysex_buffer_size, [Define SysEx buffer size.])
948    
 AC_ARG_ENABLE(filter-update-steps,  
   [  --enable-filter-update-steps  
                           Amount of sample points after which filter  
                           parameters (cutoff, resonance) are going to be  
                           updated (default=64). Higher value means less CPU  
                           load, but also worse parameter resolution, this  
                           value will be aligned to a power of two.],  
   [config_filter_update_steps="${enableval}"],  
   [config_filter_update_steps="64"]  
 )  
 AC_DEFINE_UNQUOTED(CONFIG_FILTER_UPDATE_STEPS, $config_filter_update_steps, [Define amount of steps to refresh filter coefficients.])  
   
949  AC_ARG_ENABLE(force-filter,  AC_ARG_ENABLE(force-filter,
950    [  --enable-force-filter    [  --enable-force-filter
951                            If enabled will force filter to be used even if                            If enabled will force filter to be used even if
952                            no usage was define in instrument patch files.                            no usage was define in instrument patch files.
953                            (default=no).],                            (default=no).],
954    [config_force_filter="yes"],    [config_force_filter="$enableval"],
955    [config_force_filter="no"]    [config_force_filter="no"]
956  )  )
957  if test "$config_force_filter" = "yes"; then  if test "$config_force_filter" = "yes"; then
# Line 537  AC_ARG_ENABLE(gs-checksum, Line 1041  AC_ARG_ENABLE(gs-checksum,
1041                            messages which do not provide a correct checksum                            messages which do not provide a correct checksum
1042                            will be ignored. This is disabled by default as                            will be ignored. This is disabled by default as
1043                            not all devices honor GS checksums.],                            not all devices honor GS checksums.],
1044    [config_assert_gs_sysex_checksum="yes"],    [config_assert_gs_sysex_checksum="$enableval"],
1045    [config_assert_gs_sysex_checksum="no"]    [config_assert_gs_sysex_checksum="no"]
1046  )  )
1047  if test "config_assert_gs_sysex_checksum" = "yes"; then  if test "config_assert_gs_sysex_checksum" = "yes"; then
1048    AC_DEFINE_UNQUOTED(CONFIG_ASSERT_GS_SYSEX_CHECKSUM, 1, [Define to 1 if you want to enable GS SysEx check.])    AC_DEFINE_UNQUOTED(CONFIG_ASSERT_GS_SYSEX_CHECKSUM, 1, [Define to 1 if you want to enable GS SysEx check.])
1049  fi  fi
1050    
1051    AC_ARG_ENABLE(portamento-time-min,
1052      [  --enable-portamento-time-min
1053                              Minimum Portamento time in seconds
1054                              (default=0.1).],
1055      [config_portamento_time_min="${enableval}"],
1056      [config_portamento_time_min="0.1"]
1057    )
1058    AC_DEFINE_UNQUOTED(CONFIG_PORTAMENTO_TIME_MIN, $config_portamento_time_min, [Define min. portamento time.])
1059    
1060    AC_ARG_ENABLE(portamento-time-max,
1061      [  --enable-portamento-time-max
1062                              Maximum Portamento time in seconds
1063                              (default=32).],
1064      [config_portamento_time_max="${enableval}"],
1065      [config_portamento_time_max="32"]
1066    )
1067    AC_DEFINE_UNQUOTED(CONFIG_PORTAMENTO_TIME_MAX, $config_portamento_time_max, [Define max. portamento time.])
1068    
1069    AC_ARG_ENABLE(portamento-time-default,
1070      [  --enable-portamento-time-default
1071                              Default Portamento time in seconds
1072                              (default=1).],
1073      [config_portamento_time_default="${enableval}"],
1074      [config_portamento_time_default="1"]
1075    )
1076    AC_DEFINE_UNQUOTED(CONFIG_PORTAMENTO_TIME_DEFAULT, $config_portamento_time_default, [Define default portamento time.])
1077    
1078    AC_ARG_ENABLE(signed-triang-algo,
1079      [  --enable-signed-triang-algo
1080                              Signed triangular wave algorithm to be used (e.g. for LFOs).
1081                              Currently available options:
1082                                intmath:
1083                                  Uses integer math without any branch will then be
1084                                  converted to floating point value for each sample point.
1085                                  This int->float conversion might hurt on some systems.
1086                                intmathabs:
1087                                  Similar to intmath but uses abs() function.
1088                                  Depending on compiler and platrofm this could
1089                                  perform better than integer math as it avoids
1090                                  an extra integer multiply instruction.
1091                                diharmonic:
1092                                  The triangular wave will be approximated by adding two
1093                                  sinusoidials. This solution might especially hurt on
1094                                  systems with weak floating point unit.
1095                                benchmark (default):
1096                                  This is not an algorithm. Use this option if the
1097                                  appropriate algorithm should be automatically
1098                                  chosen by the configure script by performing a
1099                                  benchmark between the algorithms mentioned above.
1100                                  This will NOT work for cross compilation!],
1101      [ if test ! "(" "${enableval}" = "intmath" \
1102                  -o "${enableval}" = "intmathabs" \
1103                  -o "${enableval}" = "diharmonic" ")" ; then
1104          AC_MSG_ERROR([Unknown triangular wave algorithm for parameter --enable-signed-triang-algo])
1105        else
1106          config_signed_triang_algo="${enableval}"
1107        fi
1108      ],
1109      [config_signed_triang_algo="benchmark"]
1110    )
1111    
1112    AC_ARG_ENABLE(unsigned-triang-algo,
1113      [  --enable-unsigned-triang-algo
1114                              Unsigned triangular wave algorithm to be used (e.g. for LFOs).
1115                              Currently available options:
1116                                intmath:
1117                                  Uses integer math without any branch will then be
1118                                  converted to floating point value for each sample point.
1119                                  This int->float conversion might hurt on some systems.
1120                                intmathabs:
1121                                  Similar to intmath but uses abs() function.
1122                                  Depending on compiler and platrofm this could
1123                                  perform better than integer math as it avoids
1124                                  an extra integer multiply instruction.
1125                                diharmonic:
1126                                  The triangular wave will be approximated by adding two
1127                                  sinusoidials. This solution might especially hurt on
1128                                  systems with weak floating point unit.
1129                                benchmark (default):
1130                                  This is not an algorithm. Use this option if the
1131                                  appropriate algorithm should be automatically
1132                                  chosen by the configure script by performing a
1133                                  benchmark between the algorithms mentioned above.
1134                                  This will NOT work for cross compilation!],
1135      [ if test ! "(" "${enableval}" = "intmath" \
1136                  -o "${enableval}" = "intmathabs" \
1137                  -o "${enableval}" = "diharmonic" ")" ; then
1138          AC_MSG_ERROR([Unknown triangular wave algorithm for parameter --enable-unsigned-triang-algo])
1139        else
1140          config_unsigned_triang_algo="${enableval}"
1141        fi
1142      ],
1143      [config_unsigned_triang_algo="benchmark"]
1144    )
1145    
1146    AC_ARG_ENABLE(process-muted-channels,
1147      [  --enable-process-muted-channels
1148                              Enable processing of muted channels (default=no).
1149                              In that mode all MIDI events in the muted channels
1150                              will be processed. This will provide information
1151                              about the active voices in the muted channels and
1152                              will not discard notes, triggered in mute mode,
1153                              when the channel is unmuted. But also will reduce
1154                              the efficiency.],
1155      [config_process_muted_channels="$enableval"],
1156      [config_process_muted_channels="no"]
1157    )
1158    if test "$config_process_muted_channels" = "yes"; then
1159      AC_DEFINE_UNQUOTED(CONFIG_PROCESS_MUTED_CHANNELS, 1, [Define to 1 if you want to enable processing of muted channels.])
1160    fi
1161    
1162    AC_ARG_ENABLE(process-all-notes-off,
1163      [  --disable-process-all-notes-off
1164                              Disable interpretation of All-Notes-Off MIDI
1165                              messages (default=on). By default LS will release
1166                              all voices whenever it receives an All-Notes-Off
1167                              MIDI message. You can disable this behavior, so
1168                              that LS simply ignores such messages.],
1169      [config_process_all_notes_off="$enableval"],
1170      [config_process_all_notes_off="yes"]
1171    )
1172    if test "$config_process_all_notes_off" = "yes"; then
1173      AC_DEFINE_UNQUOTED(CONFIG_PROCESS_ALL_NOTES_OFF, 1, [Define to 1 if you want to enable processing of All-Notes-Off MIDI messages.])
1174    fi
1175    
1176    AC_ARG_ENABLE(interpolate-volume,
1177      [  --disable-interpolate-volume
1178                              Disable interpolation of volume modulation
1179                              (default=on). With this enabled, the volume changes
1180                              generated by for example the envelope generator
1181                              will be smoother, minimizing the risk for audio
1182                              clicks. Disable it to reduce CPU usage.],
1183      [config_interpolate_volume="$enableval"],
1184      [config_interpolate_volume="yes"]
1185    )
1186    if test "$config_interpolate_volume" = "yes"; then
1187      AC_DEFINE_UNQUOTED(CONFIG_INTERPOLATE_VOLUME, 1, [Define to 1 if you want to enable interpolation of volume modulation.])
1188    fi
1189    
1190  ###########################################################################  AC_ARG_ENABLE(master-volume-sysex-by-port,
1191  # Create Build Files    [  --enable-master-volume-sysex-by-port
1192                              Whether global volume sysex message should be
1193                              applied globally to the whole sampler or only to
1194                              the sampler channels connected to the same MIDI
1195                              input port on which the sysex message arrived on.
1196                              By default global volume sysex messages apply
1197                              globally to the whole sampler, since many MIDI
1198                              devices behave that way.],
1199      [config_master_volume_sysex_by_port="$enableval"],
1200      [config_master_volume_sysex_by_port="no"]
1201    )
1202    if test "$config_master_volume_sysex_by_port" = "yes"; then
1203      AC_DEFINE_UNQUOTED(CONFIG_MASTER_VOLUME_SYSEX_BY_PORT, 1, [Define to 1 if you want global volume sysex message only be applied to the respective MIDI port.])
1204    fi
1205    
1206  AM_CONFIG_HEADER(config.h)  AC_ARG_ENABLE(plugin-dir,
1207  AM_INIT_AUTOMAKE(linuxsampler, 0.3.3)    [  --enable-plugin-dir
1208                              Directory where the sampler shall look for potential plugins,
1209                              that is 3rd party shared libraries that should be loaded by
1210                              the sampler on startup. By default the sampler will search
1211                              for plugins in the subdirectory "plugins" below its own
1212                              library directory.
1213                              (i.e. /usr/local/lib/linuxsampler/plugins)],
1214      [config_plugin_dir="${enableval}"],
1215      [config_plugin_dir="${libdir}/linuxsampler/plugins"]
1216    )
1217    AC_SUBST(config_plugin_dir)
1218    
1219    AC_ARG_ENABLE(default-instruments-db-location,
1220      [  --enable-default-instruments-db-location
1221                              Only when instruments DB feature is enabled: file name
1222                              which shall be taken as default location of the
1223                              instruments DB file. This location can still be
1224                              overridden at runtime with a command line switch.
1225                              (default: /var/lib/linuxsampler/instruments.db)],
1226      [config_default_instruments_db_file="${enableval}"],
1227      [config_default_instruments_db_file="/var/lib/linuxsampler/instruments.db"]
1228    )
1229    AC_DEFINE_UNQUOTED(
1230        CONFIG_DEFAULT_INSTRUMENTS_DB_LOCATION,
1231        "$config_default_instruments_db_file",
1232        [Only when instruments DB feature is enabled: default location of the DB file.]
1233    )
1234    AC_SUBST(config_default_instruments_db_file)
1235    
 AC_LANG_CPLUSPLUS  
 AC_PROG_CXX  
1236    
1237  # some gcc 4.0 versions need -msse for SSE register allocations  ###########################################################################
1238  if test "$config_asm" = "yes"; then  # Automatic Benchmarks (to detect the best algorithms for the system)
1239    if test "$def_arch_x86" = 1; then  
1240      CXXFLAGS="$CXXFLAGS -msse"  if test "$config_signed_triang_algo" = "benchmark"; then
1241    fi      echo -n "benchmarking for the best (signed) triangular oscillator algorithm... "
1242        AC_LANG_PUSH([C++])
1243        AC_RUN_IFELSE([AC_LANG_SOURCE([[
1244                #define SIGNED 1
1245                #define SILENT 1
1246                #include "${srcdir}/benchmarks/triang.cpp"
1247            ]])],
1248            triang_signed=0,
1249            triang_signed=$?,
1250            triang_signed=0
1251        )
1252        AC_LANG_POP([C++])
1253        if test "$triang_signed" = "2"; then
1254            config_signed_triang_algo="intmath"
1255            echo "integer math"
1256        elif test "$triang_signed" = "3"; then
1257            config_signed_triang_algo="diharmonic"
1258            echo "di harmonics"
1259        elif test "$triang_signed" = "5"; then
1260            config_signed_triang_algo="intmathabs"
1261            echo "integer math using abs()"
1262        else
1263            echo "Benchmark of signed triangular wave algorithms failed!"
1264            echo "Maybe you are doing cross compilation? In that case you have to select"
1265            echo "an algorithm manually with './configure --enable-signed-triang-algo=...'"
1266            echo "Call './configure --help' for further information or read configure.in."
1267            exit -1;
1268        fi
1269    else
1270        case "$config_signed_triang_algo" in
1271            intmath)
1272                triang_signed=2 ;;
1273            diharmonic)
1274                triang_signed=3 ;;
1275            intmathabs)
1276                triang_signed=5 ;;
1277        esac
1278  fi  fi
1279    AC_DEFINE_UNQUOTED(CONFIG_SIGNED_TRIANG_ALGO, ${triang_signed}, [Define signed triangular wave algorithm to be used.])
1280    
1281    if test "$config_unsigned_triang_algo" = "benchmark"; then
1282        echo -n "benchmarking for the best (unsigned) triangular oscillator algorithm... "
1283        AC_LANG_PUSH([C++])
1284        AC_RUN_IFELSE([AC_LANG_SOURCE([[
1285                #define SIGNED 0
1286                #define SILENT 1
1287                #include "${srcdir}/benchmarks/triang.cpp"
1288            ]])],
1289            triang_unsigned=0,
1290            triang_unsigned=$?,
1291            triang_unsigned=0
1292        )
1293        AC_LANG_POP([C++])
1294        if test "$triang_unsigned" = "2"; then
1295            config_unsigned_triang_algo="intmath"
1296            echo "integer math"
1297        elif test "$triang_unsigned" = "3"; then
1298            config_unsigned_triang_algo="diharmonic"
1299            echo "di harmonics"
1300        elif test "$triang_unsigned" = "5"; then
1301            config_unsigned_triang_algo="intmathabs"
1302            echo "integer math using abs()"
1303        else
1304            echo "Benchmark of unsigned triangular wave algorithms failed!"
1305            echo "Maybe you are doing cross compilation? In that case you have to select"
1306            echo "an algorithm manually with './configure --enable-unsigned-triang-algo=...'"
1307            echo "Call './configure --help' for further information or read configure.in."
1308            exit -1;
1309        fi
1310    else
1311        case "$config_unsigned_triang_algo" in
1312            intmath)
1313                triang_unsigned=2 ;;
1314            diharmonic)
1315                triang_unsigned=3 ;;
1316            intmathabs)
1317                triang_unsigned=5 ;;
1318        esac
1319    fi
1320    AC_DEFINE_UNQUOTED(CONFIG_UNSIGNED_TRIANG_ALGO, ${triang_unsigned}, [Define unsigned triangular wave algorithm to be used.])
1321    
1322    
1323    ###########################################################################
1324    # Create Build Files
1325    
1326    AC_CONFIG_HEADERS([config.h])
1327    AM_INIT_AUTOMAKE([subdir-objects])
1328    
1329    AC_LANG([C++])
1330    
1331  # autoconf 2.59/libtool 1.5.12 bug? work-around. Without a check like  # autoconf 2.59/libtool 1.5.12 bug? work-around. Without a check like
1332  # this, the dlfcn.h check in am_prog_libtool may fail.  # this, the dlfcn.h check in am_prog_libtool may fail.
1333  AC_CHECK_HEADER(stdlib.h)  AC_CHECK_HEADER(stdlib.h)
1334    
1335  AM_PROG_LIBTOOL  AC_CONFIG_FILES([\
   
 AC_OUTPUT( \  
1336      Makefile \      Makefile \
1337      man/Makefile \      man/Makefile \
1338      man/linuxsampler.1 \      man/linuxsampler.1 \
1339        man/lscp.1 \
1340      src/Makefile \      src/Makefile \
1341        src/db/Makefile \
1342      src/network/Makefile \      src/network/Makefile \
1343      src/engines/Makefile \      src/engines/Makefile \
1344      src/engines/gig/Makefile \      src/engines/gig/Makefile \
1345        src/engines/sf2/Makefile \
1346        src/engines/sfz/Makefile \
1347      src/engines/common/Makefile \      src/engines/common/Makefile \
1348      src/common/Makefile src/lib/Makefile \      src/effects/Makefile \
1349      src/lib/fileloader/Makefile \      src/common/Makefile \
     src/lib/fileloader/libgig/Makefile \  
1350      src/testcases/Makefile \      src/testcases/Makefile \
1351      src/drivers/Makefile \      src/drivers/Makefile \
1352      src/drivers/audio/Makefile \      src/drivers/audio/Makefile \
1353      src/drivers/midi/Makefile \      src/drivers/midi/Makefile \
1354        src/plugins/Makefile \
1355        src/hostplugins/Makefile \
1356        src/hostplugins/dssi/Makefile \
1357        src/hostplugins/lv2/Makefile \
1358        src/hostplugins/lv2/manifest.ttl \
1359        src/hostplugins/vst/Makefile \
1360        src/hostplugins/au/Makefile \
1361        src/shell/Makefile \
1362      linuxsampler.spec \      linuxsampler.spec \
1363      debian/Makefile \      debian/Makefile \
1364      Artwork/Makefile \      Artwork/Makefile \
1365      scripts/Makefile \      scripts/Makefile \
1366      osx/Makefile \      osx/Makefile \
1367      osx/LinuxSampler.xcode/Makefile \      osx/linuxsampler.xcodeproj/Makefile \
1368      Documentation/Makefile \      Documentation/Makefile \
1369      Documentation/Engines/Makefile \      Documentation/Engines/Makefile \
1370      Documentation/Engines/gig/Makefile \      Documentation/Engines/gig/Makefile \
1371  )      linuxsampler.pc \
1372        Doxyfile \
1373    ])
1374    AC_OUTPUT
1375    
1376    # resolve all nested variables in '${config_plugin_dir}'
1377    # (merely for providing a human readable summary below)
1378    while test $config_plugin_dir != `eval echo ${config_plugin_dir}` ; do
1379            config_plugin_dir=`eval echo ${config_plugin_dir}`
1380    done
1381    
1382    
1383  ###########################################################################  ###########################################################################
# Line 602  echo "" Line 1387  echo ""
1387  echo "#####################################################################"  echo "#####################################################################"
1388  echo "# LinuxSampler Configuration                                        #"  echo "# LinuxSampler Configuration                                        #"
1389  echo "#-------------------------------------------------------------------#"  echo "#-------------------------------------------------------------------#"
1390    echo "# Release Version: ${VERSION}"
1391    echo "# LSCP Version: ${LSCP_RELEASE_MAJOR}.${LSCP_RELEASE_MINOR}"
1392    echo "#-------------------------------------------------------------------"
1393  echo "# Assembly Optimizations: ${config_asm}"  echo "# Assembly Optimizations: ${config_asm}"
1394  echo "# Development Mode: ${config_dev_mode}"  echo "# Development Mode: ${config_dev_mode}"
1395  echo "# Debug Level: ${config_debug_level}"  echo "# Debug Level: ${config_debug_level}"
# Line 615  echo "# Streams to be refilled per Disk Line 1403  echo "# Streams to be refilled per Disk
1403  echo "# Minimum Stream Refill Size: ${config_stream_min_refill}"  echo "# Minimum Stream Refill Size: ${config_stream_min_refill}"
1404  echo "# Maximum Stream Refill Size: ${config_stream_max_refill}"  echo "# Maximum Stream Refill Size: ${config_stream_max_refill}"
1405  echo "# Stream Size: ${config_stream_size}"  echo "# Stream Size: ${config_stream_size}"
1406  echo "# Maximum Disk Streams: ${config_max_streams}"  echo "# Default Maximum Disk Streams: ${config_max_streams}"
1407  echo "# Maximum Voices: ${config_max_voices}"  echo "# Default Maximum Voices: ${config_max_voices}"
1408    echo "# Default Subfragment Size: ${config_subfragment_size}"
1409    echo "# Default Global Volume Attenuation: ${config_global_attenuation_default}"
1410  echo "# Voice Stealing Algorithm: ${config_voice_steal_algo}"  echo "# Voice Stealing Algorithm: ${config_voice_steal_algo}"
1411    echo "# Signed Triangular Oscillator Algorithm: ${config_signed_triang_algo}"
1412    echo "# Unsigned Triangular Oscillator Algorithm: ${config_unsigned_triang_algo}"
1413  echo "# SysEx Buffer Size: ${config_sysex_buffer_size} Byte"  echo "# SysEx Buffer Size: ${config_sysex_buffer_size} Byte"
1414  echo "# Filter Update Steps: ${config_filter_update_steps}"  echo "# Min. Portamento Time: ${config_portamento_time_min} s"
1415    echo "# Max. Portamento Time: ${config_portamento_time_max} s"
1416    echo "# Default Portamento Time: ${config_portamento_time_default} s"
1417  echo "# Force Filter Usage: ${config_force_filter}"  echo "# Force Filter Usage: ${config_force_filter}"
1418  echo "# Filter Cutoff Minimum: ${config_filter_cutoff_min} Hz"  echo "# Filter Cutoff Minimum: ${config_filter_cutoff_min} Hz"
1419  echo "# Filter Cutoff Maximum: ${config_filter_cutoff_max} Hz"  echo "# Filter Cutoff Maximum: ${config_filter_cutoff_max} Hz"
# Line 627  echo "# Override Filter Cutoff Controlle Line 1421  echo "# Override Filter Cutoff Controlle
1421  echo "# Override Filter Resonance Controller: ${config_override_resonance_ctrl}"  echo "# Override Filter Resonance Controller: ${config_override_resonance_ctrl}"
1422  echo "# Override Filter Type: ${config_override_filter_type}"  echo "# Override Filter Type: ${config_override_filter_type}"
1423  echo "# Assert GS SysEx Checksum: ${config_assert_gs_sysex_checksum}"  echo "# Assert GS SysEx Checksum: ${config_assert_gs_sysex_checksum}"
1424    echo "# Process Muted Channels: ${config_process_muted_channels}"
1425    echo "# Process All-Notes-Off MIDI message: ${config_process_all_notes_off}"
1426    echo "# Apply global volume SysEx by MIDI port: ${config_master_volume_sysex_by_port}"
1427    echo "# Interpolate Volume: ${config_interpolate_volume}"
1428    echo "# Instruments database support: ${config_instruments_db}"
1429    if test "$config_instruments_db" = "yes"; then
1430    echo "# Instruments DB default location: ${config_default_instruments_db_file}"
1431    fi
1432    echo "# Plugin Path: ${config_plugin_dir}"
1433    echo "#-------------------------------------------------------------------"
1434    echo "# MIDI Input Drivers:"
1435    echo "# ALSA: ${config_have_alsa}, JACK: ${config_have_jack_midi}, CoreMIDI: ${config_have_coremidi}, MME: ${config_have_mme}, MidiShare: ${config_have_midishare}"
1436    echo "#-------------------------------------------------------------------"
1437    echo "# Audio Output Drivers:"
1438    echo "# ALSA: ${config_have_alsa}, JACK: ${config_have_jack}, ARTS: ${config_have_arts}, CoreAudio: ${config_have_coreaudio}, ASIO: ${config_have_asio}"
1439    echo "#-------------------------------------------------------------------"
1440    echo "# Sampler Engines:"
1441    echo "# GIG: yes, SF2: ${config_have_sf2}, SFZ: yes"
1442    echo "#-------------------------------------------------------------------"
1443    echo "# Effect plugin systems for internal effects:"
1444    echo "# LADSPA: yes"
1445    echo "#-------------------------------------------------------------------"
1446    echo "# Building sampler as plugin for following host standards:"
1447    echo "# DSSI: ${config_have_dssi}, LV2: ${config_have_lv2}, VST: ${config_have_vst}, AU: ${config_have_au}"
1448  echo "#-------------------------------------------------------------------#"  echo "#-------------------------------------------------------------------#"
1449  echo "# Read './configure --help' or file 'configure.in' for details.     #"  echo "# Read './configure --help' or file 'configure.in' for details.     #"
1450  echo "#####################################################################"  echo "#####################################################################"

Legend:
Removed from v.692  
changed lines
  Added in v.2559

  ViewVC Help
Powered by ViewVC