diff configure.in @ 4221:c56391324e59 SDL-1.2

Fixed bug #674 Matej 2009-01-08 09:25:34 PST Hello, I maintain a cross-platform project that uses SDL. One of the users who runs OSX has told me that he has problems with linking to SDL due to missing -framework option. I think that the problem is because of this: 'sdl-config --libs' outputs '-L/opt/local/lib -lSDLmain -lSDL -Wl,-framework,Cocoa' All the options are passed to the linker except the last one. I think that the good output should be just: '-L/opt/local/lib -lSDLmain -lSDL -framework Cocoa' since those options (--libs) are passed to the linker, so the '-Wl' option is redundant and possibly harmful in this very case I use autotools with libtool to do the build... Regards, Matej
author Sam Lantinga <slouken@libsdl.org>
date Mon, 21 Sep 2009 10:23:07 +0000
parents 0794718a428c
children c5ee6a0d7916
line wrap: on
line diff
--- a/configure.in	Mon Sep 21 09:58:43 2009 +0000
+++ b/configure.in	Mon Sep 21 10:23:07 2009 +0000
@@ -1685,10 +1685,10 @@
         case "$host" in
             *-*-darwin*)
                 if test x$enable_video_cocoa = xyes; then
-                    EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,OpenGL"
+                    EXTRA_LDFLAGS="$EXTRA_LDFLAGS -framework OpenGL"
                 fi
                 if test x$enable_video_carbon = xyes; then
-                    EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,AGL"
+                    EXTRA_LDFLAGS="$EXTRA_LDFLAGS -framework AGL"
                 fi
         esac
     fi
@@ -2695,21 +2695,21 @@
         EXTRA_CFLAGS="$EXTRA_CFLAGS -fpascal-strings"
         SDL_LIBS="-lSDLmain $SDL_LIBS"
         if test x$enable_video_cocoa = xyes; then
-            EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,Cocoa"
+            EXTRA_LDFLAGS="$EXTRA_LDFLAGS -framework Cocoa"
             need_iokit_framework=yes
         fi
         if test x$enable_video_carbon = xyes -o x$enable_video_cocoa = xyes; then
             # The Cocoa backend still needs Carbon
-            EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,ApplicationServices"
-            EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,Carbon"
+            EXTRA_LDFLAGS="$EXTRA_LDFLAGS -framework ApplicationServices"
+            EXTRA_LDFLAGS="$EXTRA_LDFLAGS -framework Carbon"
         fi
         # If either the audio or CD driver is used, add the AudioUnit framework
         if test x$enable_audio = xyes -o x$enable_cdrom = xyes; then
-            EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,AudioToolbox -Wl,-framework,AudioUnit"
+            EXTRA_LDFLAGS="$EXTRA_LDFLAGS -framework AudioToolbox -framework AudioUnit"
         fi
         # Some subsystems reference IOKit...
         if test x$need_iokit_framework = xyes; then
-            EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,IOKit"
+            EXTRA_LDFLAGS="$EXTRA_LDFLAGS -framework IOKit"
         fi
         ;;
     *-*-mint*)
@@ -2854,10 +2854,10 @@
 case "$ARCH" in
   macosx)
     if test x$enable_video = xyes -a x$enable_video_cocoa = xyes; then
-      SDL_LIBS="$SDL_LIBS -Wl,-framework,Cocoa"
+      SDL_LIBS="$SDL_LIBS -framework Cocoa"
     fi
     if test x$enable_video = xyes -a x$enable_video_carbon = xyes; then
-      SDL_LIBS="$SDL_LIBS -Wl,-framework,Carbon"
+      SDL_LIBS="$SDL_LIBS -framework Carbon"
     fi
     # Evil hack to allow static linking on Mac OS X
     SDL_STATIC_LIBS="\${libdir}/libSDLmain.a \${libdir}/libSDL.a $EXTRA_LDFLAGS"