configure.in
changeset 354 30935e76acb5
parent 350 6dd188952b9e
child 360 8c1f8c4d2dd1
     1.1 --- a/configure.in	Mon Apr 15 04:53:41 2002 +0000
     1.2 +++ b/configure.in	Mon Apr 15 07:38:54 2002 +0000
     1.3 @@ -269,14 +269,25 @@
     1.4  [  --enable-alsa           support the ALSA audio API [default=yes]],
     1.5                    , enable_alsa=yes)
     1.6      if test x$enable_audio = xyes -a x$enable_alsa = xyes; then
     1.7 +        AC_MSG_CHECKING(for ALSA audio support)
     1.8          have_alsa=no
     1.9 -        AC_CHECK_HEADER(sys/asoundlib.h, have_alsa_hdr=yes)
    1.10 -        AC_CHECK_LIB(asound, snd_pcm_open, have_alsa_lib=yes)
    1.11 -        if test x$have_alsa_hdr = xyes -a x$have_alsa_lib = xyes; then
    1.12 +        AC_TRY_COMPILE([
    1.13 +          #include <alsa/asoundlib.h>
    1.14 +        ],[
    1.15 +          #if SND_LIB_VERSION < ((0<<16)|(9<<8)|0)
    1.16 +          #error Your version of ALSA is too old
    1.17 +          #endif
    1.18 +          snd_pcm_t *pcm_handle;
    1.19 +        ],[
    1.20 +        AC_CHECK_LIB(asound, snd_pcm_open, have_alsa=yes)
    1.21 +        ])
    1.22 +        if test x$have_alsa = xyes; then
    1.23              CFLAGS="$CFLAGS -DALSA_SUPPORT"
    1.24              SYSTEM_LIBS="$SYSTEM_LIBS -lasound"
    1.25              AUDIO_SUBDIRS="$AUDIO_SUBDIRS alsa"
    1.26              AUDIO_DRIVERS="$AUDIO_DRIVERS alsa/libaudio_alsa.la"
    1.27 +        else
    1.28 +            AC_MSG_RESULT($have_alsa)
    1.29          fi
    1.30      fi
    1.31  }