comparison 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
comparison
equal deleted inserted replaced
4220:cf958451fd8d 4221:c56391324e59
1683 if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then 1683 if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
1684 AC_DEFINE(SDL_VIDEO_OPENGL) 1684 AC_DEFINE(SDL_VIDEO_OPENGL)
1685 case "$host" in 1685 case "$host" in
1686 *-*-darwin*) 1686 *-*-darwin*)
1687 if test x$enable_video_cocoa = xyes; then 1687 if test x$enable_video_cocoa = xyes; then
1688 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,OpenGL" 1688 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -framework OpenGL"
1689 fi 1689 fi
1690 if test x$enable_video_carbon = xyes; then 1690 if test x$enable_video_carbon = xyes; then
1691 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,AGL" 1691 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -framework AGL"
1692 fi 1692 fi
1693 esac 1693 esac
1694 fi 1694 fi
1695 } 1695 }
1696 1696
2693 # The Mac OS X platform requires special setup. 2693 # The Mac OS X platform requires special setup.
2694 SDLMAIN_SOURCES="$srcdir/src/main/macosx/*.m" 2694 SDLMAIN_SOURCES="$srcdir/src/main/macosx/*.m"
2695 EXTRA_CFLAGS="$EXTRA_CFLAGS -fpascal-strings" 2695 EXTRA_CFLAGS="$EXTRA_CFLAGS -fpascal-strings"
2696 SDL_LIBS="-lSDLmain $SDL_LIBS" 2696 SDL_LIBS="-lSDLmain $SDL_LIBS"
2697 if test x$enable_video_cocoa = xyes; then 2697 if test x$enable_video_cocoa = xyes; then
2698 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,Cocoa" 2698 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -framework Cocoa"
2699 need_iokit_framework=yes 2699 need_iokit_framework=yes
2700 fi 2700 fi
2701 if test x$enable_video_carbon = xyes -o x$enable_video_cocoa = xyes; then 2701 if test x$enable_video_carbon = xyes -o x$enable_video_cocoa = xyes; then
2702 # The Cocoa backend still needs Carbon 2702 # The Cocoa backend still needs Carbon
2703 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,ApplicationServices" 2703 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -framework ApplicationServices"
2704 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,Carbon" 2704 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -framework Carbon"
2705 fi 2705 fi
2706 # If either the audio or CD driver is used, add the AudioUnit framework 2706 # If either the audio or CD driver is used, add the AudioUnit framework
2707 if test x$enable_audio = xyes -o x$enable_cdrom = xyes; then 2707 if test x$enable_audio = xyes -o x$enable_cdrom = xyes; then
2708 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,AudioToolbox -Wl,-framework,AudioUnit" 2708 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -framework AudioToolbox -framework AudioUnit"
2709 fi 2709 fi
2710 # Some subsystems reference IOKit... 2710 # Some subsystems reference IOKit...
2711 if test x$need_iokit_framework = xyes; then 2711 if test x$need_iokit_framework = xyes; then
2712 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,IOKit" 2712 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -framework IOKit"
2713 fi 2713 fi
2714 ;; 2714 ;;
2715 *-*-mint*) 2715 *-*-mint*)
2716 ARCH=mint 2716 ARCH=mint
2717 CheckDummyVideo 2717 CheckDummyVideo
2852 fi 2852 fi
2853 2853
2854 case "$ARCH" in 2854 case "$ARCH" in
2855 macosx) 2855 macosx)
2856 if test x$enable_video = xyes -a x$enable_video_cocoa = xyes; then 2856 if test x$enable_video = xyes -a x$enable_video_cocoa = xyes; then
2857 SDL_LIBS="$SDL_LIBS -Wl,-framework,Cocoa" 2857 SDL_LIBS="$SDL_LIBS -framework Cocoa"
2858 fi 2858 fi
2859 if test x$enable_video = xyes -a x$enable_video_carbon = xyes; then 2859 if test x$enable_video = xyes -a x$enable_video_carbon = xyes; then
2860 SDL_LIBS="$SDL_LIBS -Wl,-framework,Carbon" 2860 SDL_LIBS="$SDL_LIBS -framework Carbon"
2861 fi 2861 fi
2862 # Evil hack to allow static linking on Mac OS X 2862 # Evil hack to allow static linking on Mac OS X
2863 SDL_STATIC_LIBS="\${libdir}/libSDLmain.a \${libdir}/libSDL.a $EXTRA_LDFLAGS" 2863 SDL_STATIC_LIBS="\${libdir}/libSDLmain.a \${libdir}/libSDL.a $EXTRA_LDFLAGS"
2864 ;; 2864 ;;
2865 *) 2865 *)