configure.in
branchSDL-1.2
changeset 4037 48465c97d4bc
parent 4034 4ea82f5e7e2c
child 4058 eede31c0ca20
     1.1 --- a/configure.in	Tue Jul 10 15:04:49 2007 +0000
     1.2 +++ b/configure.in	Tue Jul 10 15:39:14 2007 +0000
     1.3 @@ -74,8 +74,8 @@
     1.4  EXTRA_CFLAGS="$INCLUDE $BASE_CFLAGS"
     1.5  BUILD_LDFLAGS="$LDFLAGS"
     1.6  EXTRA_LDFLAGS="$BASE_LDFLAGS"
     1.7 -# I can't remember why I added this.  I'm sure it'll come to me...
     1.8 -#for path in /usr/local; do
     1.9 +## These are common directories to find software packages
    1.10 +#for path in /usr/freeware /usr/pkg /usr/X11R6 /usr/local; do
    1.11  #    if test -d $path/include; then
    1.12  #        EXTRA_CFLAGS="$EXTRA_CFLAGS -I$path/include"
    1.13  #    fi
    1.14 @@ -576,29 +576,23 @@
    1.15  AC_HELP_STRING([--enable-nas], [support the NAS audio API [[default=yes]]]),
    1.16                    , enable_nas=yes)
    1.17      if test x$enable_audio = xyes -a x$enable_nas = xyes; then
    1.18 -        AC_CHECK_HEADER(audio/audiolib.h, have_nas_hdr=yes)
    1.19 -        AC_CHECK_LIB(audio, AuOpenServer, have_nas_lib=yes)
    1.20 +        save_LDFLAGS="$LDFLAGS"
    1.21 +        LDFLAGS="$LDFLAGS -lXt -lm"
    1.22 +        AC_CHECK_HEADER(audio/audiolib.h, have_audio_hdr=yes)
    1.23 +        AC_CHECK_LIB(audio, AuOpenServer, have_audio_lib=yes)
    1.24 +        AC_CHECK_HEADER(nas/audiolib.h, have_nas_hdr=yes)
    1.25 +        AC_CHECK_LIB(nas, AuOpenServer, have_nas_lib=yes)
    1.26 +        LDFLAGS="$save_LDFLAGS"
    1.27  
    1.28          AC_MSG_CHECKING(for NAS audio support)
    1.29          have_nas=no
    1.30 -
    1.31 -        if test x$have_nas_hdr = xyes -a x$have_nas_lib = xyes; then
    1.32 +        if test x$have_audio_hdr = xyes -a x$have_audio_lib = xyes; then
    1.33              have_nas=yes
    1.34 -            NAS_LIBS="-laudio"
    1.35 -
    1.36 -        elif test -r /usr/X11R6/include/audio/audiolib.h; then
    1.37 -            have_nas=yes
    1.38 -            NAS_CFLAGS="-I/usr/X11R6/include/"
    1.39 -            NAS_LIBS="-L/usr/X11R6/lib -laudio -lXt"
    1.40 -
    1.41 -        dnl On IRIX, the NAS includes are in a different directory,
    1.42 -        dnl and libnas must be explicitly linked in
    1.43 -
    1.44 -        elif test -r /usr/freeware/include/nas/audiolib.h; then
    1.45 +            NAS_LIBS="-laudio -lXt"
    1.46 +        elif test x$have_nas_hdr = xyes -a x$have_nas_lib = xyes; then
    1.47              have_nas=yes
    1.48              NAS_LIBS="-lnas -lXt"
    1.49 -        fi
    1.50 -
    1.51 +	fi
    1.52          AC_MSG_RESULT($have_nas)
    1.53  
    1.54          if test x$have_nas = xyes; then
    1.55 @@ -2114,13 +2108,13 @@
    1.56                #if defined(HAVE_USB_H)
    1.57                #include <usb.h>
    1.58                #endif
    1.59 -	      #ifdef __DragonFly__
    1.60 +              #ifdef __DragonFly__
    1.61                #include <bus/usb/usb.h>
    1.62                #include <bus/usb/usbhid.h>
    1.63 -	      #else
    1.64 +              #else
    1.65                #include <dev/usb/usb.h>
    1.66                #include <dev/usb/usbhid.h>
    1.67 -	      #endif
    1.68 +              #endif
    1.69                #if defined(HAVE_USBHID_H)
    1.70                #include <usbhid.h>
    1.71                #elif defined(HAVE_LIBUSB_H)