comparison configure.in @ 1611:ec3466b08f17

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.
author Sam Lantinga <slouken@libsdl.org>
date Fri, 24 Mar 2006 05:11:51 +0000
parents d91c02552377
children f12379c41042
comparison
equal deleted inserted replaced
1610:a1ee5944412b 1611:ec3466b08f17
1442 { 1442 {
1443 if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then 1443 if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
1444 AC_DEFINE(SDL_VIDEO_OPENGL) 1444 AC_DEFINE(SDL_VIDEO_OPENGL)
1445 case "$host" in 1445 case "$host" in
1446 *-*-darwin*) 1446 *-*-darwin*)
1447 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -framework OpenGL" 1447 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,OpenGL"
1448 # The following is probably not available in Darwin: 1448 # The following is probably not available in Darwin:
1449 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -framework AGL" 1449 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,AGL"
1450 esac 1450 esac
1451 fi 1451 fi
1452 } 1452 }
1453 1453
1454 dnl Check for Mesa offscreen rendering 1454 dnl Check for Mesa offscreen rendering
2340 fi 2340 fi
2341 # Set up files for the joystick library 2341 # Set up files for the joystick library
2342 if test x$enable_joystick = xyes; then 2342 if test x$enable_joystick = xyes; then
2343 AC_DEFINE(SDL_JOYSTICK_IOKIT) 2343 AC_DEFINE(SDL_JOYSTICK_IOKIT)
2344 SOURCES="$SOURCES $srcdir/src/joystick/darwin/*.c" 2344 SOURCES="$SOURCES $srcdir/src/joystick/darwin/*.c"
2345 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -framework IOKit" 2345 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,IOKit"
2346 have_joystick=yes 2346 have_joystick=yes
2347 fi 2347 fi
2348 # Set up files for the cdrom library 2348 # Set up files for the cdrom library
2349 if test x$enable_cdrom = xyes; then 2349 if test x$enable_cdrom = xyes; then
2350 AC_DEFINE(SDL_CDROM_MACOSX) 2350 AC_DEFINE(SDL_CDROM_MACOSX)
2366 # The MacOS X platform requires special setup. 2366 # The MacOS X platform requires special setup.
2367 SDLMAIN_SOURCES="$srcdir/src/main/macosx/*.m" 2367 SDLMAIN_SOURCES="$srcdir/src/main/macosx/*.m"
2368 EXTRA_CFLAGS="$EXTRA_CFLAGS -fpascal-strings" 2368 EXTRA_CFLAGS="$EXTRA_CFLAGS -fpascal-strings"
2369 SDL_LIBS="-lSDLmain $SDL_LIBS" 2369 SDL_LIBS="-lSDLmain $SDL_LIBS"
2370 if test x$enable_video_cocoa = xyes; then 2370 if test x$enable_video_cocoa = xyes; then
2371 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -framework Cocoa" 2371 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,Cocoa"
2372 fi 2372 fi
2373 if test x$enable_video_carbon = xyes -o x$enable_video_cocoa = xyes; then 2373 if test x$enable_video_carbon = xyes -o x$enable_video_cocoa = xyes; then
2374 # The Cocoa backend still needs Carbon, and the YUV code QuickTime 2374 # The Cocoa backend still needs Carbon, and the YUV code QuickTime
2375 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -framework QuickTime -framework ApplicationServices" 2375 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,QuickTime -Wl,-framework,ApplicationServices"
2376 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -framework Carbon" 2376 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,Carbon"
2377 fi 2377 fi
2378 # If either the audio or CD driver is used, add the AudioUnit framework 2378 # If either the audio or CD driver is used, add the AudioUnit framework
2379 if test x$enable_audio = xyes -o x$enable_cdrom = xyes; then 2379 if test x$enable_audio = xyes -o x$enable_cdrom = xyes; then
2380 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -framework AudioToolbox -framework AudioUnit" 2380 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,AudioToolbox -Wl,-framework,AudioUnit"
2381 fi 2381 fi
2382 ;; 2382 ;;
2383 *-*-mint*) 2383 *-*-mint*)
2384 ARCH=mint 2384 ARCH=mint
2385 CheckDummyVideo 2385 CheckDummyVideo
2517 fi 2517 fi
2518 2518
2519 case "$ARCH" in 2519 case "$ARCH" in
2520 macosx) 2520 macosx)
2521 if test x$enable_video = xyes -a x$enable_video_cocoa = xyes; then 2521 if test x$enable_video = xyes -a x$enable_video_cocoa = xyes; then
2522 SDL_LIBS="$SDL_LIBS -framework Cocoa" 2522 SDL_LIBS="$SDL_LIBS -Wl,-framework,Cocoa"
2523 fi 2523 fi
2524 if test x$enable_video = xyes -a x$enable_video_carbon = xyes; then 2524 if test x$enable_video = xyes -a x$enable_video_carbon = xyes; then
2525 SDL_LIBS="$SDL_LIBS -framework Carbon" 2525 SDL_LIBS="$SDL_LIBS -Wl,-framework,Carbon"
2526 fi 2526 fi
2527 if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then 2527 if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
2528 SDL_LIBS="$SDL_LIBS -framework OpenGL" 2528 SDL_LIBS="$SDL_LIBS -Wl,-framework,OpenGL"
2529 fi 2529 fi
2530 # Evil hack to allow static linking on Mac OS X 2530 # Evil hack to allow static linking on Mac OS X
2531 SDL_STATIC_LIBS="\${exec_prefix}/lib/libSDLmain.a \${exec_prefix}/lib/libSDL.a" 2531 SDL_STATIC_LIBS="\${exec_prefix}/lib/libSDLmain.a \${exec_prefix}/lib/libSDL.a"
2532 ;; 2532 ;;
2533 *) 2533 *)