configure.in
branchSDL-1.2
changeset 4034 4ea82f5e7e2c
parent 4028 81837116ef59
child 4037 48465c97d4bc
     1.1 --- a/configure.in	Tue Jul 10 13:52:07 2007 +0000
     1.2 +++ b/configure.in	Tue Jul 10 14:16:44 2007 +0000
     1.3 @@ -576,12 +576,20 @@
     1.4  AC_HELP_STRING([--enable-nas], [support the NAS audio API [[default=yes]]]),
     1.5                    , enable_nas=yes)
     1.6      if test x$enable_audio = xyes -a x$enable_nas = xyes; then
     1.7 +        AC_CHECK_HEADER(audio/audiolib.h, have_nas_hdr=yes)
     1.8 +        AC_CHECK_LIB(audio, AuOpenServer, have_nas_lib=yes)
     1.9 +
    1.10          AC_MSG_CHECKING(for NAS audio support)
    1.11          have_nas=no
    1.12 -        if true; then
    1.13 +
    1.14 +        if test x$have_nas_hdr = xyes -a x$have_nas_lib = xyes; then
    1.15              have_nas=yes
    1.16 -            NAS_CFLAGS=""
    1.17 -            NAS_LIBS="-laudio -lXt"
    1.18 +            NAS_LIBS="-laudio"
    1.19 +
    1.20 +        elif test -r /usr/X11R6/include/audio/audiolib.h; then
    1.21 +            have_nas=yes
    1.22 +            NAS_CFLAGS="-I/usr/X11R6/include/"
    1.23 +            NAS_LIBS="-L/usr/X11R6/lib -laudio -lXt"
    1.24  
    1.25          dnl On IRIX, the NAS includes are in a different directory,
    1.26          dnl and libnas must be explicitly linked in
    1.27 @@ -590,7 +598,9 @@
    1.28              have_nas=yes
    1.29              NAS_LIBS="-lnas -lXt"
    1.30          fi
    1.31 +
    1.32          AC_MSG_RESULT($have_nas)
    1.33 +
    1.34          if test x$have_nas = xyes; then
    1.35              AC_DEFINE(SDL_AUDIO_DRIVER_NAS)
    1.36              SOURCES="$SOURCES $srcdir/src/audio/nas/*.c"