configure.in
changeset 1438 1f4f09641645
parent 1402 d910939febfa
child 1445 0133f0ca5de7
     1.1 --- a/configure.in	Sun Feb 26 04:48:24 2006 +0000
     1.2 +++ b/configure.in	Sun Feb 26 04:54:01 2006 +0000
     1.3 @@ -397,6 +397,44 @@
     1.4      fi
     1.5  }
     1.6  
     1.7 +dnl Check whether we want to use Tru64 UNIX native audio or not
     1.8 +CheckMME()
     1.9 +{
    1.10 +    dnl Make sure we are running on an Tru64 UNIX
    1.11 +    case $ARCH in
    1.12 +        osf)
    1.13 +            ;;
    1.14 +        *)
    1.15 +            return
    1.16 +            ;;
    1.17 +    esac
    1.18 +    if test x$enable_audio = xyes; then
    1.19 +        AC_MSG_CHECKING(for MME audio support)
    1.20 +        MME_CFLAGS="-I/usr/include/mme"
    1.21 +        MME_LIBS="-lmme"
    1.22 +        have_mme=no
    1.23 +        save_CFLAGS="$CFLAGS"
    1.24 +        CFLAGS="$CFLAGS $MME_CFLAGS"
    1.25 +        AC_TRY_COMPILE([
    1.26 +          #include <mme_api.h>
    1.27 +        ],[
    1.28 +          HWAVEOUT sound;
    1.29 +        ],[
    1.30 +        have_mme=yes
    1.31 +        ])
    1.32 +        CFLAGS="$save_CFLAGS"
    1.33 +        AC_MSG_RESULT($have_mme)
    1.34 +        # Set up files for the audio library
    1.35 +        if test x$have_mme = xyes; then
    1.36 +            AC_DEFINE(SDL_AUDIO_DRIVER_MMEAUDIO)
    1.37 +            SOURCES="$SOURCES $srcdir/src/audio/mme/*.c"
    1.38 +            BUILD_CFLAGS="$BUILD_CFLAGS $MME_CFLAGS"
    1.39 +            BUILD_LDFLAGS="$BUILD_LDFLAGS $MME_LIBS"
    1.40 +            have_audio=yes
    1.41 +        fi
    1.42 +    fi
    1.43 +}
    1.44 +
    1.45  dnl Find the ESD includes and libraries
    1.46  CheckESD()
    1.47  {
    1.48 @@ -1555,6 +1593,11 @@
    1.49              SDL_CFLAGS="$SDL_CFLAGS $pthread_cflags"
    1.50              SDL_LIBS="$SDL_LIBS $pthread_lib"
    1.51  
    1.52 +            # Save the original compiler flags and libraries
    1.53 +            ac_save_cflags="$CFLAGS"; ac_save_libs="$LIBS"
    1.54 +            # Add the pthread compiler flags and libraries
    1.55 +            CFLAGS="$CFLAGS $pthread_cflags"; LIBS="$LIBS $pthread_lib"
    1.56 +
    1.57              # Check to see if recursive mutexes are available
    1.58              AC_MSG_CHECKING(for recursive mutexes)
    1.59              has_recursive_mutexes=no
    1.60 @@ -1596,6 +1639,9 @@
    1.61                  AC_MSG_RESULT($have_pthread_sem)
    1.62              fi
    1.63  
    1.64 +            # Restore the compiler flags and libraries
    1.65 +            CFLAGS="$ac_save_cflags"; LIBS="$ac_save_libs"
    1.66 +
    1.67              # Basic thread creation functions
    1.68              SOURCES="$SOURCES $srcdir/src/thread/pthread/SDL_systhread.c"
    1.69  
    1.70 @@ -1903,6 +1949,7 @@
    1.71          CheckAltivec
    1.72          CheckOSS
    1.73          CheckDMEDIA
    1.74 +        CheckMME
    1.75          CheckALSA
    1.76          CheckARTSC
    1.77          CheckESD
    1.78 @@ -1945,12 +1992,6 @@
    1.79                  SOURCES="$SOURCES $srcdir/src/audio/paudio/*.c"
    1.80                  have_audio=yes
    1.81              ;;
    1.82 -            osf)
    1.83 -                AC_DEFINE(SDL_AUDIO_DRIVER_MMEAUDIO)
    1.84 -                SOURCES="$SOURCES $srcdir/src/audio/mme/*.c"
    1.85 -                BUILD_LDFLAGS="$BUILD_LDFLAGS -lmme"
    1.86 -                have_audio=yes
    1.87 -            ;;
    1.88            esac
    1.89          fi
    1.90          # Set up files for the joystick library