/[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 849 by schoenebeck, Sat Mar 25 13:05:59 2006 UTC revision 937 by schoenebeck, Fri Nov 24 17:43:09 2006 UTC
# Line 4  AC_INIT(configure.in) Line 4  AC_INIT(configure.in)
4  # LinuxSampler's / liblinuxsampler's "official" release version:  # LinuxSampler's / liblinuxsampler's "official" release version:
5    
6  LINUXSAMPLER_RELEASE_MAJOR=0  LINUXSAMPLER_RELEASE_MAJOR=0
7  LINUXSAMPLER_RELEASE_MINOR=3  LINUXSAMPLER_RELEASE_MINOR=4
8  LINUXSAMPLER_RELEASE_BUILD=3cvs  LINUXSAMPLER_RELEASE_BUILD=0
9    
10  #------------------------------------------------------------------------------------  #------------------------------------------------------------------------------------
11  # The following is the libtool / shared library version. This doesn't have to  # The following is the libtool / shared library version. This doesn't have to
# Line 64  CXX_CPU_SWITCH= Line 64  CXX_CPU_SWITCH=
64  if ! echo "X $CXXFLAGS " | grep -q -- " \(-march=\|-mcpu=\|-mtune=\|-arch=\)" ; then  if ! echo "X $CXXFLAGS " | grep -q -- " \(-march=\|-mcpu=\|-mtune=\|-arch=\)" ; then
65    if test "$def_arch_x86" = 1; then    if test "$def_arch_x86" = 1; then
66      CXX_CPU_SWITCH="-march=$target_cpu"      CXX_CPU_SWITCH="-march=$target_cpu"
67    elif test "$target_cpu" = "powerpc"; then    elif test "$target_cpu" = "ppc"; then
68      CXX_CPU_SWITCH="-arch=$target_cpu"      CXX_CPU_SWITCH="-arch=$target_cpu"
69    fi    fi
70  fi  fi
# Line 105  fi Line 105  fi
105  # check for <features.h>  # check for <features.h>
106  AC_CHECK_HEADERS(features.h)  AC_CHECK_HEADERS(features.h)
107    
108    
109    ###########################################################################
110  # Checks for available audio and MIDI systems / drivers  # Checks for available audio and MIDI systems / drivers
111  # (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)
112    
113  have_midi_input_driver="false"  have_midi_input_driver="false"
114  have_audio_output_driver="false"  have_audio_output_driver="false"
115    
116  AC_CHECK_HEADER(alsa/asoundlib.h,  # ALSA
117      AC_CHECK_LIB(asound, main,  AC_ARG_ENABLE(alsa-driver,
118                               have_alsa=1    [  --disable-alsa-driver
119                               ,                            Disable support for the Advanced Linux Sound
120                               have_alsa=0                            Architecture (ALSA).],
121                  )    [config_alsa_driver="no"],
122                  ,    [config_alsa_driver="yes"]
                 have_alsa=0  
123  )  )
124  if test "$have_alsa" = "1"; then  have_alsa=0
125      have_midi_input_driver="true"  if test "$config_alsa_driver" = "yes"; then
126      have_audio_output_driver="true";      AC_CHECK_HEADER(alsa/asoundlib.h,
127            AC_CHECK_LIB(asound, main,
128                                     have_alsa=1
129                                     ,
130                                     have_alsa=0
131                        )
132                        ,
133                        have_alsa=0
134        )
135        if test "$have_alsa" = "1"; then
136            have_midi_input_driver="true"
137            have_audio_output_driver="true";
138        fi
139    
140        echo -n "checking Alsa version... "
141        AC_LANG_SAVE
142        AC_LANG_C
143        AC_TRY_RUN([
144            #include <alsa/asoundlib.h>
145            void main(void) {
146                /* ensure backward compatibility */
147                #if !defined(SND_LIB_MAJOR) && defined(SOUNDLIB_VERSION_MAJOR)
148                #define SND_LIB_MAJOR SOUNDLIB_VERSION_MAJOR
149                #endif
150                exit(SND_LIB_MAJOR);
151            }
152        ],
153        alsa_major=0,
154        alsa_major=$?,
155        alsa_major=0
156        )
157        AC_TRY_RUN([
158            #include <alsa/asoundlib.h>
159            void main(void) {
160                /* ensure backward compatibility */
161                #if !defined(SND_LIB_MINOR) && defined(SOUNDLIB_VERSION_MINOR)
162                #define SND_LIB_MINOR SOUNDLIB_VERSION_MINOR
163                #endif
164                exit(SND_LIB_MINOR);
165            }
166        ],
167        alsa_minor=0,
168        alsa_minor=$?,
169        alsa_minor=0
170        )
171        AC_TRY_RUN([
172            #include <alsa/asoundlib.h>
173            void main(void) {
174                /* ensure backward compatibility */
175                #if !defined(SND_LIB_SUBMINOR) && defined(SOUNDLIB_VERSION_SUBMINOR)
176                #define SND_LIB_SUBMINOR SOUNDLIB_VERSION_SUBMINOR
177                #endif
178                exit(SND_LIB_SUBMINOR);
179            }
180        ],
181        alsa_subminor=0,
182        alsa_subminor=$?,
183        alsa_subminor=0
184        )
185        AC_LANG_RESTORE
186        echo "$alsa_major.$alsa_minor.$alsa_subminor";
187        AC_DEFINE_UNQUOTED(ALSA_MAJOR,$alsa_major,[Define to the major version number of your Alsa installation.])
188        AC_DEFINE_UNQUOTED(ALSA_MINOR,$alsa_minor,[Define to the minor version number of your Alsa installation.])
189        AC_DEFINE_UNQUOTED(ALSA_SUBMINOR,$alsa_subminor,[Define to the subminor version number of your Alsa installation.])
190    else
191        echo "ALSA support disabled by configure script parameter"
192  fi  fi
193  AM_CONDITIONAL(HAVE_ALSA, test $have_alsa = "1")  AM_CONDITIONAL(HAVE_ALSA, test $have_alsa = "1")
194  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.])
195    
 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.])  
   
