Fixed static linking on MacOS X (thanks Max!)
authorSam Lantinga <slouken@libsdl.org>
Wed, 11 Feb 2004 07:09:11 +0000
changeset 807674df5617bba
parent 806 42f4a3abf70b
child 808 0defd90ef27c
Fixed static linking on MacOS X (thanks Max!)
configure.in
sdl-config.in
     1.1 --- a/configure.in	Tue Feb 10 17:34:38 2004 +0000
     1.2 +++ b/configure.in	Wed Feb 11 07:09:11 2004 +0000
     1.3 @@ -2592,6 +2592,17 @@
     1.4      ;;
     1.5  esac
     1.6  
     1.7 +case "$ARCH" in
     1.8 +  macosx)
     1.9 +    # Evil hack to allow static linking on Mac OS X
    1.10 +    SDL_STATIC_LIBS="\${exec_prefix}/lib/libSDLmain.a \${exec_prefix}/lib/libSDL.a"
    1.11 +    ;;
    1.12 +  *)
    1.13 +    SDL_STATIC_LIBS="$SDL_LIBS"
    1.14 +    ;;
    1.15 +esac
    1.16 +
    1.17 +
    1.18  STATIC_SYSTEM_LIBS="$SYSTEM_LIBS"
    1.19  
    1.20  dnl Output the video drivers we use
    1.21 @@ -2614,6 +2625,7 @@
    1.22  dnl Expand the cflags and libraries needed by apps using SDL
    1.23  AC_SUBST(SDL_CFLAGS)
    1.24  AC_SUBST(SDL_LIBS)
    1.25 +AC_SUBST(SDL_STATIC_LIBS)
    1.26  AC_SUBST(SDL_RLD_FLAGS)
    1.27  
    1.28  dnl Expand the libraries needed for static and dynamic linking
     2.1 --- a/sdl-config.in	Tue Feb 10 17:34:38 2004 +0000
     2.2 +++ b/sdl-config.in	Wed Feb 11 07:09:11 2004 +0000
     2.3 @@ -57,7 +57,7 @@
     2.4  @ENABLE_STATIC_TRUE@@ENABLE_SHARED_TRUE@    --static-libs)
     2.5  @ENABLE_STATIC_TRUE@@ENABLE_SHARED_FALSE@    --libs|--static-libs)
     2.6  @ENABLE_STATIC_TRUE@      libdirs="-L@libdir@ @SDL_RLD_FLAGS@"
     2.7 -@ENABLE_STATIC_TRUE@      echo $libdirs @SDL_LIBS@ @STATIC_SYSTEM_LIBS@
     2.8 +@ENABLE_STATIC_TRUE@      echo $libdirs @SDL_STATIC_LIBS@ @STATIC_SYSTEM_LIBS@
     2.9  @ENABLE_STATIC_TRUE@      ;;
    2.10      *)
    2.11        echo "${usage}" 1>&2