From 205a296adfe175f76feeb3e873ca3fad9c9ac1b2 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Thu, 6 Mar 2003 06:12:41 +0000 Subject: [PATCH] IRIX patches from Andrea Suatoni --HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40606 --- configure.in | 14 +++++++++++--- src/audio/dmedia/SDL_irixaudio.c | 4 ++-- src/audio/nas/SDL_nasaudio.h | 4 ++++ src/video/x11/SDL_x11image.c | 2 ++ test/testoverlay.c | 10 +++++----- 5 files changed, 24 insertions(+), 10 deletions(-) diff --git a/configure.in b/configure.in index b40ec613..fbf021a7 100644 --- a/configure.in +++ b/configure.in @@ -415,14 +415,22 @@ CheckNAS() have_nas=no if test -r /usr/X11R6/include/audio/audiolib.h; then have_nas=yes - fi - AC_MSG_RESULT($have_nas) - if test x$have_nas = xyes; then CFLAGS="$CFLAGS -DNAS_SUPPORT" SYSTEM_LIBS="$SYSTEM_LIBS -laudio -lXt" AUDIO_SUBDIRS="$AUDIO_SUBDIRS nas" AUDIO_DRIVERS="$AUDIO_DRIVERS nas/libaudio_nas.la" + + dnl On IRIX, the NAS includes are in a different directory, + dnl and libnas must be explicitly linked in + + elif test -r /usr/freeware/include/nas/audiolib.h; then + have_nas=yes + CFLAGS="$CFLAGS -DNAS_SUPPORT" + SYSTEM_LIBS="$SYSTEM_LIBS -lnas -lXt" + AUDIO_SUBDIRS="$AUDIO_SUBDIRS nas" + AUDIO_DRIVERS="$AUDIO_DRIVERS nas/libaudio_nas.la" fi + AC_MSG_RESULT($have_nas) fi } diff --git a/src/audio/dmedia/SDL_irixaudio.c b/src/audio/dmedia/SDL_irixaudio.c index 8dd0c4d6..1c07469e 100644 --- a/src/audio/dmedia/SDL_irixaudio.c +++ b/src/audio/dmedia/SDL_irixaudio.c @@ -129,7 +129,7 @@ static void AL_CloseAudio(_THIS) mixbuf = NULL; } if ( audio_port != NULL ) { - ALcloseport(audio_port); + alClosePort(audio_port); audio_port = NULL; } } @@ -180,7 +180,7 @@ static int AL_OpenAudio(_THIS, SDL_AudioSpec *spec) (alSetWidth(audio_config, width) >= 0) && (alSetQueueSize(audio_config, spec->samples*2) >= 0) && (alSetChannels(audio_config, spec->channels) >= 0) ) { - audio_port = ALopenport("SDL audio", "w", audio_config); + audio_port = alOpenPort("SDL audio", "w", audio_config); } alFreeConfig(audio_config); if( audio_port == NULL ) { diff --git a/src/audio/nas/SDL_nasaudio.h b/src/audio/nas/SDL_nasaudio.h index 4c617303..2575d4da 100644 --- a/src/audio/nas/SDL_nasaudio.h +++ b/src/audio/nas/SDL_nasaudio.h @@ -32,7 +32,11 @@ static char rcsid = #ifndef _SDL_nasaudio_h #define _SDL_nasaudio_h +#ifdef __sgi +#include +#else #include