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

Diff of /linuxsampler/trunk/configure.in

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

revision 617 by schoenebeck, Wed Jun 8 21:00:06 2005 UTC revision 947 by schoenebeck, Mon Nov 27 21:34:55 2006 UTC
# Line 1  Line 1 
1  AC_INIT(configure.in)  AC_INIT(configure.in)
2    
3    #------------------------------------------------------------------------------------
4    # LinuxSampler's / liblinuxsampler's "official" release version:
5    
6    LINUXSAMPLER_RELEASE_MAJOR=0
7    LINUXSAMPLER_RELEASE_MINOR=4
8    LINUXSAMPLER_RELEASE_BUILD=0.1cvs
9    
10    #------------------------------------------------------------------------------------
11    # The following is the libtool / shared library version. This doesn't have to
12    # do anything with the release version. It MUST conform to the following rules:
13    #
14    #  1. Start with version information of `0:0:0' for each libtool library.
15    #  2. Update the version information only immediately before a public release of
16    #     your software. More frequent updates are unnecessary, and only guarantee
17    #     that the current interface number gets larger faster.
18    #  3. If the library source code has changed at all since the last update, then
19    #     increment revision (`c:r:a' becomes `c:r+1:a').
20    #  4. If any interfaces have been added, removed, or changed since the last update,
21    #     increment current, and set revision to 0.
22    #  5. If any interfaces have been added since the last public release, then increment
23    #     age.
24    #  6. If any interfaces have been removed since the last public release, then set age
25    #     to 0.
26    
27    LIBLINUXSAMPLER_LT_CURRENT=0
28    LIBLINUXSAMPLER_LT_REVISION=0
29    LIBLINUXSAMPLER_LT_AGE=0
30    SHARED_VERSION_INFO="$LIBLINUXSAMPLER_LT_CURRENT:$LIBLINUXSAMPLER_LT_REVISION:$LIBLINUXSAMPLER_LT_AGE"
31    
32    #------------------------------------------------------------------------------------
33    # the LSCP specification version this LinuSampler release complies with:
34    
35    LSCP_RELEASE_MAJOR=1
36    LSCP_RELEASE_MINOR=2
37    
38    AC_DEFINE_UNQUOTED(LSCP_RELEASE_MAJOR, ${LSCP_RELEASE_MAJOR}, [LSCP spec major version this release complies with.])
39    AC_DEFINE_UNQUOTED(LSCP_RELEASE_MINOR, ${LSCP_RELEASE_MINOR}, [LSCP spec minor version this release complies with.])
40    
41    AM_PROG_LIBTOOL
42    
43    AC_SUBST(SHLIB_VERSION_ARG)
44    AC_SUBST(SHARED_VERSION_INFO)
45    
46  AC_C_BIGENDIAN  AC_C_BIGENDIAN
47  AC_CANONICAL_SYSTEM  AC_CANONICAL_SYSTEM
48    
# Line 24  esac Line 68  esac
68  AC_DEFINE_UNQUOTED(ARCH_X86,$def_arch_x86,[Define to 1 if you build for x86 architecture.])  AC_DEFINE_UNQUOTED(ARCH_X86,$def_arch_x86,[Define to 1 if you build for x86 architecture.])
69    
70  # determine the right gcc switch for CPU specific optimizations  # determine the right gcc switch for CPU specific optimizations
71    # (only if the user did not provide one)
72  CXX_CPU_SWITCH=  CXX_CPU_SWITCH=
73  if test "$def_arch_x86" = 1; then  if ! echo "X $CXXFLAGS " | grep -q -- " \(-march=\|-mcpu=\|-mtune=\|-arch=\)" ; then
74    CXX_CPU_SWITCH="-march=$target_cpu"    if test "$def_arch_x86" = 1; then
75  elif test "$target_cpu" = "powerpc"; then      CXX_CPU_SWITCH="-march=$target_cpu"
76    CXX_CPU_SWITCH="-arch=$target_cpu"    elif test "$target_cpu" = "ppc"; then
77        CXX_CPU_SWITCH="-arch=$target_cpu"
78      fi
79  fi  fi
80  AC_SUBST([CXX_CPU_SWITCH])  AC_SUBST([CXX_CPU_SWITCH])
81    
# Line 64  if test "$have_unix98" = "no"; then Line 111  if test "$have_unix98" = "no"; then
111      fi      fi
112  fi  fi
113    
114    # check for <features.h>
115    AC_CHECK_HEADERS(features.h)
116    
117    
118    ###########################################################################
119  # Checks for available audio and MIDI systems / drivers  # Checks for available audio and MIDI systems / drivers
120  # (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)
121    
122  have_midi_input_driver="false"  have_midi_input_driver="false"
123  have_audio_output_driver="false"  have_audio_output_driver="false"
124    
125  AC_CHECK_HEADER(alsa/asoundlib.h,  # ALSA
126      AC_CHECK_LIB(asound, main,  AC_ARG_ENABLE(alsa-driver,
127                               have_alsa=1    [  --disable-alsa-driver
128                               ,                            Disable support for the Advanced Linux Sound
129                               have_alsa=0                            Architecture (ALSA).],
130                  )    [config_alsa_driver="no"],
131                  ,    [config_alsa_driver="yes"]
132                  have_alsa=0  )
133  )  have_alsa=0
134  if test "$have_alsa" = "1"; then  if test "$config_alsa_driver" = "yes"; then
135      have_midi_input_driver="true"      AC_CHECK_HEADER(alsa/asoundlib.h,
136      have_audio_output_driver="true";          AC_CHECK_LIB(asound, main,
137                                     have_alsa=1
138                                     ,
139                                     have_alsa=0
140                        )
141                        ,
142                        have_alsa=0
143        )
144        if test "$have_alsa" = "1"; then
145            have_midi_input_driver="true"
146            have_audio_output_driver="true";
147        fi
148    
149        echo -n "checking Alsa version... "
150        AC_LANG_SAVE
151        AC_LANG_C
152        AC_TRY_RUN([
153            #include <alsa/asoundlib.h>
154            void main(void) {
155                /* ensure backward compatibility */
156                #if !defined(SND_LIB_MAJOR) && defined(SOUNDLIB_VERSION_MAJOR)
157                #define SND_LIB_MAJOR SOUNDLIB_VERSION_MAJOR
158                #endif
159                exit(SND_LIB_MAJOR);
160            }
161        ],
162        alsa_major=0,
163        alsa_major=$?,
164        alsa_major=0
165        )
166        AC_TRY_RUN([
167            #include <alsa/asoundlib.h>
168            void main(void) {
169                /* ensure backward compatibility */
170                #if !defined(SND_LIB_MINOR) && defined(SOUNDLIB_VERSION_MINOR)
171                #define SND_LIB_MINOR SOUNDLIB_VERSION_MINOR
172                #endif
173                exit(SND_LIB_MINOR);
174            }
175        ],
176        alsa_minor=0,
177        alsa_minor=$?,
178        alsa_minor=0
179        )
180        AC_TRY_RUN([
181            #include <alsa/asoundlib.h>
182            void main(void) {
183                /* ensure backward compatibility */
184                #if !defined(SND_LIB_SUBMINOR) && defined(SOUNDLIB_VERSION_SUBMINOR)
185                #define SND_LIB_SUBMINOR SOUNDLIB_VERSION_SUBMINOR
186                #endif
187                exit(SND_LIB_SUBMINOR);
188            }
189        ],
190        alsa_subminor=0,
191        alsa_subminor=$?,
192        alsa_subminor=0
193        )
194        AC_LANG_RESTORE
195        echo "$alsa_major.$alsa_minor.$alsa_subminor";
196        AC_DEFINE_UNQUOTED(ALSA_MAJOR,$alsa_major,[Define to the major version number of your Alsa installation.])
197        AC_DEFINE_UNQUOTED(ALSA_MINOR,$alsa_minor,[Define to the minor version number of your Alsa installation.])
198        AC_DEFINE_UNQUOTED(ALSA_SUBMINOR,$alsa_subminor,[Define to the subminor version number of your Alsa installation.])
199    else
200        echo "ALSA support disabled by configure script parameter"
201  fi  fi
202  AM_CONDITIONAL(HAVE_ALSA, test $have_alsa = "1")  AM_CONDITIONAL(HAVE_ALSA, test $have_alsa = "1")
203  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.])
204    
 echo -n "checking Alsa version... "  
 AC_LANG_SAVE  
 AC_LANG_C  
 AC_TRY_RUN([  
 #include <alsa/asoundlib.h>  
 void main(void) {  
 /* ensure backward compatibility */  
 #if !defined(SND_LIB_MAJOR) && defined(SOUNDLIB_VERSION_MAJOR)  
 #define SND_LIB_MAJOR SOUNDLIB_VERSION_MAJOR  
 #endif  
 exit(SND_LIB_MAJOR);  
 }  
 ],  
 alsa_major=0,  
 alsa_major=$?,  
 alsa_major=0  
 )  
 AC_TRY_RUN([  
 #include <alsa/asoundlib.h>  
 void main(void) {  
 /* ensure backward compatibility */  
 #if !defined(SND_LIB_MINOR) && defined(SOUNDLIB_VERSION_MINOR)  
 #define SND_LIB_MINOR SOUNDLIB_VERSION_MINOR  
 #endif  
 exit(SND_LIB_MINOR);  
 }  
 ],  
 alsa_minor=0,  
 alsa_minor=$?,  
 alsa_minor=0  
 )  
 AC_TRY_RUN([  
 #include <alsa/asoundlib.h>  
 void main(void) {  
 /* ensure backward compatibility */  
 #if !defined(SND_LIB_SUBMINOR) && defined(SOUNDLIB_VERSION_SUBMINOR)  
 #define SND_LIB_SUBMINOR SOUNDLIB_VERSION_SUBMINOR  
 #endif  
 exit(SND_LIB_SUBMINOR);  
 }  
 ],  
 alsa_subminor=0,  
 alsa_subminor=$?,  
 alsa_subminor=0  
 )  
 AC_LANG_RESTORE  
 echo "$alsa_major.$alsa_minor.$alsa_subminor";  
 AC_DEFINE_UNQUOTED(ALSA_MAJOR,$alsa_major,[Define to the major version number of your Alsa installation.])  
 AC_DEFINE_UNQUOTED(ALSA_MINOR,$alsa_minor,[Define to the minor version number of your Alsa installation.])  
 AC_DEFINE_UNQUOTED(ALSA_SUBMINOR,$alsa_subminor,[Define to the subminor version number of your Alsa installation.])  
   
