/[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 1360 by schoenebeck, Sun Sep 30 20:04:11 2007 UTC linuxsampler/trunk/configure.ac revision 3917 by schoenebeck, Thu Jun 10 12:58:37 2021 UTC
# Line 1  Line 1 
 AC_INIT(configure.in)  
   
1  #------------------------------------------------------------------------------------  #------------------------------------------------------------------------------------
2  # LinuxSampler's / liblinuxsampler's "official" release version:  # LinuxSampler's / liblinuxsampler's "official" release version:
3    
4  LINUXSAMPLER_RELEASE_MAJOR=0  m4_define(linuxsampler_release_major, 2)
5  LINUXSAMPLER_RELEASE_MINOR=4  m4_define(linuxsampler_release_minor, 2)
6  LINUXSAMPLER_RELEASE_BUILD=0.7cvs  m4_define(linuxsampler_release_build, 0.svn1)
7    
8    AC_INIT([linuxsampler],[linuxsampler_release_major.linuxsampler_release_minor.linuxsampler_release_build])
9    AC_CONFIG_SRCDIR([configure.ac])
10    
11  #------------------------------------------------------------------------------------  #------------------------------------------------------------------------------------
12  # 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=0.7cvs Line 25  LINUXSAMPLER_RELEASE_BUILD=0.7cvs
25  #  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
26  #     to 0.  #     to 0.
27    
28  LIBLINUXSAMPLER_LT_CURRENT=0  LIBLINUXSAMPLER_LT_CURRENT=6
29  LIBLINUXSAMPLER_LT_REVISION=0  LIBLINUXSAMPLER_LT_REVISION=0
30  LIBLINUXSAMPLER_LT_AGE=0  LIBLINUXSAMPLER_LT_AGE=0
31  SHARED_VERSION_INFO="$LIBLINUXSAMPLER_LT_CURRENT:$LIBLINUXSAMPLER_LT_REVISION:$LIBLINUXSAMPLER_LT_AGE"  SHARED_VERSION_INFO="$LIBLINUXSAMPLER_LT_CURRENT:$LIBLINUXSAMPLER_LT_REVISION:$LIBLINUXSAMPLER_LT_AGE"
# Line 33  SHARED_VERSION_INFO="$LIBLINUXSAMPLER_LT Line 34  SHARED_VERSION_INFO="$LIBLINUXSAMPLER_LT
34  # the LSCP specification version this LinuSampler release complies with:  # the LSCP specification version this LinuSampler release complies with:
35    
36  LSCP_RELEASE_MAJOR=1  LSCP_RELEASE_MAJOR=1
37  LSCP_RELEASE_MINOR=2  LSCP_RELEASE_MINOR=7
38    
39  AC_DEFINE_UNQUOTED(LSCP_RELEASE_MAJOR, ${LSCP_RELEASE_MAJOR}, [LSCP spec major version this release complies with.])  AC_DEFINE_UNQUOTED(LSCP_RELEASE_MAJOR, ${LSCP_RELEASE_MAJOR}, [LSCP spec major version this release complies with.])
40  AC_DEFINE_UNQUOTED(LSCP_RELEASE_MINOR, ${LSCP_RELEASE_MINOR}, [LSCP spec minor version this release complies with.])  AC_DEFINE_UNQUOTED(LSCP_RELEASE_MINOR, ${LSCP_RELEASE_MINOR}, [LSCP spec minor version this release complies with.])
41    
42  AM_PROG_LIBTOOL  AM_INIT_AUTOMAKE([subdir-objects])
43    AC_PROG_CC
44    AC_PROG_CXX
45    AC_LIBTOOL_WIN32_DLL
46    AC_PROG_LIBTOOL
47    AC_PROG_LEX
48    AC_PROG_YACC
49    
50  AC_SUBST(SHLIB_VERSION_ARG)  AC_SUBST(SHLIB_VERSION_ARG)
51  AC_SUBST(SHARED_VERSION_INFO)  AC_SUBST(SHARED_VERSION_INFO)
52    
53  AC_C_BIGENDIAN  module=yes eval LIB_EXT=$shrext_cmds
54  AC_CANONICAL_SYSTEM  AC_SUBST(LIB_EXT)
55    
56  AC_SUBST(target)  AC_C_BIGENDIAN
57  AC_SUBST(target_alias)  AC_CANONICAL_HOST
 AC_SUBST(target_cpu)  
 AC_SUBST(target_os)  
 AC_SUBST(target_vendor)  
58    
59    PKG_PROG_PKG_CONFIG
60    
61  ###########################################################################  ###########################################################################
62  # General Checks  # General Checks
63    
64    AM_CONDITIONAL(CROSS_COMPILING, test $cross_compiling = yes)
65    
66    # make sure C++14 is supported by compiler
67    # (add CXXFLAGS if required [e.g. -std=c++14])
68    m4_ifdef([m4_include(m4/ax_cxx_compile_stdcxx.m4)],,
69                 [sinclude([m4/ax_cxx_compile_stdcxx.m4])])
70    AX_CXX_COMPILE_STDCXX(14, [], mandatory)
71    
72  AC_MSG_CHECKING([whether x86 architecture])  AC_MSG_CHECKING([whether x86 architecture])
73  def_arch_x86=0  def_arch_x86=0
74  case $target_cpu in  case $host_cpu in
75    "i386" | "i486" | "i586" | "i686" | "i786")    "i386" | "i486" | "i586" | "i686" | "i786" | "x86_64")
76      echo "yes"      echo "yes"
77      def_arch_x86=1;;      def_arch_x86=1;;
78    *)    *)
# Line 71  AC_DEFINE_UNQUOTED(ARCH_X86,$def_arch_x8 Line 84  AC_DEFINE_UNQUOTED(ARCH_X86,$def_arch_x8
84  # (only if the user did not provide one)  # (only if the user did not provide one)
85  CXX_CPU_SWITCH=  CXX_CPU_SWITCH=
86  if ! echo "X $CXXFLAGS " | grep -q -- " \(-march=\|-mcpu=\|-mtune=\|-arch=\)" ; then  if ! echo "X $CXXFLAGS " | grep -q -- " \(-march=\|-mcpu=\|-mtune=\|-arch=\)" ; then
87    if test "$def_arch_x86" = 1; then    if test "$def_arch_x86" = 1 -a "$host_cpu" != "x86_64"; then
88      CXX_CPU_SWITCH="-march=$target_cpu"      CXX_CPU_SWITCH="-march=$host_cpu"
89    elif test "$target_cpu" = "ppc"; then    elif test "$target_cpu" = "ppc"; then
90      CXX_CPU_SWITCH="-arch=$target_cpu"      CXX_CPU_SWITCH="-arch=$host_cpu"
91    fi    fi
92  fi  fi
93  AC_SUBST([CXX_CPU_SWITCH])  AC_SUBST([CXX_CPU_SWITCH])
94    
95    mac=no
96    linux=no
97    case "$host" in
98        *-*-darwin*)
99            mac=yes
100            ;;
101        *-*-linux*)
102            linux=yes
103            ;;
104    esac
105    AM_CONDITIONAL(LINUX, test "$linux" = yes)
106    AM_CONDITIONAL(MAC, test "$mac" = yes)
107    
108    # check if we're on MS Windows
109    AC_CHECK_HEADERS(
110        mmsystem.h,
111        have_windows=1,
112        have_windows=0,
113        [#include <windef.h>]
114    )
115    AM_CONDITIONAL(HAVE_WINDOWS, test $have_windows = "1")
116    
117  AC_MSG_CHECKING([whether UNIX98 compatible])  AC_MSG_CHECKING([whether UNIX98 compatible])
118  AC_LANG_SAVE  AC_LANG_PUSH([C])
119  AC_LANG_C  AC_RUN_IFELSE([AC_LANG_SOURCE([[
 AC_TRY_RUN([  
120  #ifndef _GNU_SOURCE  #ifndef _GNU_SOURCE
121  #define _GNU_SOURCE 1  #define _GNU_SOURCE 1
122  #endif  #endif
# Line 94  exit(0); /* UNIX98 compatible */ Line 128  exit(0); /* UNIX98 compatible */
128  exit(-1); /* not UNIX98 compatible */  exit(-1); /* not UNIX98 compatible */
129  #endif  #endif
130  }  }
131  ],  ]])],
132  have_unix98="yes",  have_unix98="yes",
133  have_unix98="no",  have_unix98="no",
134  have_unix98="no"  have_unix98="no"
135  )  )
136  AC_LANG_RESTORE  AC_LANG_POP([C])
137  AC_MSG_RESULT([$have_unix98])  AC_MSG_RESULT([$have_unix98])
138  if test "$have_unix98" = "no"; then  if test "$have_unix98" = "no" -a "$have_windows" = "0" -a "$mac" = "no" ; then
139      if test "x$HAVE_UNIX98" = "x"; then      if test "x$HAVE_UNIX98" = "x"; then
140          echo "LinuxSampler only runs on UNIX98 compatible systems, which is mandatory for"          echo "LinuxSampler only runs on UNIX98 compatible systems, which is mandatory for"
141          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"
142          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"
143          echo "have a UNIX98 compatible system."          echo "have a UNIX98 compatible system."
144          exit -1;          exit -1;
145      fi      fi
# Line 114  fi Line 148  fi
148  # check for <features.h>  # check for <features.h>
149  AC_CHECK_HEADERS(features.h)  AC_CHECK_HEADERS(features.h)
150    
151    # test for POSIX thread library
152    m4_ifdef([m4_include(m4/pthread.m4)],,
153                 [sinclude([m4/pthread.m4])])
154    ACX_PTHREAD
155    LIBS="$PTHREAD_LIBS $LIBS"
156    CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
157    CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS"
158    CC="$PTHREAD_CC"
159    
160    
161    # check for compiler's pragma diagnostic capabilities
162    m4_ifdef([m4_include(m4/pragma_diagnostics.m4)],,
163                 [sinclude([m4/pragma_diagnostics.m4])])
164    ACX_CXX_PRAGMA_DIAGNOSTICS
165    
166    
167    # check for a bug in NPTL-enabled glibc
168    # (see Gentoo bug report #194076)
169    AC_ARG_ENABLE(nptl-bug-check,
170      [  --disable-nptl-bug-check
171                              Disable check for a bug in certain NPTL-enabled
172                              glibc versions that caused crashs.],
173      [config_check_nptl_bug="$enableval"],
174      [config_check_nptl_bug="yes"]
175    )
176    if test "$config_check_nptl_bug" = "yes"; then
177        m4_ifdef([m4_include(m4/nptl_bug.m4)],,
178                 [sinclude([m4/nptl_bug.m4])])
179        ACX_NPTL_GLIBC_BUG([
180            echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
181            echo "You seem to have a buggy PTHREAD library! LinuxSampler would"
182            echo "probably crash due to this. Please report us the system you are"
183            echo "using and/or file a bug report to the bug tracking system of"
184            echo "your distribution."
185            echo "If you have a NPTL-enabled glibc AND it was compiled for TLS as"
186            echo "well, you can try to circumvent this problem for now by setting"
187            echo "the environment variable LD_ASSUME_KERNEL=\"2.4.1\" , which"
188            echo "should cause this test to pass."
189            echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
190            AC_MSG_ERROR([possibly NPTL glibc bug detected])
191        ])
192    else
193        echo "NPTL glibc bug check disabled"
194    fi
195    
196    
197    # check whether C++ compiler supports "designated initializers"
198    echo -n "Checking whether C++ compiler supports designated initializers (partly)... "
199    AC_LANG_PUSH([C++])
200    AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
201        #include <stdlib.h>
202        struct Foo {
203            int   a;
204            float b;
205            bool  c;
206            char  d;
207        };
208        static void bar(Foo o) {
209        }
210        int main() {
211            bar({
212              .a = 2,
213              .b = 4.3f,
214              .c = true,
215              .d = 'z'
216            });
217            return 0;
218        }
219        ]])],
220        [cxx_designated_init_partly="yes"],
221        [cxx_designated_init_partly="no"]
222    )
223    AC_LANG_POP([C++])
224    if test $cxx_designated_init_partly = "yes"; then
225        echo "yes"
226    else
227        echo "NO"
228        echo '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!'
229        echo '!                                                             !'
230        echo '! ERROR: Selected C++ compiler does not support designated    !'
231        echo '! initializers at all, not even partly!                       !'
232        echo '!                                                             !'
233        echo '! Please either update your C++ compiler or select a          !'
234        echo '! different compiler (e.g. GCC >= 8 or clang >= 5). If you    !'
235        echo '! have several C++ compilers installed on your machine, you   !'
236        echo '! can easily select a different compiler by environment       !'
237        echo '! variable, e.g. to compile with clang instead:               !'
238        echo '!                                                             !'
239        echo '! CXX=clang++ CC=clang ./configure && make                    !'
240        echo '!                                                             !'
241        echo '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!'
242        exit -1
243    fi
244    echo -n "Checking whether C++ compiler fully supports designated initializers... "
245    AC_LANG_PUSH([C++])
246    AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
247        #include <stdlib.h>
248        struct Foo {
249            int   a;
250            float b;
251            bool  c;
252            char  d;
253        };
254        static void bar(Foo o) {
255        }
256        int main() {
257            bar({
258              .d = 'z',
259              .a = 2
260            });
261            return 0;
262        }
263        ]])],
264        [cxx_designated_init_fully="yes"],
265        [cxx_designated_init_fully="no"]
266    )
267    AC_LANG_POP([C++])
268    if test $cxx_designated_init_fully = "yes"; then
269        echo "yes"
270    else
271        echo 'NO'
272        echo '***************************************************************'
273        echo '*                                                             *'
274        echo '* WARNING: Selected C++ compiler does not fully support       *'
275        echo '* designated initializers (only partly)!                      *'
276        echo '*                                                             *'
277        echo '* You will be able to compile LinuxSampler, but you will not  *'
278        echo '* be able to compile the test cases. Consider updating your   *'
279        echo '* C++ compiler or switching to a different compiler. Chances  *'
280        echo '* are that LinuxSampler will soon no longer support your      *'
281        echo '* compiler.                                                   *'
282        echo '*                                                             *'
283        echo '* If you have several C++ compilers installed on your machine,*'
284        echo '* you can easily select a different compiler by environment   *'
285        echo '* variable, e.g. to compile with clang instead:               *'
286        echo '*                                                             *'
287        echo '* CXX=clang++ CC=clang ./configure && make                    *'
288        echo '*                                                             *'
289        echo '***************************************************************'
290    fi
291    
292    
293    # In case Bison is available, determine the exact version, since we need to
294    # use different custom parser code for Bison 2.x vs. Bison 3.x generated
295    # parser yacc tables.
296    if echo "$YACC" | grep -q bison; then
297        # NOTE: m4 removes [], that's why it needs to be escaped
298        bison_version=[`$YACC --version | head -n 1 | sed -e 's/[^0-9.]*\([-0-9.]\+\)$/\1/'`]
299        bison_version_major=`echo $bison_version | cut -d. -f1`
300        bison_version_minor=`echo $bison_version | cut -d. -f2`
301        AC_DEFINE_UNQUOTED(HAVE_BISON_MAJ,$bison_version_major,[Define to the major version of the GNU Bison program installed.])
302        AC_DEFINE_UNQUOTED(HAVE_BISON_MIN,$bison_version_minor,[Define to the minor version of the GNU Bison program installed.])
303    fi
304    
305    
306    
307  ###########################################################################  ###########################################################################
308  # Checks for available audio and MIDI systems / drivers  # Checks for available audio and MIDI systems / drivers
# Line 147  if test "$config_alsa_driver" = "yes"; t Line 336  if test "$config_alsa_driver" = "yes"; t
336      fi      fi
337    
338      echo -n "checking Alsa version... "      echo -n "checking Alsa version... "
339      AC_LANG_SAVE      AC_LANG_PUSH([C])
340      AC_LANG_C      AC_RUN_IFELSE([AC_LANG_SOURCE([[
     AC_TRY_RUN([  
341          #include <alsa/asoundlib.h>          #include <alsa/asoundlib.h>
342          void main(void) {          void main(void) {
343              /* ensure backward compatibility */              /* ensure backward compatibility */
# Line 158  if test "$config_alsa_driver" = "yes"; t Line 346  if test "$config_alsa_driver" = "yes"; t
346              #endif              #endif
347              exit(SND_LIB_MAJOR);              exit(SND_LIB_MAJOR);
348          }          }
349      ],      ]])],
350      alsa_major=0,      alsa_major=0,
351      alsa_major=$?,      alsa_major=$?,
352      alsa_major=0      alsa_major=0
353      )      )
354      AC_TRY_RUN([      AC_RUN_IFELSE([AC_LANG_SOURCE([[
355          #include <alsa/asoundlib.h>          #include <alsa/asoundlib.h>
356          void main(void) {          void main(void) {
357              /* ensure backward compatibility */              /* ensure backward compatibility */
# Line 172  if test "$config_alsa_driver" = "yes"; t Line 360  if test "$config_alsa_driver" = "yes"; t
360              #endif              #endif
361              exit(SND_LIB_MINOR);              exit(SND_LIB_MINOR);
362          }          }
363      ],      ]])],
364      alsa_minor=0,      alsa_minor=0,
365      alsa_minor=$?,      alsa_minor=$?,
366      alsa_minor=0      alsa_minor=0
367      )      )
368      AC_TRY_RUN([      AC_RUN_IFELSE([AC_LANG_SOURCE([[
369          #include <alsa/asoundlib.h>          #include <alsa/asoundlib.h>
370          void main(void) {          void main(void) {
371              /* ensure backward compatibility */              /* ensure backward compatibility */
# Line 186  if test "$config_alsa_driver" = "yes"; t Line 374  if test "$config_alsa_driver" = "yes"; t
374              #endif              #endif
375              exit(SND_LIB_SUBMINOR);              exit(SND_LIB_SUBMINOR);
376          }          }
377      ],      ]])],
378      alsa_subminor=0,      alsa_subminor=0,
379      alsa_subminor=$?,      alsa_subminor=$?,
380      alsa_subminor=0      alsa_subminor=0
381      )      )
382      AC_LANG_RESTORE      AC_LANG_POP([C])
383      echo "$alsa_major.$alsa_minor.$alsa_subminor";      echo "$alsa_major.$alsa_minor.$alsa_subminor";
384      AC_DEFINE_UNQUOTED(ALSA_MAJOR,$alsa_major,[Define to the major version number of your Alsa installation.])      AC_DEFINE_UNQUOTED(ALSA_MAJOR,$alsa_major,[Define to the major version number of your Alsa installation.])
385      AC_DEFINE_UNQUOTED(ALSA_MINOR,$alsa_minor,[Define to the minor version number of your Alsa installation.])      AC_DEFINE_UNQUOTED(ALSA_MINOR,$alsa_minor,[Define to the minor version number of your Alsa installation.])
# Line 201  else Line 389  else
389  fi  fi
390  AM_CONDITIONAL(HAVE_ALSA, test $have_alsa = "1")  AM_CONDITIONAL(HAVE_ALSA, test $have_alsa = "1")
391  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.])
392    config_have_alsa="no"
393    if test $have_alsa = "1"; then
394        config_have_alsa="yes"
395    fi
396    
397  # JACK  # JACK
398  AC_ARG_ENABLE(jack-driver,  AC_ARG_ENABLE(jack-driver,
# Line 216  if test "$config_jack_driver" = "yes"; t Line 408  if test "$config_jack_driver" = "yes"; t
408      if test $have_jack = "1"; then      if test $have_jack = "1"; then
409          AC_SUBST(JACK_LIBS)          AC_SUBST(JACK_LIBS)
410          AC_SUBST(JACK_CFLAGS)          AC_SUBST(JACK_CFLAGS)
411          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)          linuxsampler_save_LIBS=$LIBS
412            LIBS="$JACK_LIBS $LIBS"
413            AC_CHECK_FUNCS(jack_client_name_size jack_client_open \
414                           jack_on_info_shutdown)
415            LIBS=$linuxsampler_save_LIBS
416          have_audio_output_driver="true";          have_audio_output_driver="true";
417      fi      fi
418  else  else
# Line 224  else Line 420  else
420  fi  fi
421  AM_CONDITIONAL(HAVE_JACK, test $have_jack = "1")  AM_CONDITIONAL(HAVE_JACK, test $have_jack = "1")
422  AC_DEFINE_UNQUOTED(HAVE_JACK,$have_jack,[Define to 1 if you have JACK installed.])  AC_DEFINE_UNQUOTED(HAVE_JACK,$have_jack,[Define to 1 if you have JACK installed.])
423    config_have_jack="no"
424    if test $have_jack = "1"; then
425        config_have_jack="yes"
426    fi
427    
428    # JACK MIDI
429    have_jack_midi=0
430    if test $have_jack = "1"; then
431        linuxsampler_save_CFLAGS=$CFLAGS
432        linuxsampler_save_LIBS=$LIBS
433        CFLAGS="$JACK_CFLAGS $CFLAGS"
434        LIBS="$JACK_LIBS $LIBS"
435        AC_CHECK_HEADER(jack/midiport.h, have_jack_midi=1, have_jack_midi=0)
436        if test $have_jack_midi = "1"; then
437            AC_CHECK_FUNCS(jack_midi_get_event_count)
438            AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <jack/midiport.h>]], [[
439                jack_midi_clear_buffer(0, 0);
440            ]])], [AC_DEFINE(JACK_MIDI_FUNCS_NEED_NFRAMES, 1,
441                      [Define to 1 if you have the old jack midi functions that need an nframes argument.])])
442            have_midi_input_driver="true"
443        fi
444        CFLAGS=$linuxsampler_save_CFLAGS
445        LIBS=$linuxsampler_save_LIBS
446    fi
447    AM_CONDITIONAL(HAVE_JACK_MIDI, test $have_jack_midi = "1")
448    AC_DEFINE_UNQUOTED(HAVE_JACK_MIDI, $have_jack_midi,
449                       [Define to 1 if you have JACK with MIDI support installed.])
450    config_have_jack_midi="no"
451    if test $have_jack_midi = "1"; then
452        config_have_jack_midi="yes"
453    fi
454    
455  # ARTS  # ARTS
456  AC_ARG_ENABLE(arts-driver,  AC_ARG_ENABLE(arts-driver,
# Line 246  else Line 473  else
473  fi  fi
474  AM_CONDITIONAL(HAVE_ARTS, test "$have_arts" = "1")  AM_CONDITIONAL(HAVE_ARTS, test "$have_arts" = "1")
475  AC_DEFINE_UNQUOTED(HAVE_ARTS,$have_arts,[Define to 1 if you have aRts installed.])  AC_DEFINE_UNQUOTED(HAVE_ARTS,$have_arts,[Define to 1 if you have aRts installed.])
476    config_have_arts="no"
477    if test $have_arts = "1"; then
478        config_have_arts="yes"
479    fi
480    
481    # ASIO AUDIO (Win32)
482    AC_ARG_ENABLE(asiosdk-dir,
483      [  --enable-asiosdk-dir
484                              Directory where the ASIO SDK is located, this automatically
485                              enables the compilation of the ASIO audio output driver.],
486      [config_asiosdk_dir="${enableval}"],
487      [config_asiosdk_dir="."]
488    )
489    AC_SUBST(config_asiosdk_dir)
490    
491    AC_ARG_ENABLE(asio-driver,
492      [  --disable-asio-driver
493                              Disable support for the Windows ASIO driver.],
494      [config_asio_driver="$enableval"],
495      [config_asio_driver="yes"]
496    )
497    have_asio=0
498    ASIOSDK_BASEDIR=
499    if test "$config_asio_driver" = "yes"; then
500        asiosdk_headerfile=$config_asiosdk_dir/ASIOSDK2/common/asio.h
501        echo -n "checking for ASIO headerfile: $asiosdk_headerfile ...."
502        if test -e $asiosdk_headerfile ; then
503            echo yes
504            have_asio=1
505            ASIOSDK_BASEDIR="$config_asiosdk_dir"
506        else
507            echo no
508            have_asio=0
509        fi
510        if test "$have_asio" = "1"; then
511            have_audio_output_driver="true"
512        fi
513    else
514        echo "Windows ASIO support disabled by configure script parameter"
515    fi
516    AC_SUBST(ASIOSDK_BASEDIR)
517    AM_CONDITIONAL(HAVE_ASIO, test $have_asio = "1")
518    AC_DEFINE_UNQUOTED(HAVE_ASIO,$have_asio,[Define to 1 if you have ASIO installed.])
519    config_have_asio="no"
520    if test $have_asio = "1"; then
521        config_have_asio="yes"
522    fi
523    
524  # MidiShare (Linux, OS X, Windows)  # MidiShare (Linux, OS X, Windows)
525  AC_ARG_ENABLE(midishare-driver,  AC_ARG_ENABLE(midishare-driver,
# Line 272  else Line 546  else
546  fi  fi
547  AM_CONDITIONAL(HAVE_MIDISHARE, test $have_midishare = "1")  AM_CONDITIONAL(HAVE_MIDISHARE, test $have_midishare = "1")
548  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.])
549    config_have_midishare="no"
550    if test $have_midishare = "1"; then
551        config_have_midishare="yes"
552    fi
553    
554  # CoreMIDI (OS X)  # CoreMIDI (OS X)
555  AC_ARG_ENABLE(coremidi-driver,  AC_ARG_ENABLE(coremidi-driver,
# Line 294  else Line 572  else
572  fi  fi
573  AM_CONDITIONAL(HAVE_COREMIDI, test $have_coremidi = "1")  AM_CONDITIONAL(HAVE_COREMIDI, test $have_coremidi = "1")
574  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.])
575    config_have_coremidi="no"
576    if test $have_coremidi = "1"; then
577        config_have_coremidi="yes"
578    fi
579    
580    # CoreAudio (OS X)
581    AC_ARG_ENABLE(coreaudio-driver,
582      [  --disable-coreaudio-driver
583                              Disable support for the Apple CoreAudio system.],
584      [config_coreaudio_driver="$enableval"],
585      [config_coreaudio_driver="yes"]
586    )
587    have_coreaudio=0
588    if test "$config_coreaudio_driver" = "yes"; then
589        AC_CHECK_HEADER(CoreAudio/CoreAudio.h,
590            have_coreaudio=1,
591            have_coreaudio=0
592        )
593        if test "$have_coreaudio" = "1"; then
594            have_audio_output_driver="true"
595        fi
596    else
597        echo "CoreAudio support disabled by configure script parameter"
598    fi
599    AM_CONDITIONAL(HAVE_COREAUDIO, test $have_coreaudio = "1")
600    AC_DEFINE_UNQUOTED(HAVE_COREAUDIO,$have_coreaudio,[Define to 1 if you have CoreAudio installed.])
601    config_have_coreaudio="no"
602    if test $have_coreaudio = "1"; then
603        config_have_coreaudio="yes"
604    fi
605    
606    # MME MIDI (Win32)
607    AC_ARG_ENABLE(mmemidi-driver,
608      [  --disable-mmemidi-driver
609                              Disable support for the Windows MME MIDI system.],
610      [config_mmemidi_driver="$enableval"],
611      [config_mmemidi_driver="yes"]
612    )
613    have_mmemidi=0
614    if test "$config_mmemidi_driver" = "yes"; then
615        AC_CHECK_HEADERS(mmsystem.h,
616            have_mmemidi=1,
617            have_mmemidi=0
618        )
619        if test "$have_mmemidi" = "1"; then
620            have_midi_input_driver="true"
621        fi
622    else
623        echo "MME MIDI support disabled by configure script parameter"
624    fi
625    AM_CONDITIONAL(HAVE_MME_MIDI, test $have_mmemidi = "1")
626    AC_DEFINE_UNQUOTED(HAVE_MME_MIDI,$have_mmemidi,[Define to 1 if you have MME MIDI installed.])
627    config_have_mme="no"
628    if test $have_mmemidi = "1"; then
629        config_have_mme="yes"
630    fi
631    
632    # DSSI
633    AC_CHECK_HEADERS(dssi.h,
634            config_have_dssi="yes",
635            config_have_dssi="no")
636    AM_CONDITIONAL(HAVE_DSSI, test $config_have_dssi = "yes")
637    
638    # LV2
639    PKG_CHECK_MODULES(LV2, lv2 >= 1.0.0, config_have_lv2="yes", config_have_lv2="no")
640    if test "$config_have_lv2" != "yes"; then
641        PKG_CHECK_MODULES(LV2, lv2core >= 1.0.0, config_have_lv2="yes", config_have_lv2="no")
642    fi
643    AC_SUBST(LV2_CFLAGS)
644    AC_SUBST(LV2_LIBS)
645    AM_CONDITIONAL(HAVE_LV2, test $config_have_lv2 = "yes")
646    
647    # VST
648    AC_ARG_ENABLE(vstsdk-dir,
649      [  --enable-vstsdk-dir
650                              Directory where the VST SDK is located.
651                              This automatically enables the compilation
652                              of the VST plugin.],
653      [VSTSDK_DIR="${enableval}"],
654      [VSTSDK_DIR=]
655    )
656    AC_SUBST(VSTSDK_DIR)
657    AM_CONDITIONAL(HAVE_VST, test "x$VSTSDK_DIR" != "x")
658    config_have_vst="no"
659    if test "x$VSTSDK_DIR" != "x"; then
660        config_have_vst="yes"
661    fi
662    
663    # AU
664    AC_CHECK_HEADERS(AudioUnit/AudioUnit.h,
665            config_have_au="yes",
666            config_have_au="no")
667    AM_CONDITIONAL(HAVE_AU, test $config_have_au = "yes")
668    AM_CONDITIONAL(HAVE_AUFLAGS, test "$AUFLAGS" != "")
669    
670    if test $config_have_au = "yes" ; then
671        if test "x$DEVELOPER_EXTRAS_DIR" = "x" ; then
672            if test -d /Developer/Extras ; then
673                DEVELOPER_EXTRAS_DIR=/Developer/Extras
674            else      
675                DEVELOPER_EXTRAS_DIR=/Developer/Examples
676            fi
677        fi
678        AC_SUBST(DEVELOPER_EXTRAS_DIR)
679    fi
680    
681    if test "x$MAC_PLUGIN_INSTALL_DIR" = "x" ; then
682        MAC_PLUGIN_INSTALL_DIR=/Library/Audio/Plug-Ins
683    fi
684    AC_SUBST(MAC_PLUGIN_INSTALL_DIR)
685    
686    # have we found at least one MIDI input and one audio output driver ?
687    if test "$have_midi_input_driver" = "false"; then
688        echo "No supported MIDI input system found!"
689        echo "Sorry, LinuxSampler only supports the following MIDI drivers at the moment:"
690        echo "ALSA, JACK, MIDIShare, CoreMIDI, MME."
691        echo "If you think you have one of those available on your system, make sure you"
692        echo "also have the respective development (header) files installed."
693        exit -1;
694    fi
695    if test "$have_audio_output_driver" = "false"; then
696        echo "No supported audio output system found!"
697        echo "Sorry, LinuxSampler only supports ALSA, JACK, ARTS and ASIO as audio output"
698        echo "driver at the moment!"
699        exit -1;
700    fi
701    
702    
703    
704    ###########################################################################
705    # Checks for various DLL libraries
706    
707  # Check presence of libgig  # Check presence of libgig
708  libgig_version="3.1.1"  libgig_version="4.3.0"
709  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)
710  if test "$HAVE_GIG" = "false"; then  if test "$HAVE_GIG" = "false"; then
711      echo "Required libgig version not found!"      echo "Required libgig version not found!"
# Line 308  fi Line 717  fi
717  AC_SUBST(GIG_CFLAGS)  AC_SUBST(GIG_CFLAGS)
718  AC_SUBST(GIG_LIBS)  AC_SUBST(GIG_LIBS)
719    
720  # Check presence of sqlite3  # SF2 Engine (requires libgig)
721  sqlite_version="3.3"  AC_ARG_ENABLE(sf2-engine,
722  PKG_CHECK_MODULES(SQLITE3, sqlite3 >= $sqlite_version, HAVE_SQLITE3=true, HAVE_SQLITE3=false)    [  --disable-sf2-engine
723  AC_SUBST(SQLITE3_LIBS)                            Disable compilation of the SF2 engine.
724  AC_SUBST(SQLITE3_CFLAGS)                            You need to have libgig installed.],
725  if test $HAVE_SQLITE3 = false; then    [config_sf2_engine="$enableval"],
726      HAVE_SQLITE3=0;    [config_sf2_engine="yes"]
727      instruments_db_support="no"  )
728      echo "*** Required sqlite version not found!"  HAVE_SF2=0;
729      echo "*** You need to have sqlite version ${sqlite_version} or higher"  if test "$config_sf2_engine" = "yes"; then
730      echo "*** for instruments database support to be enabled."      HAVE_SF2=1
     echo "*** Support for instruments DB will be disabled!"  
731  else  else
732      HAVE_SQLITE3=1      echo "SF2 engine disabled by configure script parameter"
733      instruments_db_support="yes"  fi
734    AM_CONDITIONAL(HAVE_SF2, test $HAVE_SF2 = 1)
735    AC_DEFINE_UNQUOTED(HAVE_SF2,$HAVE_SF2,[Define to 1 if you want SF2 engine and have libsf2 installed.])
736    config_have_sf2="no"
737    if test $HAVE_SF2 = "1"; then
738        config_have_sf2="yes"
739  fi  fi
 AM_CONDITIONAL(HAVE_SQLITE3, test $HAVE_SQLITE3 = 1)  
 AC_DEFINE_UNQUOTED(HAVE_SQLITE3,$HAVE_SQLITE3,[Define to 1 if you have SQLITE3 installed.])  
740    
741  if test "$have_midi_input_driver" = "false"; then  # Check presence of libsndfile
742      echo "No supported MIDI input system found!"  libsndfile_version="1.0"
743      echo "Sorry, LinuxSampler only supports the following MIDI drivers at the moment:"  PKG_CHECK_MODULES(SNDFILE, sndfile >= $libsndfile_version, HAVE_SNDFILE=true, HAVE_SNDFILE=false)
744      echo "ALSA, MIDIShare, CoreMIDI."  if test "$HAVE_SNDFILE" = "false"; then
745      echo "If you think you have one of those available on your system, make sure you"      echo "Required libsndfile version not found!"
746      echo "also have the respective development (header) files installed."      echo "You need to have libsndfile version ${libsndfile_version} installed!"
747      exit -1;      exit -1;
748    else
749        echo "yes, found libsndfile $libsndfile_version"
750  fi  fi
751  if test "$have_audio_output_driver" = "false"; then  AC_SUBST(SNDFILE_CFLAGS)
752      echo "No supported audio output system found!"  AC_SUBST(SNDFILE_LIBS)
753      echo "Sorry, LinuxSampler only supports ALSA and JACK as audio output driver at the moment!"  
754      exit -1;  # Check for Vorbis and FLAC support in libsndfile
755    linuxsampler_save_CFLAGS=$CFLAGS
756    CFLAGS="$SNDFILE_CFLAGS $CFLAGS"
757    AC_CHECK_DECLS([SF_FORMAT_VORBIS, SF_FORMAT_FLAC], [], [], [[#include <sndfile.h>]])
758    
759    # Check for loop functionality in libsndfile
760    AC_CHECK_MEMBERS([SF_INSTRUMENT.loops],,
761                     [AC_MSG_WARN([Your version of libsndfile does not support
762        reading of loop information. LinuxSampler will not be able to
763        extract loop information from sample files.])],
764                     [#include <sndfile.h>])
765    CFLAGS=$linuxsampler_save_CFLAGS
766    
767    # Instruments DB feature (requires SQLite 3.3)
768    AC_ARG_ENABLE(instruments-db,
769      [  --disable-instruments-db
770                              Disable compilation of the sampler's instruments
771                              database feature. You need to have SQLite 3.3
772                              or younger installed for this feature.],
773      [config_instruments_db="$enableval"],
774      [config_instruments_db="yes"]
775    )
776    HAVE_SQLITE3=0;
777    if test "$config_instruments_db" = "yes"; then
778        # Check presence of sqlite3
779        sqlite_version="3.3"
780        PKG_CHECK_MODULES(SQLITE3, sqlite3 >= $sqlite_version, HAVE_SQLITE3=true, HAVE_SQLITE3=false)
781        AC_SUBST(SQLITE3_LIBS)
782        AC_SUBST(SQLITE3_CFLAGS)
783        if test $HAVE_SQLITE3 = false; then
784            HAVE_SQLITE3=0
785            config_instruments_db="no"
786            echo "*** Required sqlite version not found!"
787            echo "*** You need to have sqlite version ${sqlite_version} or higher"
788            echo "*** for instruments database support to be enabled."
789            echo "*** Support for instruments DB will be disabled!"
790        else
791            HAVE_SQLITE3=1
792        fi
793    else
794        echo "Instruments DB feature disabled by configure script parameter"
795  fi  fi
796    AM_CONDITIONAL(HAVE_SQLITE3, test $HAVE_SQLITE3 = 1)
797    AC_DEFINE_UNQUOTED(HAVE_SQLITE3,$HAVE_SQLITE3,[Define to 1 if you want the instruments DB feature and have SQLITE3 installed.])
798    
799    
800    
801  ###########################################################################  ###########################################################################
# Line 363  if test "$config_asm" = "yes"; then Line 819  if test "$config_asm" = "yes"; then
819  fi  fi
820    
821  AC_ARG_ENABLE(dev-mode,  AC_ARG_ENABLE(dev-mode,
822    [  --disable-dev-mode    [  --enable-dev-mode
823                            Disable development mode (default=on). In that mode                            Enable development mode (default=off). In that mode
824                            we do some extra sanity checks here and there.                            we do some extra sanity checks here and there.
825                            This helps to spot possible problems, but reduces                            This helps to spot possible problems, but reduces
826                            efficiency a bit],                            efficiency a bit],
827    [config_dev_mode="$enableval"],    [config_dev_mode="$enableval"],
828    [config_dev_mode="yes"]    [config_dev_mode="no"]
829  )  )
830  if test "$config_dev_mode" = "yes"; then  if test "$config_dev_mode" = "yes"; then
831    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 403  if test "$config_rt_exceptions" = "yes"; Line 859  if test "$config_rt_exceptions" = "yes";
859    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.])
860  fi  fi
861    
862    AC_CHECK_FUNC(pthread_testcancel,
863      [config_pthread_testcancel="yes"],
864      [config_pthread_testcancel="no"]
865    )
866    if test "$config_pthread_testcancel" = "yes"; then
867      AC_DEFINE_UNQUOTED(CONFIG_PTHREAD_TESTCANCEL, 1, [Define to 1 if pthread_testcancel() is available.])
868    fi
869    
870  AC_ARG_ENABLE(preload-samples,  AC_ARG_ENABLE(preload-samples,
871    [  --enable-preload-samples    [  --enable-preload-samples
872                            Due to seeking and latency issues with hard drives                            Due to seeking and latency issues with hard drives
# Line 508  AC_DEFINE_UNQUOTED(CONFIG_STREAM_BUFFER_ Line 972  AC_DEFINE_UNQUOTED(CONFIG_STREAM_BUFFER_
972    
973  AC_ARG_ENABLE(max-streams,  AC_ARG_ENABLE(max-streams,
974    [  --enable-max-streams    [  --enable-max-streams
975                            Maximum amount of disk streams (default=90). This                            Initial maximum amount of disk streams
976                            value should always be higher than the maximum                            (default=90). This value can be changed at
977                            amount of voices.],                            runtime. It should always be higher than the
978                              maximum amount of voices.],
979    [config_max_streams="${enableval}"],    [config_max_streams="${enableval}"],
980    [config_max_streams="90"]    [config_max_streams="90"]
981  )  )
982  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.])
983    
984  AC_ARG_ENABLE(max-voices,  AC_ARG_ENABLE(max-voices,
985    [  --enable-max-voices    [  --enable-max-voices
986                            Maximum amount of voices (default=64). This value                            Initial maximum amount of voices (default=64).
987                            should always be lower than the maximum amount of                            This value can be changed at runtime. It should
988                            disk streams.],                            always be lower than the maximum amount of disk
989                              streams.],
990    [config_max_voices="${enableval}"],    [config_max_voices="${enableval}"],
991    [config_max_voices="64"]    [config_max_voices="64"]
992  )  )
993  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.])
994    
995  AC_ARG_ENABLE(subfragment-size,  AC_ARG_ENABLE(subfragment-size,
996    [  --enable-subfragment-size    [  --enable-subfragment-size
# Line 826  if test "$config_interpolate_volume" = " Line 1292  if test "$config_interpolate_volume" = "
1292    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.])
1293  fi  fi
1294    
1295    AC_ARG_ENABLE(master-volume-sysex-by-port,
1296      [  --enable-master-volume-sysex-by-port
1297                              Whether global volume sysex message should be
1298                              applied globally to the whole sampler or only to
1299                              the sampler channels connected to the same MIDI
1300                              input port on which the sysex message arrived on.
1301                              By default global volume sysex messages apply
1302                              globally to the whole sampler, since many MIDI
1303                              devices behave that way.],
1304      [config_master_volume_sysex_by_port="$enableval"],
1305      [config_master_volume_sysex_by_port="no"]
1306    )
1307    if test "$config_master_volume_sysex_by_port" = "yes"; then
1308      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.])
1309    fi
1310    
1311  AC_ARG_ENABLE(plugin-dir,  AC_ARG_ENABLE(plugin-dir,
1312    [  --enable-plugin-dir    [  --enable-plugin-dir
1313                            Directory where the sampler shall look for potential plugins,                            Directory where the sampler shall look for potential plugins,
# Line 839  AC_ARG_ENABLE(plugin-dir, Line 1321  AC_ARG_ENABLE(plugin-dir,
1321  )  )
1322  AC_SUBST(config_plugin_dir)  AC_SUBST(config_plugin_dir)
1323    
1324    AC_ARG_ENABLE(default-instruments-db-location,
1325      [  --enable-default-instruments-db-location
1326                              Only when instruments DB feature is enabled: file name
1327                              which shall be taken as default location of the
1328                              instruments DB file. This location can still be
1329                              overridden at runtime with a command line switch.
1330                              (default: /var/lib/linuxsampler/instruments.db)],
1331      [config_default_instruments_db_file="${enableval}"],
1332      [config_default_instruments_db_file="/var/lib/linuxsampler/instruments.db"]
1333    )
1334    AC_DEFINE_UNQUOTED(
1335        CONFIG_DEFAULT_INSTRUMENTS_DB_LOCATION,
1336        "$config_default_instruments_db_file",
1337        [Only when instruments DB feature is enabled: default location of the DB file.]
1338    )
1339    AC_SUBST(config_default_instruments_db_file)
1340    
1341    
1342  ###########################################################################  ###########################################################################
1343  # Automatic Benchmarks (to detect the best algorithms for the system)  # Automatic Benchmarks (to detect the best algorithms for the system)
1344    
 AC_LANG_SAVE  
   
1345  if test "$config_signed_triang_algo" = "benchmark"; then  if test "$config_signed_triang_algo" = "benchmark"; then
1346      echo -n "benchmarking for the best (signed) triangular oscillator algorithm... "      echo -n "benchmarking for the best (signed) triangular oscillator algorithm... "
1347      AC_LANG_CPLUSPLUS      AC_LANG_PUSH([C++])
1348      AC_TRY_RUN([      AC_RUN_IFELSE([AC_LANG_SOURCE([[
1349              #define SIGNED 1              #define SIGNED 1
1350              #define SILENT 1              #define SILENT 1
1351              #include "${srcdir}/benchmarks/triang.cpp"              #include "${srcdir}/benchmarks/triang.cpp"
1352          ],          ]])],
1353          triang_signed=0,          triang_signed=0,
1354          triang_signed=$?,          triang_signed=$?,
1355          triang_signed=0          triang_signed=0
1356      )      )
1357        AC_LANG_POP([C++])
1358      if test "$triang_signed" = "2"; then      if test "$triang_signed" = "2"; then
1359          config_signed_triang_algo="intmath"          config_signed_triang_algo="intmath"
1360          echo "integer math"          echo "integer math"
# Line 887  AC_DEFINE_UNQUOTED(CONFIG_SIGNED_TRIANG_ Line 1385  AC_DEFINE_UNQUOTED(CONFIG_SIGNED_TRIANG_
1385    
1386  if test "$config_unsigned_triang_algo" = "benchmark"; then  if test "$config_unsigned_triang_algo" = "benchmark"; then
1387      echo -n "benchmarking for the best (unsigned) triangular oscillator algorithm... "      echo -n "benchmarking for the best (unsigned) triangular oscillator algorithm... "
1388      AC_LANG_CPLUSPLUS      AC_LANG_PUSH([C++])
1389      AC_TRY_RUN([      AC_RUN_IFELSE([AC_LANG_SOURCE([[
1390              #define SIGNED 0              #define SIGNED 0
1391              #define SILENT 1              #define SILENT 1
1392              #include "${srcdir}/benchmarks/triang.cpp"              #include "${srcdir}/benchmarks/triang.cpp"
1393          ],          ]])],
1394          triang_unsigned=0,          triang_unsigned=0,
1395          triang_unsigned=$?,          triang_unsigned=$?,
1396          triang_unsigned=0          triang_unsigned=0
1397      )      )
1398        AC_LANG_POP([C++])
1399      if test "$triang_unsigned" = "2"; then      if test "$triang_unsigned" = "2"; then
1400          config_unsigned_triang_algo="intmath"          config_unsigned_triang_algo="intmath"
1401          echo "integer math"          echo "integer math"
# Line 925  else Line 1424  else
1424  fi  fi
1425  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.])
1426    
 AC_LANG_RESTORE  
   
1427    
1428  ###########################################################################  ###########################################################################
1429  # Create Build Files  # Create Build Files
1430    
1431  AM_CONFIG_HEADER(config.h)  AC_CONFIG_HEADERS([config.h])
 AM_INIT_AUTOMAKE(linuxsampler, "$LINUXSAMPLER_RELEASE_MAJOR.$LINUXSAMPLER_RELEASE_MINOR.$LINUXSAMPLER_RELEASE_BUILD")  
1432    
1433  AC_LANG_CPLUSPLUS  AC_LANG([C++])
 AC_PROG_CXX  
   
 # some gcc 4.0 versions need -msse for SSE register allocations  
 if test "$config_asm" = "yes"; then  
   if test "$def_arch_x86" = 1; then  
     CXXFLAGS="$CXXFLAGS -msse"  
   fi  
 fi  
1434    
1435  # 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
1436  # this, the dlfcn.h check in am_prog_libtool may fail.  # this, the dlfcn.h check in am_prog_libtool may fail.
1437  AC_CHECK_HEADER(stdlib.h)  AC_CHECK_HEADER(stdlib.h)
1438    
1439  AC_OUTPUT( \  AC_CONFIG_FILES([\
1440      Makefile \      Makefile \
1441      man/Makefile \      man/Makefile \
1442      man/linuxsampler.1 \      man/linuxsampler.1 \
1443        man/lscp.1 \
1444      src/Makefile \      src/Makefile \
1445      src/db/Makefile \      src/db/Makefile \
1446      src/network/Makefile \      src/network/Makefile \
1447      src/engines/Makefile \      src/engines/Makefile \
1448      src/engines/gig/Makefile \      src/engines/gig/Makefile \
1449        src/engines/sf2/Makefile \
1450        src/engines/sfz/Makefile \
1451      src/engines/common/Makefile \      src/engines/common/Makefile \
1452        src/effects/Makefile \
1453      src/common/Makefile \      src/common/Makefile \
1454      src/testcases/Makefile \      src/testcases/Makefile \
1455      src/drivers/Makefile \      src/drivers/Makefile \
1456      src/drivers/audio/Makefile \      src/drivers/audio/Makefile \
1457      src/drivers/midi/Makefile \      src/drivers/midi/Makefile \
1458        src/plugins/Makefile \
1459        src/hostplugins/Makefile \
1460        src/hostplugins/dssi/Makefile \
1461        src/hostplugins/lv2/Makefile \
1462        src/hostplugins/lv2/manifest.ttl \
1463        src/hostplugins/vst/Makefile \
1464        src/hostplugins/au/Makefile \
1465        src/scriptvm/Makefile \
1466        src/scriptvm/editor/Makefile \
1467        src/shell/Makefile \
1468      linuxsampler.spec \      linuxsampler.spec \
1469      debian/Makefile \      debian/Makefile \
1470      Artwork/Makefile \      Artwork/Makefile \
# Line 974  AC_OUTPUT( \ Line 1476  AC_OUTPUT( \
1476      Documentation/Engines/gig/Makefile \      Documentation/Engines/gig/Makefile \
1477      linuxsampler.pc \      linuxsampler.pc \
1478      Doxyfile \      Doxyfile \
1479  )  ])
1480    AC_OUTPUT
1481    
1482  # resolve all nested variables in '${config_plugin_dir}'  # resolve all nested variables in '${config_plugin_dir}'
1483  # (merely for providing a human readable summary below)  # (merely for providing a human readable summary below)
# Line 990  echo "" Line 1493  echo ""
1493  echo "#####################################################################"  echo "#####################################################################"
1494  echo "# LinuxSampler Configuration                                        #"  echo "# LinuxSampler Configuration                                        #"
1495  echo "#-------------------------------------------------------------------#"  echo "#-------------------------------------------------------------------#"
1496    echo "# Release Version: ${VERSION}"
1497    echo "# LSCP Version: ${LSCP_RELEASE_MAJOR}.${LSCP_RELEASE_MINOR}"
1498    echo "#-------------------------------------------------------------------"
1499  echo "# Assembly Optimizations: ${config_asm}"  echo "# Assembly Optimizations: ${config_asm}"
1500  echo "# Development Mode: ${config_dev_mode}"  echo "# Development Mode: ${config_dev_mode}"
1501  echo "# Debug Level: ${config_debug_level}"  echo "# Debug Level: ${config_debug_level}"
# Line 1003  echo "# Streams to be refilled per Disk Line 1509  echo "# Streams to be refilled per Disk
1509  echo "# Minimum Stream Refill Size: ${config_stream_min_refill}"  echo "# Minimum Stream Refill Size: ${config_stream_min_refill}"
1510  echo "# Maximum Stream Refill Size: ${config_stream_max_refill}"  echo "# Maximum Stream Refill Size: ${config_stream_max_refill}"
1511  echo "# Stream Size: ${config_stream_size}"  echo "# Stream Size: ${config_stream_size}"
1512  echo "# Maximum Disk Streams: ${config_max_streams}"  echo "# Default Maximum Disk Streams: ${config_max_streams}"
1513  echo "# Maximum Voices: ${config_max_voices}"  echo "# Default Maximum Voices: ${config_max_voices}"
1514  echo "# Default Subfragment Size: ${config_subfragment_size}"  echo "# Default Subfragment Size: ${config_subfragment_size}"
1515  echo "# Default Global Volume Attenuation: ${config_global_attenuation_default}"  echo "# Default Global Volume Attenuation: ${config_global_attenuation_default}"
1516  echo "# Voice Stealing Algorithm: ${config_voice_steal_algo}"  echo "# Voice Stealing Algorithm: ${config_voice_steal_algo}"
# Line 1023  echo "# Override Filter Type: ${config_o Line 1529  echo "# Override Filter Type: ${config_o
1529  echo "# Assert GS SysEx Checksum: ${config_assert_gs_sysex_checksum}"  echo "# Assert GS SysEx Checksum: ${config_assert_gs_sysex_checksum}"
1530  echo "# Process Muted Channels: ${config_process_muted_channels}"  echo "# Process Muted Channels: ${config_process_muted_channels}"
1531  echo "# Process All-Notes-Off MIDI message: ${config_process_all_notes_off}"  echo "# Process All-Notes-Off MIDI message: ${config_process_all_notes_off}"
1532    echo "# Apply global volume SysEx by MIDI port: ${config_master_volume_sysex_by_port}"
1533  echo "# Interpolate Volume: ${config_interpolate_volume}"  echo "# Interpolate Volume: ${config_interpolate_volume}"
1534  echo "# Instruments database support: ${instruments_db_support}"  echo "# Instruments database support: ${config_instruments_db}"
1535    if test "$config_instruments_db" = "yes"; then
1536    echo "# Instruments DB default location: ${config_default_instruments_db_file}"
1537    fi
1538  echo "# Plugin Path: ${config_plugin_dir}"  echo "# Plugin Path: ${config_plugin_dir}"
1539    echo "#-------------------------------------------------------------------"
1540    echo "# MIDI Input Drivers:"
1541    echo "# ALSA: ${config_have_alsa}, JACK: ${config_have_jack_midi}, CoreMIDI: ${config_have_coremidi}, MME: ${config_have_mme}, MidiShare: ${config_have_midishare}"
1542    echo "#-------------------------------------------------------------------"
1543    echo "# Audio Output Drivers:"
1544    echo "# ALSA: ${config_have_alsa}, JACK: ${config_have_jack}, ARTS: ${config_have_arts}, CoreAudio: ${config_have_coreaudio}, ASIO: ${config_have_asio}"
1545    echo "#-------------------------------------------------------------------"
1546    echo "# Sampler Engines:"
1547    echo "# GIG: yes, SF2: ${config_have_sf2}, SFZ: yes"
1548    echo "#-------------------------------------------------------------------"
1549    echo "# Effect plugin systems for internal effects:"
1550    echo "# LADSPA: yes"
1551    echo "#-------------------------------------------------------------------"
1552    echo "# Building sampler as plugin for following host standards:"
1553    echo "# DSSI: ${config_have_dssi}, LV2: ${config_have_lv2}, VST: ${config_have_vst}, AU: ${config_have_au}"
1554  echo "#-------------------------------------------------------------------#"  echo "#-------------------------------------------------------------------#"
1555  echo "# Read './configure --help' or file 'configure.in' for details.     #"  echo "# Read './configure --help' or file 'configure.in' for details.     #"
1556  echo "#####################################################################"  echo "#####################################################################"

Legend:
Removed from v.1360  
changed lines
  Added in v.3917

  ViewVC Help
Powered by ViewVC