changeset 807:674df5617bba

Fixed static linking on MacOS X (thanks Max!)
author Sam Lantinga <slouken@libsdl.org>
date Wed, 11 Feb 2004 07:09:11 +0000
parents 42f4a3abf70b
children 0defd90ef27c
files configure.in sdl-config.in
diffstat 2 files changed, 13 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/configure.in	Tue Feb 10 17:34:38 2004 +0000
+++ b/configure.in	Wed Feb 11 07:09:11 2004 +0000
@@ -2592,6 +2592,17 @@
     ;;
 esac
 
+case "$ARCH" in
+  macosx)
+    # Evil hack to allow static linking on Mac OS X
+    SDL_STATIC_LIBS="\${exec_prefix}/lib/libSDLmain.a \${exec_prefix}/lib/libSDL.a"
+    ;;
+  *)
+    SDL_STATIC_LIBS="$SDL_LIBS"
+    ;;
+esac
+
+
 STATIC_SYSTEM_LIBS="$SYSTEM_LIBS"
 
 dnl Output the video drivers we use
@@ -2614,6 +2625,7 @@
 dnl Expand the cflags and libraries needed by apps using SDL
 AC_SUBST(SDL_CFLAGS)
 AC_SUBST(SDL_LIBS)
+AC_SUBST(SDL_STATIC_LIBS)
 AC_SUBST(SDL_RLD_FLAGS)
 
 dnl Expand the libraries needed for static and dynamic linking
--- a/sdl-config.in	Tue Feb 10 17:34:38 2004 +0000
+++ b/sdl-config.in	Wed Feb 11 07:09:11 2004 +0000
@@ -57,7 +57,7 @@
 @ENABLE_STATIC_TRUE@@ENABLE_SHARED_TRUE@    --static-libs)
 @ENABLE_STATIC_TRUE@@ENABLE_SHARED_FALSE@    --libs|--static-libs)
 @ENABLE_STATIC_TRUE@      libdirs="-L@libdir@ @SDL_RLD_FLAGS@"
-@ENABLE_STATIC_TRUE@      echo $libdirs @SDL_LIBS@ @STATIC_SYSTEM_LIBS@
+@ENABLE_STATIC_TRUE@      echo $libdirs @SDL_STATIC_LIBS@ @STATIC_SYSTEM_LIBS@
 @ENABLE_STATIC_TRUE@      ;;
     *)
       echo "${usage}" 1>&2