configure.in
branchSDL-1.2
changeset 6353 dfcbd0d9209c
parent 6218 f114f1434ff6
child 6361 173deb250f75
     1.1 --- a/configure.in	Mon Jul 02 08:29:57 2012 -0400
     1.2 +++ b/configure.in	Sun Jul 08 07:20:50 2012 -0400
     1.3 @@ -486,6 +486,34 @@
     1.4      fi
     1.5  }
     1.6  
     1.7 +dnl Find Sndio
     1.8 +CheckSndio()
     1.9 +{
    1.10 +    AC_ARG_ENABLE(sndio,
    1.11 +AC_HELP_STRING([--enable-sndio], [support the sndio audio API [[default=yes]]]),
    1.12 +                  , enable_sndioaudio=yes)
    1.13 +    if test x$enable_audio = xyes -a x$enable_sndioaudio = xyes; then
    1.14 +        AC_CHECK_HEADER(sndio.h, have_sndio_hdr=yes)
    1.15 +        AC_CHECK_LIB(sndio, sio_open, have_sndio_lib=yes)
    1.16 +
    1.17 +        AC_MSG_CHECKING(for sndio support)
    1.18 +        have_sndio=no
    1.19 +
    1.20 +        if test x$have_sndio_hdr = xyes -a x$have_sndio_lib = xyes; then
    1.21 +            have_sndio=yes
    1.22 +            SNDIO_LIBS="-lsndio"
    1.23 +        fi
    1.24 +
    1.25 +        AC_MSG_RESULT($have_nas)
    1.26 +
    1.27 +        if test x$have_sndio = xyes; then
    1.28 +            AC_DEFINE(SDL_AUDIO_DRIVER_SNDIO)
    1.29 +            SOURCES="$SOURCES $srcdir/src/audio/sndio/*.c"
    1.30 +            EXTRA_LDFLAGS="$EXTRA_LDFLAGS $SNDIO_LIBS"
    1.31 +            have_audio=yes
    1.32 +        fi
    1.33 +}
    1.34 +
    1.35  dnl Find PulseAudio
    1.36  CheckPulseAudio()
    1.37  {
    1.38 @@ -2358,6 +2386,7 @@
    1.39          CheckALSA
    1.40          CheckARTSC
    1.41          CheckESD
    1.42 +        CheckSndio
    1.43          CheckPulseAudio
    1.44          CheckNAS
    1.45          CheckX11
    1.46 @@ -2390,7 +2419,7 @@
    1.47                  SOURCES="$SOURCES $srcdir/src/audio/sun/*.c"
    1.48                  have_audio=yes
    1.49              ;;
    1.50 -            netbsd|openbsd)
    1.51 +            netbsd)
    1.52                  AC_DEFINE(SDL_AUDIO_DRIVER_BSD)
    1.53                  SOURCES="$SOURCES $srcdir/src/audio/bsd/*.c"
    1.54                  have_audio=yes