EXTRA_LDFLAGS are the linker flags and libraries needed to build SDL.
authorSam Lantinga <slouken@libsdl.org>
Sat, 18 Mar 2006 18:41:59 +0000
changeset 1548 a77c022733fe
parent 1547 dd05d6ee234e
child 1549 066236f0cbf0
EXTRA_LDFLAGS are the linker flags and libraries needed to build SDL. SDL_LIBS are the linker flags and libraries needed to build SDL applications. SDL_STATIC_LIBS is set to SDL_LIBS by default.
configure.in
sdl-config.in
--- a/configure.in	Fri Mar 17 19:54:39 2006 +0000
+++ b/configure.in	Sat Mar 18 18:41:59 2006 +0000
@@ -2306,8 +2306,6 @@
             fi
             have_timers=yes
         fi
-        # Now set libraries needed in sdl-config
-        SYSTEM_LIBS="$EXTRA_LDFLAGS"
         ;;
     *-riscos)
         ARCH=riscos
@@ -2401,31 +2399,16 @@
 fi
 
 case "$ARCH" in
-  openbsd | netbsd | bsdi)
-    SHARED_SYSTEM_LIBS="$SYSTEM_LIBS"
-    ;;
-  qnx)
-    SHARED_SYSTEM_LIBS="$SYSTEM_LIBS"
-    ;;
   macosx)
-    SHARED_SYSTEM_LIBS=""
     if test x$enable_video = xyes -a x$enable_video_cocoa = xyes; then
-      SHARED_SYSTEM_LIBS="$SHARED_SYSTEM_LIBS -framework Cocoa"
+      SDL_LIBS="$SDL_LIBS -framework Cocoa"
     fi
     if test x$enable_video = xyes -a x$enable_video_carbon = xyes; then
-      SHARED_SYSTEM_LIBS="$SHARED_SYSTEM_LIBS -framework Carbon"
+      SDL_LIBS="$SDL_LIBS -framework Carbon"
     fi
     if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
-      SHARED_SYSTEM_LIBS="$SHARED_SYSTEM_LIBS -framework OpenGL"
+      SDL_LIBS="$SDL_LIBS -framework OpenGL"
     fi
-    ;;
-  *)
-    SHARED_SYSTEM_LIBS=""
-    ;;
-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"
     ;;
@@ -2434,8 +2417,6 @@
     ;;
 esac
 
-STATIC_SYSTEM_LIBS="$SYSTEM_LIBS"
-
 dnl Expand the cflags and libraries needed by apps using SDL
 AC_SUBST(SDL_CFLAGS)
 AC_SUBST(SDL_LIBS)
@@ -2460,11 +2441,6 @@
 AC_SUBST(ENABLE_STATIC_TRUE)
 AC_SUBST(ENABLE_STATIC_FALSE)
 
-dnl Expand the libraries needed for static and dynamic linking
-AC_SUBST(STATIC_SYSTEM_LIBS)
-AC_SUBST(SHARED_SYSTEM_LIBS)
-AC_SUBST(SYSTEM_LIBS)
-
 dnl Expand the sources and objects needed to build the library
 AC_SUBST(ac_aux_dir)
 AC_SUBST(INCLUDE)
--- a/sdl-config.in	Fri Mar 17 19:54:39 2006 +0000
+++ b/sdl-config.in	Sat Mar 18 18:41:59 2006 +0000
@@ -42,13 +42,11 @@
       echo -I@includedir@/SDL @SDL_CFLAGS@
       ;;
 @ENABLE_SHARED_TRUE@    --libs)
-@ENABLE_SHARED_TRUE@      libdirs="-L@libdir@ @SDL_RLD_FLAGS@"
-@ENABLE_SHARED_TRUE@      echo $libdirs @SDL_LIBS@ @SHARED_SYSTEM_LIBS@
+@ENABLE_SHARED_TRUE@      echo -L@libdir@ @SDL_RLD_FLAGS@ @SDL_LIBS@
 @ENABLE_SHARED_TRUE@      ;;
 @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_STATIC_LIBS@ @STATIC_SYSTEM_LIBS@
+@ENABLE_STATIC_TRUE@      echo -L@libdir@ @SDL_RLD_FLAGS@ @SDL_STATIC_LIBS@
 @ENABLE_STATIC_TRUE@      ;;
     *)
       echo "${usage}" 1>&2