205  # JACK  # JACK
206  PKG_CHECK_MODULES(JACK, jack, HAVE_JACK=true, HAVE_JACK=false)  AC_ARG_ENABLE(jack-driver,
207  AC_SUBST(JACK_LIBS)    [  --disable-jack-driver
208  AC_SUBST(JACK_CFLAGS)                            Disable support for the Jack Audio Connection Kit
209  if test $HAVE_JACK = false; then                            (JACK).],
210      HAVE_JACK=0;    [config_jack_driver="no"],
211      [config_jack_driver="yes"]
212    )
213    have_jack=0
214    if test "$config_jack_driver" = "yes"; then
215        PKG_CHECK_MODULES(JACK, jack, have_jack=1, have_jack=0)
216        if test $have_jack = "1"; then
217            AC_SUBST(JACK_LIBS)
218            AC_SUBST(JACK_CFLAGS)
219            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)
220            have_audio_output_driver="true";
221        fi
222  else  else
223      HAVE_JACK=1      echo "JACK support disabled by configure script parameter"
     have_audio_output_driver="true";  
     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)  
224  fi  fi
225  AM_CONDITIONAL(HAVE_JACK, test $HAVE_JACK = 1)  AM_CONDITIONAL(HAVE_JACK, test $have_jack = "1")
226  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.])
227    
228    # ARTS
229    AC_ARG_ENABLE(arts-driver,
230      [  --disable-arts-driver
231                              Disable support for the Analogue Realtime System
232                              (aRts).],
233      [config_arts_driver="no"],
234      [config_arts_driver="yes"]
235    )
236    have_arts=0
237    if test "$config_arts_driver" = "yes"; then
238        m4_ifdef([m4_include(m4/arts.m4)],,
239                 [sinclude([m4/arts.m4])])
240        AM_PATH_ARTS(0.9.5, have_arts=1, have_arts=0)
241        if test "$have_arts" = "1"; then
242            have_audio_output_driver="true"
243        fi
244    else
245        echo "ARTS support disabled by configure script parameter"
246    fi
247    AM_CONDITIONAL(HAVE_ARTS, test "$have_arts" = "1")
248    AC_DEFINE_UNQUOTED(HAVE_ARTS,$have_arts,[Define to 1 if you have aRts installed.])
249    
250  # MidiShare (Linux, OS X, Windows)  # MidiShare (Linux, OS X, Windows)
251  AC_CHECK_HEADER(MidiShare.h,  AC_ARG_ENABLE(midishare-driver,
252      AC_CHECK_LIB(MidiShare, MidiCountEvs,    [  --disable-midishare-driver
253                              have_midishare=1,                            Disable support for the MidiShare system.],
254                              have_midishare=0    [config_midishare_driver="no"],
255                  )    [config_midishare_driver="yes"]
256                  ,  )
257                  have_midishare=0  have_midishare=0
258  )  if test "$config_midishare_driver" = "yes"; then
259  if test "$have_midishare" = "1"; then      AC_CHECK_HEADER(MidiShare.h,
260      have_midi_input_driver="true"          AC_CHECK_LIB(MidiShare, MidiCountEvs,
261                                    have_midishare=1,
262                                    have_midishare=0
263                        )
264                        ,
265                        have_midishare=0
266        )
267        if test "$have_midishare" = "1"; then
268            have_midi_input_driver="true"
269        fi
270    else
271        echo "MidiShare support disabled by configure script parameter"
272  fi  fi
273  AM_CONDITIONAL(HAVE_MIDISHARE, test $have_midishare = "1")  AM_CONDITIONAL(HAVE_MIDISHARE, test $have_midishare = "1")
274  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.])
275    
276  # CoreMIDI (OS X)  # CoreMIDI (OS X)
277  AC_CHECK_HEADER(CoreMIDI/CoreMIDI.h,  AC_ARG_ENABLE(coremidi-driver,
278                  have_coremidi=1,    [  --disable-coremidi-driver
279                  have_coremidi=0                            Disable support for the Apple CoreMIDI system.],
280  )    [config_coremidi_driver="no"],
281  if test "$have_coremidi" = "1"; then    [config_coremidi_driver="yes"]
282      have_midi_input_driver="true"  )
283    have_coremidi=0
284    if test "$config_coremidi_driver" = "yes"; then
285        AC_CHECK_HEADER(CoreMIDI/CoreMIDI.h,
286            have_coremidi=1,
287            have_coremidi=0
288        )
289        if test "$have_coremidi" = "1"; then
290            have_midi_input_driver="true"
291        fi
292    else
293        echo "CoreMIDI support disabled by configure script parameter"
294  fi  fi
295  AM_CONDITIONAL(HAVE_COREMIDI, test $have_coremidi = "1")  AM_CONDITIONAL(HAVE_COREMIDI, test $have_coremidi = "1")
296  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.])
297    
298  # Check presence of libgig  # Check presence of libgig
299  libgig_version="2.0.0"  libgig_version="3.1.0"
300  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)
301  if test "$HAVE_GIG" = "false"; then  if test "$HAVE_GIG" = "false"; then
302      echo "Required libgig version not found!"      echo "Required libgig version not found!"
303      echo "You need to have libgig version ${libgig_version} installed!"      echo "You need to have libgig version ${libgig_version} installed!"
304      exit -1;      exit -1;
305    else
306        echo "yes, found libgig $libgig_version"
307  fi  fi
308  AC_SUBST(GIG_CFLAGS)  AC_SUBST(GIG_CFLAGS)
309  AC_SUBST(GIG_LIBS)  AC_SUBST(GIG_LIBS)
# Line 193  AC_SUBST(SQLITE3_LIBS) Line 314  AC_SUBST(SQLITE3_LIBS)
314  AC_SUBST(SQLITE3_CFLAGS)  AC_SUBST(SQLITE3_CFLAGS)
315  if test $HAVE_SQLITE3 = false; then  if test $HAVE_SQLITE3 = false; then
316      HAVE_SQLITE3=0;      HAVE_SQLITE3=0;
317        echo "no, support for instrument DB will be disabled!"
318  else  else
319      HAVE_SQLITE3=1      HAVE_SQLITE3=1
320        echo "yes"
321  fi  fi
322  AM_CONDITIONAL(HAVE_SQLITE3, test $HAVE_SQLITE3 = 1)  AM_CONDITIONAL(HAVE_SQLITE3, test $HAVE_SQLITE3 = 1)
323  AC_DEFINE_UNQUOTED(HAVE_SQLITE3,$HAVE_SQLITE3,[Define to 1 if you have SQLITE3 installed.])  AC_DEFINE_UNQUOTED(HAVE_SQLITE3,$HAVE_SQLITE3,[Define to 1 if you have SQLITE3 installed.])
# Line 220  fi Line 343  fi
343  # TODO: should we use AC_ARG_VAR(variable, description) instead?  # TODO: should we use AC_ARG_VAR(variable, description) instead?
344    
345  AC_ARG_ENABLE(asm,  AC_ARG_ENABLE(asm,
346    [  --disable-asm    [  --enable-asm
347                            Disable hand-crafted assembly optimizations                            Enable hand-crafted assembly optimizations
348                            (default=on). LinuxSampler provides CPU specific                            (default=off). LinuxSampler provides CPU specific
349                            assembly optimizations for the most important                            assembly optimizations for the most important
350                            synthesis algorithms. You usually don't want to                            synthesis algorithms. This is currently disabled
351                            diable that.],                            by default since current asm code is broken.],
352    [config_asm="no"],    [config_asm="yes"],
353    [config_asm="yes"]    [config_asm="no"]
354  )  )
355  if test "$config_asm" = "yes"; then  if test "$config_asm" = "yes"; then
356    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 hand-crafted asm optimizations.])
357  fi  fi
358    
359  AC_ARG_ENABLE(dev-mode,  AC_ARG_ENABLE(dev-mode,
360    [  --enable-dev-mode    [  --disable-dev-mode
361                            Enable development mode (default=no). In that mode                            Disable development mode (default=on). In that mode
362                            we do some extra sanity checks here and there.                            we do some extra sanity checks here and there.
363                            This helps to spot possible problems, but reduces                            This helps to spot possible problems, but reduces
364                            efficiency a bit],                            efficiency a bit],
365    [config_dev_mode="yes"],    [config_dev_mode="no"],
366    [config_dev_mode="no"]    [config_dev_mode="yes"]
367  )  )
368  if test "$config_dev_mode" = "yes"; then  if test "$config_dev_mode" = "yes"; then
369    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 397  AC_ARG_ENABLE(max-voices, Line 520  AC_ARG_ENABLE(max-voices,
520  )  )
521  AC_DEFINE_UNQUOTED(CONFIG_MAX_VOICES, $config_max_voices, [Define max. voices.])  AC_DEFINE_UNQUOTED(CONFIG_MAX_VOICES, $config_max_voices, [Define max. voices.])
522    
523    AC_ARG_ENABLE(subfragment-size,
524      [  --enable-subfragment-size
525                              Every audio fragment will be splitted into
526                              subfragments. Where each subfragment renders
527                              audio with constant synthesis parameters. This is
528                              done for efficiency reasons. This parameter
529                              defines the default size of a subfragment in
530                              sample points. A large value means less CPU time
531                              whereas a low value means better audio quality
532                              (default=32).],
533      [config_subfragment_size="${enableval}"],
534      [config_subfragment_size="32"]
535    )
536    AC_DEFINE_UNQUOTED(CONFIG_DEFAULT_SUBFRAGMENT_SIZE, $config_subfragment_size, [Define default subfragment size (in sample points).])
537    
538    AC_ARG_ENABLE(global-attenuation,
539      [  --enable-global-attenuation
540                              To prevent clipping all samples will be lowered
541                              in amplitude by this given factor.
542                              (default=0.35)],
543      [config_global_attenuation="${enableval}"],
544      [config_global_attenuation="0.35"]
545    )
546    AC_DEFINE_UNQUOTED(CONFIG_GLOBAL_ATTENUATION, $config_global_attenuation, [Define global volume attenuation (as floating point factor).])
547    
548  AC_ARG_ENABLE(voice-steal-algo,  AC_ARG_ENABLE(voice-steal-algo,
549    [  --enable-voice-steal-algo    [  --enable-voice-steal-algo
550                            Voice stealing algorithm to be used. Currently                            Voice stealing algorithm to be used. Currently
# Line 430  AC_ARG_ENABLE(sysex-buffer-size, Line 578  AC_ARG_ENABLE(sysex-buffer-size,
578  )  )
579  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.])
580    
 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.])  
   
