diff src/video/x11/SDL_x11dyn.c @ 1361:19418e4422cb

New configure-based build system. Still work in progress, but much improved
author Sam Lantinga <slouken@libsdl.org>
date Thu, 16 Feb 2006 10:11:48 +0000
parents fe7d081a4955
children d910939febfa
line wrap: on
line diff
--- a/src/video/x11/SDL_x11dyn.c	Fri Feb 10 07:29:08 2006 +0000
+++ b/src/video/x11/SDL_x11dyn.c	Thu Feb 16 10:11:48 2006 +0000
@@ -24,6 +24,8 @@
 #define DEBUG_DYNAMIC_X11 1
 #endif
 
+#include "SDL_config.h"
+
 #define __SDL_NO_REDEFINE_X11_HEADER_SYMS 1
 #include "SDL_x11dyn.h"
 
@@ -31,13 +33,13 @@
 #include <stdio.h>
 #endif
 
-#ifdef X11_DYNAMIC
+#ifdef SDL_VIDEO_DRIVER_X11_DYNAMIC
 #include <dlfcn.h>
 #include "SDL_name.h"
 #include "SDL_loadso.h"
-static const char *x11_library = X11_DYNAMIC;
+static const char *x11_library = SDL_VIDEO_DRIVER_X11_DYNAMIC;
 static void *x11_handle = NULL;
-static const char *x11ext_library = X11EXT_DYNAMIC;
+static const char *x11ext_library = SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT;
 static void *x11ext_handle = NULL;
 
 static void *X11_GetSym(int required, const char *fnname, int *rc)
@@ -65,7 +67,7 @@
 
 	return fn;
 }
-#endif  /* defined X11_DYNAMIC */
+#endif  /* SDL_VIDEO_DRIVER_X11_DYNAMIC */
 
 /* Define all the function pointers... */
 #define SDL_X11_SYM(req,ret,fn,params) ret (*p##fn) params = NULL;
@@ -84,7 +86,7 @@
 			#include "SDL_x11sym.h"
 			#undef SDL_X11_SYM
 
-			#ifdef X11_DYNAMIC
+			#ifdef SDL_VIDEO_DRIVER_X11_DYNAMIC
 			if (x11_handle != NULL) {
 				SDL_UnloadObject(x11_handle);
 				x11_handle = NULL;
@@ -105,7 +107,7 @@
 
     /* deal with multiple modules (dga, x11, etc) needing these symbols... */
 	if (x11_load_refcount++ == 0) {
-		#ifdef X11_DYNAMIC
+		#ifdef SDL_VIDEO_DRIVER_X11_DYNAMIC
 			x11_handle = SDL_LoadObject(x11_library);
 			x11ext_handle = SDL_LoadObject(x11ext_library);
 			rc = ((x11_handle != NULL) && (x11ext_handle != NULL));