comparison configure.in @ 354:30935e76acb5

Updated ALSA audio support for ALSA 0.9
author Sam Lantinga <slouken@libsdl.org>
date Mon, 15 Apr 2002 07:38:54 +0000
parents 6dd188952b9e
children 8c1f8c4d2dd1
comparison
equal deleted inserted replaced
353:d47637068e52 354:30935e76acb5
267 { 267 {
268 AC_ARG_ENABLE(alsa, 268 AC_ARG_ENABLE(alsa,
269 [ --enable-alsa support the ALSA audio API [default=yes]], 269 [ --enable-alsa support the ALSA audio API [default=yes]],
270 , enable_alsa=yes) 270 , enable_alsa=yes)
271 if test x$enable_audio = xyes -a x$enable_alsa = xyes; then 271 if test x$enable_audio = xyes -a x$enable_alsa = xyes; then
272 AC_MSG_CHECKING(for ALSA audio support)
272 have_alsa=no 273 have_alsa=no
273 AC_CHECK_HEADER(sys/asoundlib.h, have_alsa_hdr=yes) 274 AC_TRY_COMPILE([
274 AC_CHECK_LIB(asound, snd_pcm_open, have_alsa_lib=yes) 275 #include <alsa/asoundlib.h>
275 if test x$have_alsa_hdr = xyes -a x$have_alsa_lib = xyes; then 276 ],[
277 #if SND_LIB_VERSION < ((0<<16)|(9<<8)|0)
278 #error Your version of ALSA is too old
279 #endif
280 snd_pcm_t *pcm_handle;
281 ],[
282 AC_CHECK_LIB(asound, snd_pcm_open, have_alsa=yes)
283 ])
284 if test x$have_alsa = xyes; then
276 CFLAGS="$CFLAGS -DALSA_SUPPORT" 285 CFLAGS="$CFLAGS -DALSA_SUPPORT"
277 SYSTEM_LIBS="$SYSTEM_LIBS -lasound" 286 SYSTEM_LIBS="$SYSTEM_LIBS -lasound"
278 AUDIO_SUBDIRS="$AUDIO_SUBDIRS alsa" 287 AUDIO_SUBDIRS="$AUDIO_SUBDIRS alsa"
279 AUDIO_DRIVERS="$AUDIO_DRIVERS alsa/libaudio_alsa.la" 288 AUDIO_DRIVERS="$AUDIO_DRIVERS alsa/libaudio_alsa.la"
289 else
290 AC_MSG_RESULT($have_alsa)
280 fi 291 fi
281 fi 292 fi
282 } 293 }
283 294
284 dnl Check whether we want to use OpenBSD native audio or not 295 dnl Check whether we want to use OpenBSD native audio or not