581  AC_ARG_ENABLE(force-filter,  AC_ARG_ENABLE(force-filter,
582    [  --enable-force-filter    [  --enable-force-filter
583                            If enabled will force filter to be used even if                            If enabled will force filter to be used even if
# Line 544  if test "config_assert_gs_sysex_checksum Line 680  if test "config_assert_gs_sysex_checksum
680    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.])
681  fi  fi
682    
683    AC_ARG_ENABLE(portamento-time-min,
684      [  --enable-portamento-time-min
685                              Minimum Portamento time in seconds
686                              (default=0.1).],
687      [config_portamento_time_min="${enableval}"],
688      [config_portamento_time_min="0.1"]
689    )
690    AC_DEFINE_UNQUOTED(CONFIG_PORTAMENTO_TIME_MIN, $config_portamento_time_min, [Define min. portamento time.])
691    
692    AC_ARG_ENABLE(portamento-time-max,
693      [  --enable-portamento-time-max
694                              Maximum Portamento time in seconds
695                              (default=32).],
696      [config_portamento_time_max="${enableval}"],
697      [config_portamento_time_max="32"]
698    )
699    AC_DEFINE_UNQUOTED(CONFIG_PORTAMENTO_TIME_MAX, $config_portamento_time_max, [Define max. portamento time.])
700    
701    AC_ARG_ENABLE(portamento-time-default,
702      [  --enable-portamento-time-default
703                              Default Portamento time in seconds
704                              (default=1).],
705      [config_portamento_time_default="${enableval}"],
706      [config_portamento_time_default="1"]
707    )
708    AC_DEFINE_UNQUOTED(CONFIG_PORTAMENTO_TIME_DEFAULT, $config_portamento_time_default, [Define default portamento time.])
709    
710    AC_ARG_ENABLE(signed-triang-algo,
711      [  --enable-signed-triang-algo
712                              Signed triangular wave algorithm to be used (e.g. for LFOs).
713                              Currently available options:
714                                intmath:
715                                  Uses integer math without any branch will then be
716                                  converted to floating point value for each sample point.
717                                  This int->float conversion might hurt on some systems.
718                                intmathabs:
719                                  Similar to intmath but uses abs() function.
720                                  Depending on compiler and platrofm this could
721                                  perform better than integer math as it avoids
722                                  an extra integer multiply instruction.
723    
724                                diharmonic:
725                                  The triangular wave will be approximated by adding two
726                                  sinusoidials. This solution might especially hurt on
727                                  systems with weak floating point unit.
728                                benchmark (default):
729                                  This is not an algorithm. Use this option if the
730                                  appropriate algorithm should be automatically
731                                  chosen by the configure script by performing a
732                                  benchmark between the algorithms mentioned above.
733                                  This will NOT work for cross compilation!],
734      [ if test ! "(" "${enableval}" = "intmath" \
735                  -o "${enableval}" = "intmathabs" \
736                  -o "${enableval}" = "diharmonic" ")" ; then
737          AC_MSG_ERROR([Unknown triangular wave algorithm for parameter --enable-signed-triang-algo])
738        else
739          config_signed_triang_algo="${enableval}"
740        fi
741      ],
742      [config_signed_triang_algo="benchmark"]
743    )
744    
745    AC_ARG_ENABLE(unsigned-triang-algo,
746      [  --enable-unsigned-triang-algo
747                              Unsigned triangular wave algorithm to be used (e.g. for LFOs).
748                              Currently available options:
749                                intmath:
750                                  Uses integer math without any branch will then be
751                                  converted to floating point value for each sample point.
752                                  This int->float conversion might hurt on some systems.
753                                intmathabs:
754                                  Similar to intmath but uses abs() function.
755                                  Depending on compiler and platrofm this could
756                                  perform better than integer math as it avoids
757                                  an extra integer multiply instruction.
758    
759                                diharmonic:
760                                  The triangular wave will be approximated by adding two
761                                  sinusoidials. This solution might especially hurt on
762                                  systems with weak floating point unit.
763                                benchmark (default):
764                                  This is not an algorithm. Use this option if the
765                                  appropriate algorithm should be automatically
766                                  chosen by the configure script by performing a
767                                  benchmark between the algorithms mentioned above.
768                                  This will NOT work for cross compilation!],
769      [ if test ! "(" "${enableval}" = "intmath" \
770                  -o "${enableval}" = "intmathabs" \
771                  -o "${enableval}" = "diharmonic" ")" ; then
772          AC_MSG_ERROR([Unknown triangular wave algorithm for parameter --enable-unsigned-triang-algo])
773        else
774          config_unsigned_triang_algo="${enableval}"
775        fi
776      ],
777      [config_unsigned_triang_algo="benchmark"]
778    )
779    
780    AC_ARG_ENABLE(process-muted-channels,
781      [  --enable-process-muted-channels
782                              Enable processing of muted channels (default=no).
783                              In that mode all MIDI events in the muted channels
784                              will be processed. This will provide information
785                              about the active voices in the muted channels and
786                              will not discard notes, triggered in mute mode,
787                              when the channel is unmuted. But also will reduce
788                              the efficiency.],
789      [config_process_muted_channels="yes"],
790      [config_process_muted_channels="no"]
791    )
792    if test "$config_process_muted_channels" = "yes"; then
793      AC_DEFINE_UNQUOTED(CONFIG_PROCESS_MUTED_CHANNELS, 1, [Define to 1 if you want to enable processing of muted channels.])
794    fi
795    
796    AC_ARG_ENABLE(process-all-notes-off,
797      [  --disable-process-all-notes-off
798                              Disable interpretation of All-Notes-Off MIDI
799                              messages (default=on). By default LS will release
800                              all voices whenever it receives an All-Notes-Off
801                              MIDI message. You can disable this behavior, so
802                              that LS simply ignores such messages.],
803      [config_process_all_notes_off="no"],
804      [config_process_all_notes_off="yes"]
805    )
806    if test "$config_process_all_notes_off" = "yes"; then
807      AC_DEFINE_UNQUOTED(CONFIG_PROCESS_ALL_NOTES_OFF, 1, [Define to 1 if you want to enable processing of All-Notes-Off MIDI messages.])
808    fi
809    
810    AC_ARG_ENABLE(interpolate-volume,
811      [  --disable-interpolate-volume
812                              Disable interpolation of volume modulation
813                              (default=on). With this enabled, the volume changes
814                              generated by for example the envelope generator
815                              will be smoother, minimizing the risk for audio
816                              clicks. Disable it to reduce CPU usage.],
817      [config_interpolate_volume="no"],
818      [config_interpolate_volume="yes"]
819    )
820    if test "$config_interpolate_volume" = "yes"; then
821      AC_DEFINE_UNQUOTED(CONFIG_INTERPOLATE_VOLUME, 1, [Define to 1 if you want to enable interpolation of volume modulation.])
822    fi
823    
824    
825    ###########################################################################
826    # Automatic Benchmarks (to detect the best algorithms for the system)
827    
828    AC_LANG_SAVE
829    
830    if test "$config_signed_triang_algo" = "benchmark"; then
831        echo -n "benchmarking for the best (signed) triangular oscillator algorithm... "
832        AC_LANG_CPLUSPLUS
833        AC_TRY_RUN([
834                #define SIGNED 1
835                #define SILENT 1
836                #include "${srcdir}/benchmarks/triang.cpp"
837            ],
838            triang_signed=0,
839            triang_signed=$?,
840            triang_signed=0
841        )
842        if test "$triang_signed" = "2"; then
843            config_signed_triang_algo="intmath"
844            echo "integer math"
845        elif test "$triang_signed" = "3"; then
846            config_signed_triang_algo="diharmonic"
847            echo "di harmonics"
848        elif test "$triang_signed" = "5"; then
849            config_signed_triang_algo="intmathabs"
850            echo "integer math using abs()"
851        else
852            echo "Benchmark of signed triangular wave algorithms failed!"
853            echo "Maybe you are doing cross compilation? In that case you have to select"
854            echo "an algorithm manually with './configure --enable-signed-triang-algo=...'"
855            echo "Call './configure --help' for further information or read configure.in."
856            exit -1;
857        fi
858    fi
859    AC_DEFINE_UNQUOTED(CONFIG_SIGNED_TRIANG_ALGO, ${triang_signed}, [Define signed triangular wave algorithm to be used.])
860    
861    if test "$config_unsigned_triang_algo" = "benchmark"; then
862        echo -n "benchmarking for the best (unsigned) triangular oscillator algorithm... "
863        AC_LANG_CPLUSPLUS
864        AC_TRY_RUN([
865                #define SIGNED 0
866                #define SILENT 1
867                #include "${srcdir}/benchmarks/triang.cpp"
868            ],
869            triang_unsigned=0,
870            triang_unsigned=$?,
871            triang_unsigned=0
872        )
873        if test "$triang_unsigned" = "2"; then
874            config_unsigned_triang_algo="intmath"
875            echo "integer math"
876        elif test "$triang_unsigned" = "3"; then
877            config_unsigned_triang_algo="diharmonic"
878            echo "di harmonics"
879        elif test "$triang_unsigned" = "5"; then
880            config_unsigned_triang_algo="intmathabs"
881            echo "integer math using abs()"
882        else
883            echo "Benchmark of unsigned triangular wave algorithms failed!"
884            echo "Maybe you are doing cross compilation? In that case you have to select"
885            echo "an algorithm manually with './configure --enable-unsigned-triang-algo=...'"
886            echo "Call './configure --help' for further information or read configure.in."
887            exit -1;
888        fi
889    fi
890    AC_DEFINE_UNQUOTED(CONFIG_UNSIGNED_TRIANG_ALGO, ${triang_unsigned}, [Define unsigned triangular wave algorithm to be used.])
891    
892    AC_LANG_RESTORE
893    
894    
895  ###########################################################################  ###########################################################################
896  # Create Build Files  # Create Build Files
897    
898  AM_CONFIG_HEADER(config.h)  AM_CONFIG_HEADER(config.h)
899  AM_INIT_AUTOMAKE(linuxsampler, 0.3.1)  AM_INIT_AUTOMAKE(linuxsampler, "$LINUXSAMPLER_RELEASE_MAJOR.$LINUXSAMPLER_RELEASE_MINOR.$LINUXSAMPLER_RELEASE_BUILD")
900    
901  AC_LANG_CPLUSPLUS  AC_LANG_CPLUSPLUS
902  AC_PROG_CXX  AC_PROG_CXX
903    
904    # some gcc 4.0 versions need -msse for SSE register allocations
905    if test "$config_asm" = "yes"; then
906      if test "$def_arch_x86" = 1; then
907        CXXFLAGS="$CXXFLAGS -msse"
908      fi
909    fi
910    
911  # 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
912  # this, the dlfcn.h check in am_prog_libtool may fail.  # this, the dlfcn.h check in am_prog_libtool may fail.
913  AC_CHECK_HEADER(stdlib.h)  AC_CHECK_HEADER(stdlib.h)
914    
915  AM_PROG_LIBTOOL  AC_OUTPUT( \
916        Makefile \
917  AC_OUTPUT(Makefile man/Makefile man/linuxsampler.1 src/Makefile src/network/Makefile src/engines/Makefile src/engines/gig/Makefile src/engines/common/Makefile src/common/Makefile src/lib/Makefile src/lib/fileloader/Makefile src/lib/fileloader/libgig/Makefile src/testcases/Makefile src/drivers/Makefile src/drivers/audio/Makefile src/drivers/midi/Makefile)      man/Makefile \
918        man/linuxsampler.1 \
919        src/Makefile \
920        src/network/Makefile \
921        src/engines/Makefile \
922        src/engines/gig/Makefile \
923        src/engines/common/Makefile \
924        src/common/Makefile src/lib/Makefile \
925        src/lib/fileloader/Makefile \
926        src/lib/fileloader/libgig/Makefile \
927        src/testcases/Makefile \
928        src/drivers/Makefile \
929        src/drivers/audio/Makefile \
930        src/drivers/midi/Makefile \
931        linuxsampler.spec \
932        debian/Makefile \
933        Artwork/Makefile \
934        scripts/Makefile \
935        osx/Makefile \
936        osx/LinuxSampler.xcode/Makefile \
937        Documentation/Makefile \
938        Documentation/Engines/Makefile \
939        Documentation/Engines/gig/Makefile \
940        linuxsampler.pc \
941        Doxyfile \
942    )
943    
944    
945  ###########################################################################  ###########################################################################
# Line 585  echo "# Maximum Stream Refill Size: ${co Line 964  echo "# Maximum Stream Refill Size: ${co
964  echo "# Stream Size: ${config_stream_size}"  echo "# Stream Size: ${config_stream_size}"
965  echo "# Maximum Disk Streams: ${config_max_streams}"  echo "# Maximum Disk Streams: ${config_max_streams}"
966  echo "# Maximum Voices: ${config_max_voices}"  echo "# Maximum Voices: ${config_max_voices}"
967    echo "# Default Subfragment Size: ${config_subfragment_size}"
968    echo "# Global Volume Attenuation: ${config_global_attenuation}"
969  echo "# Voice Stealing Algorithm: ${config_voice_steal_algo}"  echo "# Voice Stealing Algorithm: ${config_voice_steal_algo}"
970    echo "# Signed Triangular Oscillator Algorithm: ${config_signed_triang_algo}"
971    echo "# Unsigned Triangular Oscillator Algorithm: ${config_unsigned_triang_algo}"
972  echo "# SysEx Buffer Size: ${config_sysex_buffer_size} Byte"  echo "# SysEx Buffer Size: ${config_sysex_buffer_size} Byte"
973  echo "# Filter Update Steps: ${config_filter_update_steps}"  echo "# Min. Portamento Time: ${config_portamento_time_min} s"
974    echo "# Max. Portamento Time: ${config_portamento_time_max} s"
975    echo "# Default Portamento Time: ${config_portamento_time_default} s"
976  echo "# Force Filter Usage: ${config_force_filter}"  echo "# Force Filter Usage: ${config_force_filter}"
977  echo "# Filter Cutoff Minimum: ${config_filter_cutoff_min} Hz"  echo "# Filter Cutoff Minimum: ${config_filter_cutoff_min} Hz"
978  echo "# Filter Cutoff Maximum: ${config_filter_cutoff_max} Hz"  echo "# Filter Cutoff Maximum: ${config_filter_cutoff_max} Hz"
# Line 595  echo "# Override Filter Cutoff Controlle Line 980  echo "# Override Filter Cutoff Controlle
980  echo "# Override Filter Resonance Controller: ${config_override_resonance_ctrl}"  echo "# Override Filter Resonance Controller: ${config_override_resonance_ctrl}"
981  echo "# Override Filter Type: ${config_override_filter_type}"  echo "# Override Filter Type: ${config_override_filter_type}"
982  echo "# Assert GS SysEx Checksum: ${config_assert_gs_sysex_checksum}"  echo "# Assert GS SysEx Checksum: ${config_assert_gs_sysex_checksum}"
983    echo "# Process Muted Channels: ${config_process_muted_channels}"
984    echo "# Process All-Notes-Off MIDI message: ${config_process_all_notes_off}"
985    echo "# Interpolate Volume: ${config_interpolate_volume}"
986  echo "#-------------------------------------------------------------------#"  echo "#-------------------------------------------------------------------#"
987  echo "# Read './configure --help' or file 'configure.in' for details.     #"  echo "# Read './configure --help' or file 'configure.in' for details.     #"
988  echo "#####################################################################"  echo "#####################################################################"

Legend:
Removed from v.617  
changed lines
  Added in v.947

  ViewVC Help
Powered by ViewVC