changeset 12019:6ede5366bc47

fix compilation with sdl on mingw patch by Nehal <nehalmistry at gmx.net>
author faust3
date Sat, 13 Mar 2004 16:25:08 +0000
parents 2c2fb4457982
children 1604d07d3539
files configure libao2/ao_sdl.c libvo/vo_sdl.c
diffstat 3 files changed, 11 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/configure	Sat Mar 13 16:10:02 2004 +0000
+++ b/configure	Sat Mar 13 16:25:08 2004 +0000
@@ -3626,6 +3626,9 @@
   if cygwin ; then
     _ld_sdl=`$_sdlconfig --libs | cut -d " " -f 1,4,6 | sed s/no-cygwin/cygwin/`
     _inc_sdl=`$_sdlconfig --cflags | cut -d " " -f 1,5,6 | sed s/no-cygwin/cygwin/`
+  elif mingw32 ; then
+    _ld_sdl=`$_sdlconfig --libs | sed s/-mwindows//`
+    _inc_sdl=`$_sdlconfig --cflags | sed s/-Dmain=SDL_main//`
   else
     _ld_sdl=`$_sdlconfig --libs`
     _inc_sdl=`$_sdlconfig --cflags`
--- a/libao2/ao_sdl.c	Sat Mar 13 16:10:02 2004 +0000
+++ b/libao2/ao_sdl.c	Sat Mar 13 16:25:08 2004 +0000
@@ -34,7 +34,11 @@
 LIBAO_EXTERN(sdl)
 
 // Samplesize used by the SDLlib AudioSpec struct
+#ifdef WIN32
+#define SAMPLESIZE 2048
+#else
 #define SAMPLESIZE 1024
+#endif
 
 // General purpose Ring-buffering routines
 
@@ -95,8 +99,8 @@
 
 // end ring buffer stuff
 
-#if defined(HPUX) || defined(sgi) || (defined(sun) && defined(__svr4__))
-/* setenv is missing on solaris, IRIX and HPUX */
+#if defined(WIN32) || defined(HPUX) || defined(sgi) || (defined(sun) && defined(__svr4__))
+/* setenv is missing on win32, solaris, IRIX and HPUX */
 static void setenv(const char *name, const char *val, int _xx)
 {
   int len  = strlen(name) + strlen(val) + 2;
--- a/libvo/vo_sdl.c	Sat Mar 13 16:10:02 2004 +0000
+++ b/libvo/vo_sdl.c	Sat Mar 13 16:25:08 2004 +0000
@@ -139,8 +139,8 @@
 #include <SDL.h>
 //#include <SDL/SDL_syswm.h>
 
-#if  defined(HPUX) || defined(sgi) || (defined(sun) && defined(__svr4__))
-/* setenv is missing on solaris, IRIX and HPUX */
+#if defined(WIN32) || defined(HPUX) || defined(sgi) || (defined(sun) && defined(__svr4__))
+/* setenv is missing on win32, solaris, IRIX and HPUX */
 static void setenv(const char *name, const char *val, int _xx)
 {
     int len  = strlen(name) + strlen(val) + 2;