changeset 1624:8208ae96bb2d

Fixed bug #192 The change made to sdl-config.in on March 18 (rev 11, see http://www.libsdl.org/cgi/cvsweb.cgi/SDL12/sdl-config.in), broke static linking under Mac OS X for unix style build systems. In other words, "sdl-config --static-libs" no longer produces the correct output, as it is missing the required -framework switches. The attached patch fixes this.
author Sam Lantinga <slouken@libsdl.org>
date Thu, 13 Apr 2006 13:29:00 +0000
parents 09375aed0208
children 7e89aa7843c5
files configure.in
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/configure.in	Thu Apr 13 13:25:21 2006 +0000
+++ b/configure.in	Thu Apr 13 13:29:00 2006 +0000
@@ -2315,6 +2315,13 @@
         # just the OS X kernel sans upper layers like Carbon and Cocoa.
         # Next line is broken, and a few files below require Mac OS X (full)
         ARCH=macosx
+
+        # 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 also
+        # tends to contain spurious -L switches, which we don't want to use
+        # here or in sdl-config. Hence we reset it.
+        EXTRA_LDFLAGS=""
+
         CheckDummyVideo
         CheckDiskAudio
         CheckDummyAudio
@@ -2528,7 +2535,7 @@
       SDL_LIBS="$SDL_LIBS -Wl,-framework,OpenGL"
     fi
     # Evil hack to allow static linking on Mac OS X
-    SDL_STATIC_LIBS="\${exec_prefix}/lib/libSDLmain.a \${exec_prefix}/lib/libSDL.a"
+    SDL_STATIC_LIBS="\${exec_prefix}/lib/libSDLmain.a \${exec_prefix}/lib/libSDL.a $EXTRA_LDFLAGS"
     ;;
   *)
     SDL_STATIC_LIBS="$SDL_LIBS"