configure.in
branchSDL-1.2
changeset 4037 48465c97d4bc
parent 4034 4ea82f5e7e2c
child 4058 eede31c0ca20
equal deleted inserted replaced
4036:eb60dd682e5e 4037:48465c97d4bc
    72 esac
    72 esac
    73 BUILD_CFLAGS="$CFLAGS $CPPFLAGS"
    73 BUILD_CFLAGS="$CFLAGS $CPPFLAGS"
    74 EXTRA_CFLAGS="$INCLUDE $BASE_CFLAGS"
    74 EXTRA_CFLAGS="$INCLUDE $BASE_CFLAGS"
    75 BUILD_LDFLAGS="$LDFLAGS"
    75 BUILD_LDFLAGS="$LDFLAGS"
    76 EXTRA_LDFLAGS="$BASE_LDFLAGS"
    76 EXTRA_LDFLAGS="$BASE_LDFLAGS"
    77 # I can't remember why I added this.  I'm sure it'll come to me...
    77 ## These are common directories to find software packages
    78 #for path in /usr/local; do
    78 #for path in /usr/freeware /usr/pkg /usr/X11R6 /usr/local; do
    79 #    if test -d $path/include; then
    79 #    if test -d $path/include; then
    80 #        EXTRA_CFLAGS="$EXTRA_CFLAGS -I$path/include"
    80 #        EXTRA_CFLAGS="$EXTRA_CFLAGS -I$path/include"
    81 #    fi
    81 #    fi
    82 #    if test -d $path/lib; then
    82 #    if test -d $path/lib; then
    83 #        EXTRA_LDFLAGS="$EXTRA_LDFLAGS -L$path/lib"
    83 #        EXTRA_LDFLAGS="$EXTRA_LDFLAGS -L$path/lib"
   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)
   579         save_LDFLAGS="$LDFLAGS"
   580         AC_CHECK_LIB(audio, AuOpenServer, have_nas_lib=yes)
   580         LDFLAGS="$LDFLAGS -lXt -lm"
       
   581         AC_CHECK_HEADER(audio/audiolib.h, have_audio_hdr=yes)
       
   582         AC_CHECK_LIB(audio, AuOpenServer, have_audio_lib=yes)
       
   583         AC_CHECK_HEADER(nas/audiolib.h, have_nas_hdr=yes)
       
   584         AC_CHECK_LIB(nas, AuOpenServer, have_nas_lib=yes)
       
   585         LDFLAGS="$save_LDFLAGS"
   581 
   586 
   582         AC_MSG_CHECKING(for NAS audio support)
   587         AC_MSG_CHECKING(for NAS audio support)
   583         have_nas=no
   588         have_nas=no
   584 
   589         if test x$have_audio_hdr = xyes -a x$have_audio_lib = xyes; then
   585         if test x$have_nas_hdr = xyes -a x$have_nas_lib = xyes; then
       
   586             have_nas=yes
   590             have_nas=yes
   587             NAS_LIBS="-laudio"
   591             NAS_LIBS="-laudio -lXt"
   588 
   592         elif test x$have_nas_hdr = xyes -a x$have_nas_lib = xyes; then
   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"
       
   593 
       
   594         dnl On IRIX, the NAS includes are in a different directory,
       
   595         dnl and libnas must be explicitly linked in
       
   596 
       
   597         elif test -r /usr/freeware/include/nas/audiolib.h; then
       
   598             have_nas=yes
   593             have_nas=yes
   599             NAS_LIBS="-lnas -lXt"
   594             NAS_LIBS="-lnas -lXt"
   600         fi
   595 	fi
   601 
       
   602         AC_MSG_RESULT($have_nas)
   596         AC_MSG_RESULT($have_nas)
   603 
   597 
   604         if test x$have_nas = xyes; then
   598         if test x$have_nas = xyes; then
   605             AC_DEFINE(SDL_AUDIO_DRIVER_NAS)
   599             AC_DEFINE(SDL_AUDIO_DRIVER_NAS)
   606             SOURCES="$SOURCES $srcdir/src/audio/nas/*.c"
   600             SOURCES="$SOURCES $srcdir/src/audio/nas/*.c"
  2112             AC_TRY_COMPILE([
  2106             AC_TRY_COMPILE([
  2113               #include <sys/types.h>
  2107               #include <sys/types.h>
  2114               #if defined(HAVE_USB_H)
  2108               #if defined(HAVE_USB_H)
  2115               #include <usb.h>
  2109               #include <usb.h>
  2116               #endif
  2110               #endif
  2117 	      #ifdef __DragonFly__
  2111               #ifdef __DragonFly__
  2118               #include <bus/usb/usb.h>
  2112               #include <bus/usb/usb.h>
  2119               #include <bus/usb/usbhid.h>
  2113               #include <bus/usb/usbhid.h>
  2120 	      #else
  2114               #else
  2121               #include <dev/usb/usb.h>
  2115               #include <dev/usb/usb.h>
  2122               #include <dev/usb/usbhid.h>
  2116               #include <dev/usb/usbhid.h>
  2123 	      #endif
  2117               #endif
  2124               #if defined(HAVE_USBHID_H)
  2118               #if defined(HAVE_USBHID_H)
  2125               #include <usbhid.h>
  2119               #include <usbhid.h>
  2126               #elif defined(HAVE_LIBUSB_H)
  2120               #elif defined(HAVE_LIBUSB_H)
  2127               #include <libusb.h>
  2121               #include <libusb.h>
  2128               #elif defined(HAVE_LIBUSBHID_H)
  2122               #elif defined(HAVE_LIBUSBHID_H)