196  # JACK  # JACK
197  PKG_CHECK_MODULES(JACK, jack, HAVE_JACK=true, HAVE_JACK=false)  AC_ARG_ENABLE(jack-driver,
198  AC_SUBST(JACK_LIBS)    [  --disable-jack-driver
199  AC_SUBST(JACK_CFLAGS)                            Disable support for the Jack Audio Connection Kit
200  if test $HAVE_JACK = false; then                            (JACK).],
201      HAVE_JACK=0;    [config_jack_driver="no"],
202      [config_jack_driver="yes"]
203    )
204    have_jack=0
205    if test "$config_jack_driver" = "yes"; then
206        PKG_CHECK_MODULES(JACK, jack, have_jack=1, have_jack=0)
207        if test $have_jack = "1"; then
208            AC_SUBST(JACK_LIBS)
209            AC_SUBST(JACK_CFLAGS)
210            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)
211            have_audio_output_driver="true";
212        fi
213  else  else
214      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)  
215  fi  fi
216  AM_CONDITIONAL(HAVE_JACK, test $HAVE_JACK = 1)  AM_CONDITIONAL(HAVE_JACK, test $have_jack = "1")
217  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.])
218    
219  # ARTS  # ARTS
220    AC_ARG_ENABLE(arts-driver,
221  m4_ifdef([m4_include(m4/arts.m4)],,    [  --disable-arts-driver
222          [sinclude([m4/arts.m4])])                            Disable support for the Analogue Realtime System
223                              (aRts).],
224  AM_PATH_ARTS(0.9.5, have_arts=1, have_arts=0)    [config_arts_driver="no"],
225  if test "$have_arts" = "1"; then    [config_arts_driver="yes"]
226      have_audio_output_driver="true"  )
227    have_arts=0
228    if test "$config_arts_driver" = "yes"; then
229        m4_ifdef([m4_include(m4/arts.m4)],,
230                 [sinclude([m4/arts.m4])])
231        AM_PATH_ARTS(0.9.5, have_arts=1, have_arts=0)
232        if test "$have_arts" = "1"; then
233            have_audio_output_driver="true"
234        fi
235    else
236        echo "ARTS support disabled by configure script parameter"
237  fi  fi
238  AM_CONDITIONAL(HAVE_ARTS, test "$have_arts" = "1")  AM_CONDITIONAL(HAVE_ARTS, test "$have_arts" = "1")
239  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.])
240    
241  # MidiShare (Linux, OS X, Windows)  # MidiShare (Linux, OS X, Windows)
242  AC_CHECK_HEADER(MidiShare.h,  AC_ARG_ENABLE(midishare-driver,
243      AC_CHECK_LIB(MidiShare, MidiCountEvs,    [  --disable-midishare-driver
244                              have_midishare=1,                            Disable support for the MidiShare system.],
245                              have_midishare=0    [config_midishare_driver="no"],
246                  )    [config_midishare_driver="yes"]
                 ,  
                 have_midishare=0  
247  )  )
248  if test "$have_midishare" = "1"; then  have_midishare=0
249      have_midi_input_driver="true"  if test "$config_midishare_driver" = "yes"; then
250        AC_CHECK_HEADER(MidiShare.h,
251            AC_CHECK_LIB(MidiShare, MidiCountEvs,
252                                    have_midishare=1,
253                                    have_midishare=0
254                        )
255                        ,
256                        have_midishare=0
257        )
258        if test "$have_midishare" = "1"; then
259            have_midi_input_driver="true"
260        fi
261    else
262        echo "MidiShare support disabled by configure script parameter"
263  fi  fi
264  AM_CONDITIONAL(HAVE_MIDISHARE, test $have_midishare = "1")  AM_CONDITIONAL(HAVE_MIDISHARE, test $have_midishare = "1")
265  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.])
266    
267  # CoreMIDI (OS X)  # CoreMIDI (OS X)
268  AC_CHECK_HEADER(CoreMIDI/CoreMIDI.h,  AC_ARG_ENABLE(coremidi-driver,
269                  have_coremidi=1,    [  --disable-coremidi-driver
270                  have_coremidi=0                            Disable support for the Apple CoreMIDI system.],
271      [config_coremidi_driver="no"],
272      [config_coremidi_driver="yes"]
273  )  )
274  if test "$have_coremidi" = "1"; then  have_coremidi=0
275      have_midi_input_driver="true"  if test "$config_coremidi_driver" = "yes"; then
276        AC_CHECK_HEADER(CoreMIDI/CoreMIDI.h,
277            have_coremidi=1,
278            have_coremidi=0
279        )
280        if test "$have_coremidi" = "1"; then
281            have_midi_input_driver="true"
282        fi
283    else
284        echo "CoreMIDI support disabled by configure script parameter"
285  fi  fi
286  AM_CONDITIONAL(HAVE_COREMIDI, test $have_coremidi = "1")  AM_CONDITIONAL(HAVE_COREMIDI, test $have_coremidi = "1")
287  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.])
288    
289  # Check presence of libgig  # Check presence of libgig
290  libgig_version="2.0.2"  libgig_version="3.1.0"
291  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)
292  if test "$HAVE_GIG" = "false"; then  if test "$HAVE_GIG" = "false"; then
293      echo "Required libgig version not found!"      echo "Required libgig version not found!"
# Line 291  if test "$config_asm" = "yes"; then Line 348  if test "$config_asm" = "yes"; then
348  fi  fi
349    
350  AC_ARG_ENABLE(dev-mode,  AC_ARG_ENABLE(dev-mode,
351    [  --disable-dev-mode    [  --enable-dev-mode
352                            Disable development mode (default=on). In that mode                            Enable development mode (default=off). In that mode
353                            we do some extra sanity checks here and there.                            we do some extra sanity checks here and there.
354                            This helps to spot possible problems, but reduces                            This helps to spot possible problems, but reduces
355                            efficiency a bit],                            efficiency a bit],
356    [config_dev_mode="no"],    [config_dev_mode="yes"],
357    [config_dev_mode="yes"]    [config_dev_mode="no"]
358  )  )
359  if test "$config_dev_mode" = "yes"; then  if test "$config_dev_mode" = "yes"; then
360    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.])

Legend:
Removed from v.849  
changed lines
  Added in v.937

  ViewVC Help
Powered by ViewVC