I had to make the following changes in order to compile SDL-1.1.8 with
gcc in a recent Cygwin environment under Winblows 2000. The problem
is that gcc defines “unix” even though it’s not Unix. (There are
probably valid reasons for this since the intended environment is
quite Unix-like, but whether you agree or not, that’s the way it is.)
In addition to these compile issues, I was never able to get the
shared library version working. Running “configure” with the option
–enable-shared=no was required.
The default installation location is root (/) which is probably not
what’s intended. I added the configure option --prefix=/usr/local to
solve this problem.----------------------------------------------------------------------
diff -c -r SDL-1.1.8.orig/include/SDL_events.h SDL-1.1.8.modified/include/SDL_events.h
*** SDL-1.1.8.orig/include/SDL_events.h Sun Feb 11 18:34:54 2001
— SDL-1.1.8.modified/include/SDL_events.h Fri Feb 23 15:52:14 2001
*** 30,35 ****
— 30,39 ----
#ifndef _SDL_events_h
#define _SDL_events_h
- #ifdef CYGWIN32
-
include <w32api/windows.h>
- #endif /* CYGWIN32 */
-
#include “SDL_types.h”
#include “SDL_active.h”
#include "SDL_keyboard.h"
diff -c -r SDL-1.1.8.orig/include/SDL_syswm.h SDL-1.1.8.modified/include/SDL_syswm.h
*** SDL-1.1.8.orig/include/SDL_syswm.h Sat Feb 10 02:20:02 2001
— SDL-1.1.8.modified/include/SDL_syswm.h Fri Feb 23 15:52:14 2001
*** 50,56 ****
/* This is the structure for custom window manager events /
#if (defined(unix) || defined(unix) || defined(_AIX)) &&
! !defined(DISABLE_X11)
/ AIX is unix, of course, but the native compiler CSet doesn’t define unix */
#include <X11/Xlib.h>
#include <X11/Xatom.h>
— 50,56 ----
/* This is the structure for custom window manager events /
#if (defined(unix) || defined(unix) || defined(_AIX)) &&
! (!defined(DISABLE_X11) && !defined(CYGWIN32))
/ AIX is unix, of course, but the native compiler CSet doesn’t define unix */
#include <X11/Xlib.h>
#include <X11/Xatom.h>
diff -c -r SDL-1.1.8.orig/src/audio/SDL_audio.c SDL-1.1.8.modified/src/audio/SDL_audio.c
*** SDL-1.1.8.orig/src/audio/SDL_audio.c Sat Feb 10 02:20:04 2001
— SDL-1.1.8.modified/src/audio/SDL_audio.c Fri Feb 23 15:52:20 2001
*** 40,46 ****
/* Available audio drivers */
static AudioBootStrap *bootstrap[] = {
! #if defined(unix) && !defined(linux) && !defined(FreeBSD)
&AUDIO_bootstrap,
#endif
#ifdef OSS_SUPPORT
— 40,46 ----
/* Available audio drivers */
static AudioBootStrap *bootstrap[] = {
! #if defined(unix) && !defined(linux) && !defined(FreeBSD) && !defined(CYGWIN32)
&AUDIO_bootstrap,
#endif
#ifdef OSS_SUPPORT
diff -c -r SDL-1.1.8.orig/src/audio/SDL_sysaudio.h SDL-1.1.8.modified/src/audio/SDL_sysaudio.h
*** SDL-1.1.8.orig/src/audio/SDL_sysaudio.h Sat Feb 10 02:20:04 2001
— SDL-1.1.8.modified/src/audio/SDL_sysaudio.h Fri Feb 23 15:52:20 2001
*** 99,105 ****
SDL_AudioDevice *(*create)(int devindex);
} AudioBootStrap;
! #ifdef unix
extern AudioBootStrap AUDIO_bootstrap;
#endif
#ifdef OSS_SUPPORT
— 99,105 ----
SDL_AudioDevice *(*create)(int devindex);
} AudioBootStrap;
! #if defined(unix) && !defined(CYGWIN32)
extern AudioBootStrap AUDIO_bootstrap;
#endif
#ifdef OSS_SUPPORT
diff -c -r SDL-1.1.8.orig/src/video/wincommon/SDL_lowvideo.h SDL-1.1.8.modified/src/video/wincommon/SDL_lowvideo.h
*** SDL-1.1.8.orig/src/video/wincommon/SDL_lowvideo.h Sat Feb 10 02:20:08 2001
— SDL-1.1.8.modified/src/video/wincommon/SDL_lowvideo.h Fri Feb 23 15:52:22 2001
*** 28,33 ****
— 28,37 ----
#ifndef _SDL_lowvideo_h
#define _SDL_lowvideo_h
-
#ifdef CYGWIN32
-
include <w32api/windows.h>
-
#endif /* CYGWIN32 */
-
#include “SDL_sysvideo.h”
/* Hidden “this” pointer for the video functions */