Fix SDL detection.

git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1671 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
meep-eep
2005-04-23 23:23:16 +00:00
parent a9080b7a49
commit cad8f6f54d
17 changed files with 104 additions and 47 deletions
+14
View File
@@ -137,6 +137,20 @@ iswgraph(wint_t wc)
}
#endif
// Use SDL_INCLUDE to portably include the SDL files from the right
// location. TODO: Where SDL_H is located could be detected from the build
// script.
#ifdef APPLE
# define HAVE_SDL_SDL_H
#else
# define HAVE_SDL_H
#endif
#ifdef HAVE_SDL_H
# define SDL_INCLUDE(file) <file>
#elif defined(HAVE_SDL_SDL_H)
# define SDL_INCLUDE(file) <SDL/file>
#endif
#endif /* _PORT_H */
+2 -1
View File
@@ -1,4 +1,5 @@
#include "SDL.h"
#include "port.h"
#include SDL_INCLUDE(SDL.h)
#include "bbox.h"
TFB_BoundingBox TFB_BBox;
+2 -1
View File
@@ -1,4 +1,5 @@
#include "SDL.h"
#include "port.h"
#include SDL_INCLUDE(SDL.h)
#include "sdl_common.h"
#include "libs/graphics/gfx_common.h"
#include "libs/graphics/sdl/primitives.h"
+2 -1
View File
@@ -18,7 +18,8 @@
#define M_PI 3.141592654
#endif
#include "SDL.h"
#include "port.h"
#include SDL_INCLUDE(SDL.h)
/* ---- Defines */
@@ -19,9 +19,10 @@
#ifndef SDL_COMMON_H
#define SDL_COMMON_H
#include "SDL.h"
#include "SDL_image.h"
#include "SDL_byteorder.h"
#include "port.h"
#include SDL_INCLUDE(SDL.h)
#include SDL_INCLUDE(SDL_image.h)
#include SDL_INCLUDE(SDL_byteorder.h)
#include "libs/graphics/gfxintrn.h"
#include "libs/graphics/tfb_draw.h"
+4 -4
View File
@@ -2,10 +2,10 @@
#include "port.h"
#include "libs/uio.h"
#include "SDL.h"
#include "SDL_image.h"
#include "SDL_error.h"
#include "SDL_rwops.h"
#include SDL_INCLUDE(SDL.h)
#include SDL_INCLUDE(SDL_image.h)
#include SDL_INCLUDE(SDL_error.h)
#include SDL_INCLUDE(SDL_rwops.h)
#include "libs/misc.h"
#include <errno.h>
#include <string.h>
+2 -2
View File
@@ -3,8 +3,8 @@
#include "port.h"
#include "libs/uio.h"
#include "SDL.h"
#include "SDL_rwops.h"
#include SDL_INCLUDE(SDL.h)
#include SDL_INCLUDE(SDL_rwops.h)
SDL_Surface *sdluio_loadImage (uio_DirHandle *dir, const char *fileName);
int sdluio_seek (SDL_RWops *context, int offset, int whence);
+2 -2
View File
@@ -1,7 +1,7 @@
#include <SDL.h>
#include "port.h"
#include SDL_INCLUDE(SDL.h)
#include <string.h>
#include "keynames.h"
#include "port.h"
/* This code is adapted from the code in SDL_keysym.h. Though this
* would almost certainly be fast if we were to use a direct char *
+2 -2
View File
@@ -1,11 +1,11 @@
#include <SDL.h>
#include "port.h"
#include SDL_INCLUDE(SDL.h)
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include "vcontrol.h"
#include "vcontrol_malloc.h"
#include "keynames.h"
#include "port.h"
/* How many binding slots are allocated at once. */
#define POOL_CHUNK_SIZE 64
+1 -2
View File
@@ -1,10 +1,9 @@
#include <SDL.h>
#ifndef _VCONTROL_H_
#define _VCONTROL_H_
#include "port.h"
#include "libs/uio.h"
#include SDL_INCLUDE(SDL.h)
/* Initialization routines */
void VControl_Init (void);
@@ -20,10 +20,10 @@
#ifndef _AUDIODRV_SDL_H
#define _AUDIODRV_SDL_H
#include "config.h"
#include "port.h"
#include "libs/sound/sound.h"
#include "libs/sound/mixer/mixer.h"
#include <SDL.h>
#include SDL_INCLUDE(SDL.h)
/* General */
sint32 mixSDL_Init (audio_Driver *driver, sint32 flags);
@@ -20,8 +20,9 @@
#ifndef _SDLTHREAD_H
#define _SDLTHREAD_H
#include "SDL.h"
#include "SDL_thread.h"
#include "port.h"
#include SDL_INCLUDE(SDL.h)
#include SDL_INCLUDE(SDL_thread.h)
#include "libs/threadlib.h"
#include "libs/timelib.h"
+2 -1
View File
@@ -20,7 +20,8 @@
#ifndef _SDLTIME_H
#define _SDLTIME_H
#include "SDL.h"
#include "port.h"
#include SDL_INCLUDE(SDL.h)
#include "../timecommon.h"
#define NativeInitTimeSystem()
+1 -1
View File
@@ -43,7 +43,7 @@
#if defined(GFXMODULE_SDL)
# include <SDL.h>
# include SDL_INCLUDE(SDL.h)
// Including this is actually necessary on OSX.
#endif