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
2.1 --- a/src/cdrom/osf/SDL_syscdrom.c Sun Feb 26 04:48:24 2006 +0000
2.2 +++ b/src/cdrom/osf/SDL_syscdrom.c Sun Feb 26 04:54:01 2006 +0000
2.3 @@ -173,7 +173,7 @@
2.4 if ( SDLcdrom != NULL ) {
2.5 char *cdpath, *delim;
2.6 size_t len = SDL_strlen(SDLcdrom)+1;
2.7 - cdpath = SDL_stack_alloc(len);
2.8 + cdpath = SDL_stack_alloc(char, len);
2.9 if ( cdpath != NULL ) {
2.10 SDL_strlcpy(cdpath, SDLcdrom, len);
2.11 SDLcdrom = cdpath;
3.1 --- a/src/video/x11/SDL_x11dyn.h Sun Feb 26 04:48:24 2006 +0000
3.2 +++ b/src/video/x11/SDL_x11dyn.h Sun Feb 26 04:54:01 2006 +0000
3.3 @@ -50,6 +50,15 @@
3.4 extern "C" {
3.5 #endif
3.6
3.7 +#ifdef __osf__
3.8 +extern int _XData32(Display *,register long *,unsigned);
3.9 +extern void _XRead32(Display *,register long *,long);
3.10 +extern void _SmtBufferOverflow(Display *,register smtDisplayPtr);
3.11 +extern void _SmtIpError(Display *,register smtDisplayPtr, int);
3.12 +extern int ipAllocateData(ChannelPtr, IPCard, IPDataPtr *);
3.13 +extern int ipUnallocateAndSendData(ChannelPtr, IPCard);
3.14 +#endif
3.15 +
3.16 /* evil function signatures... */
3.17 typedef Bool (*SDL_X11_XESetWireToEventRetType)(Display*,XEvent*,xEvent*);
3.18 typedef int (*SDL_X11_XSynchronizeRetType)(Display*);
3.19 @@ -72,7 +81,7 @@
3.20 #define XFree pXFree
3.21 #define _XData32 p_XData32
3.22
3.23 -#if defined(__osf__) && defined(SDL_VIDEO_DRIVER_X11_DYNAMIC)
3.24 +#if defined(__osf__)
3.25 #define _SmtBufferOverflow p_SmtBufferOverflow
3.26 #define _SmtIpError p_SmtIpError
3.27 #define ipAllocateData pipAllocateData
4.1 --- a/src/video/x11/SDL_x11sym.h Sun Feb 26 04:48:24 2006 +0000
4.2 +++ b/src/video/x11/SDL_x11sym.h Sun Feb 26 04:54:01 2006 +0000
4.3 @@ -140,7 +140,7 @@
4.4 * These don't exist in 32-bit versions and are removed by Xlib macros, but
4.5 * 64+ bit systems will use them.
4.6 */
4.7 -#if defined(LONG64) && !defined(__osf__)
4.8 +#if defined(LONG64)
4.9 SDL_X11_SYM(1,int,_XData32,(Display *dpy,register long *data,unsigned len))
4.10 SDL_X11_SYM(1,void,_XRead32,(Display *dpy,register long *data,long len))
4.11 #endif