comparison configure.in @ 4034:4ea82f5e7e2c SDL-1.2

Backported the NAS detection from SDL 1.3, replacing the broken NetBSD patch
author Sam Lantinga <slouken@libsdl.org>
date Tue, 10 Jul 2007 14:16:44 +0000
parents 81837116ef59
children 48465c97d4bc
comparison
equal deleted inserted replaced
4033:24c3ca822658 4034:4ea82f5e7e2c
574 { 574 {
575 AC_ARG_ENABLE(nas, 575 AC_ARG_ENABLE(nas,
576 AC_HELP_STRING([--enable-nas], [support the NAS audio API [[default=yes]]]), 576 AC_HELP_STRING([--enable-nas], [support the NAS audio API [[default=yes]]]),
577 , enable_nas=yes) 577 , enable_nas=yes)
578 if test x$enable_audio = xyes -a x$enable_nas = xyes; then 578 if test x$enable_audio = xyes -a x$enable_nas = xyes; then
579 AC_CHECK_HEADER(audio/audiolib.h, have_nas_hdr=yes)
580 AC_CHECK_LIB(audio, AuOpenServer, have_nas_lib=yes)
581
579 AC_MSG_CHECKING(for NAS audio support) 582 AC_MSG_CHECKING(for NAS audio support)
580 have_nas=no 583 have_nas=no
581 if true; then 584
585 if test x$have_nas_hdr = xyes -a x$have_nas_lib = xyes; then
582 have_nas=yes 586 have_nas=yes
583 NAS_CFLAGS="" 587 NAS_LIBS="-laudio"
584 NAS_LIBS="-laudio -lXt" 588
589 elif test -r /usr/X11R6/include/audio/audiolib.h; then
590 have_nas=yes
591 NAS_CFLAGS="-I/usr/X11R6/include/"
592 NAS_LIBS="-L/usr/X11R6/lib -laudio -lXt"
585 593
586 dnl On IRIX, the NAS includes are in a different directory, 594 dnl On IRIX, the NAS includes are in a different directory,
587 dnl and libnas must be explicitly linked in 595 dnl and libnas must be explicitly linked in
588 596
589 elif test -r /usr/freeware/include/nas/audiolib.h; then 597 elif test -r /usr/freeware/include/nas/audiolib.h; then
590 have_nas=yes 598 have_nas=yes
591 NAS_LIBS="-lnas -lXt" 599 NAS_LIBS="-lnas -lXt"
592 fi 600 fi
601
593 AC_MSG_RESULT($have_nas) 602 AC_MSG_RESULT($have_nas)
603
594 if test x$have_nas = xyes; then 604 if test x$have_nas = xyes; then
595 AC_DEFINE(SDL_AUDIO_DRIVER_NAS) 605 AC_DEFINE(SDL_AUDIO_DRIVER_NAS)
596 SOURCES="$SOURCES $srcdir/src/audio/nas/*.c" 606 SOURCES="$SOURCES $srcdir/src/audio/nas/*.c"
597 EXTRA_CFLAGS="$EXTRA_CFLAGS $NAS_CFLAGS" 607 EXTRA_CFLAGS="$EXTRA_CFLAGS $NAS_CFLAGS"
598 EXTRA_LDFLAGS="$EXTRA_LDFLAGS $NAS_LIBS" 608 EXTRA_LDFLAGS="$EXTRA_LDFLAGS $NAS_LIBS"