Fixed bug #177
The attached patch changes configure.in to use "-framework FOO" instead of "-Wl,-framework,FOO". This avoid some issues with certain versions of libtool that do not handle -framework properly. Some versions of libtool will try to reorder the two parts of the option, or render the 2nd part of the argument to the relative path of a non-existent library. Note: It is not enough if SDL uses a version of libtool that does this correctly, because these -framework options show up in "sdl-config --libs". Hence, some 3rd party apps which still ship with an old libtool have troubles compiling under Mac OS X. --HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401618
This commit is contained in:
parent
fee3805600
commit
1237375c2d
2 changed files with 11 additions and 65 deletions
20
configure.in
20
configure.in
|
@ -1444,9 +1444,9 @@ CheckMacGL()
|
|||
AC_DEFINE(SDL_VIDEO_OPENGL)
|
||||
case "$host" in
|
||||
*-*-darwin*)
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -framework OpenGL"
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,OpenGL"
|
||||
# The following is probably not available in Darwin:
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -framework AGL"
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,AGL"
|
||||
esac
|
||||
fi
|
||||
}
|
||||
|
@ -2342,7 +2342,7 @@ case "$host" in
|
|||
if test x$enable_joystick = xyes; then
|
||||
AC_DEFINE(SDL_JOYSTICK_IOKIT)
|
||||
SOURCES="$SOURCES $srcdir/src/joystick/darwin/*.c"
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -framework IOKit"
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,IOKit"
|
||||
have_joystick=yes
|
||||
fi
|
||||
# Set up files for the cdrom library
|
||||
|
@ -2368,16 +2368,16 @@ case "$host" in
|
|||
EXTRA_CFLAGS="$EXTRA_CFLAGS -fpascal-strings"
|
||||
SDL_LIBS="-lSDLmain $SDL_LIBS"
|
||||
if test x$enable_video_cocoa = xyes; then
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -framework Cocoa"
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,Cocoa"
|
||||
fi
|
||||
if test x$enable_video_carbon = xyes -o x$enable_video_cocoa = xyes; then
|
||||
# The Cocoa backend still needs Carbon, and the YUV code QuickTime
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -framework QuickTime -framework ApplicationServices"
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -framework Carbon"
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,QuickTime -Wl,-framework,ApplicationServices"
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-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 -framework AudioToolbox -framework AudioUnit"
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,AudioToolbox -Wl,-framework,AudioUnit"
|
||||
fi
|
||||
;;
|
||||
*-*-mint*)
|
||||
|
@ -2519,13 +2519,13 @@ fi
|
|||
case "$ARCH" in
|
||||
macosx)
|
||||
if test x$enable_video = xyes -a x$enable_video_cocoa = xyes; then
|
||||
SDL_LIBS="$SDL_LIBS -framework Cocoa"
|
||||
SDL_LIBS="$SDL_LIBS -Wl,-framework,Cocoa"
|
||||
fi
|
||||
if test x$enable_video = xyes -a x$enable_video_carbon = xyes; then
|
||||
SDL_LIBS="$SDL_LIBS -framework Carbon"
|
||||
SDL_LIBS="$SDL_LIBS -Wl,-framework,Carbon"
|
||||
fi
|
||||
if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
|
||||
SDL_LIBS="$SDL_LIBS -framework OpenGL"
|
||||
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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue