changeset 1638:ebd1aedb1292

Miscellaneous Mac OS X fixes
author Sam Lantinga <slouken@libsdl.org>
date Mon, 17 Apr 2006 03:34:28 +0000
parents 9ba366b919c7
children 0f466fb614a9
files configure.in include/SDL_config_macosx.h
diffstat 2 files changed, 11 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/configure.in	Fri Apr 14 06:03:09 2006 +0000
+++ b/configure.in	Mon Apr 17 03:34:28 2006 +0000
@@ -1811,6 +1811,9 @@
         AC_TRY_COMPILE([
          #include <dlfcn.h>
         ],[
+         #if defined(MAC_OS_X_VERSION_MIN_REQUIRED) && MAC_OS_X_VERSION_MIN_REQUIRED <= 1020
+         #error Use dlcompat for Mac OS X 10.2 compatibility
+         #endif
         ],[
         have_dlopen=yes
         ])
@@ -2320,7 +2323,8 @@
         ARCH=macosx
 
         # Mac OS X builds with both the Carbon and OSX APIs at the moment
-        EXTRA_CFLAGS="-DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX"
+        EXTRA_CFLAGS="$EXTRA_CFLAGS -DTARGET_API_MAC_CARBON"
+        EXTRA_CFLAGS="$EXTRA_CFLAGS -DTARGET_API_MAC_OSX"
 
         # HACK: Reset EXTRA_LDFLAGS; the only thing it contains at this point
         # is -lm which is not needed under Mac OS X. But for some reasons it
@@ -2331,7 +2335,7 @@
         CheckDummyVideo
         CheckDiskAudio
         CheckDummyAudio
-        #CheckDLOPEN # Don't check dlopen(), to retain 10.2 compatibility
+        CheckDLOPEN
         CheckCOCOA
         CheckCARBON
         CheckX11
--- a/include/SDL_config_macosx.h	Fri Apr 14 06:03:09 2006 +0000
+++ b/include/SDL_config_macosx.h	Mon Apr 17 03:34:28 2006 +0000
@@ -95,7 +95,12 @@
 #define SDL_JOYSTICK_IOKIT	1
 
 /* Enable various shared object loading systems */
+#ifdef __ppc__
+/* For Mac OS X 10.2 compatibility */
+#define SDL_LOADSO_DLCOMPAT	1
+#else
 #define SDL_LOADSO_DLOPEN	1
+#endif
 
 /* Enable various threading systems */
 #define SDL_THREAD_PTHREAD	1