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 1548a77c022733fe
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
     1.1 --- a/configure.in	Fri Mar 17 19:54:39 2006 +0000
     1.2 +++ b/configure.in	Sat Mar 18 18:41:59 2006 +0000
     1.3 @@ -2306,8 +2306,6 @@
     1.4              fi
     1.5              have_timers=yes
     1.6          fi
     1.7 -        # Now set libraries needed in sdl-config
     1.8 -        SYSTEM_LIBS="$EXTRA_LDFLAGS"
     1.9          ;;
    1.10      *-riscos)
    1.11          ARCH=riscos
    1.12 @@ -2401,31 +2399,16 @@
    1.13  fi
    1.14  
    1.15  case "$ARCH" in
    1.16 -  openbsd | netbsd | bsdi)
    1.17 -    SHARED_SYSTEM_LIBS="$SYSTEM_LIBS"
    1.18 -    ;;
    1.19 -  qnx)
    1.20 -    SHARED_SYSTEM_LIBS="$SYSTEM_LIBS"
    1.21 -    ;;
    1.22    macosx)
    1.23 -    SHARED_SYSTEM_LIBS=""
    1.24      if test x$enable_video = xyes -a x$enable_video_cocoa = xyes; then
    1.25 -      SHARED_SYSTEM_LIBS="$SHARED_SYSTEM_LIBS -framework Cocoa"
    1.26 +      SDL_LIBS="$SDL_LIBS -framework Cocoa"
    1.27      fi
    1.28      if test x$enable_video = xyes -a x$enable_video_carbon = xyes; then
    1.29 -      SHARED_SYSTEM_LIBS="$SHARED_SYSTEM_LIBS -framework Carbon"
    1.30 +      SDL_LIBS="$SDL_LIBS -framework Carbon"
    1.31      fi
    1.32      if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
    1.33 -      SHARED_SYSTEM_LIBS="$SHARED_SYSTEM_LIBS -framework OpenGL"
    1.34 +      SDL_LIBS="$SDL_LIBS -framework OpenGL"
    1.35      fi
    1.36 -    ;;
    1.37 -  *)
    1.38 -    SHARED_SYSTEM_LIBS=""
    1.39 -    ;;
    1.40 -esac
    1.41 -
    1.42 -case "$ARCH" in
    1.43 -  macosx)
    1.44      # Evil hack to allow static linking on Mac OS X
    1.45      SDL_STATIC_LIBS="\${exec_prefix}/lib/libSDLmain.a \${exec_prefix}/lib/libSDL.a"
    1.46      ;;
    1.47 @@ -2434,8 +2417,6 @@
    1.48      ;;
    1.49  esac
    1.50  
    1.51 -STATIC_SYSTEM_LIBS="$SYSTEM_LIBS"
    1.52 -
    1.53  dnl Expand the cflags and libraries needed by apps using SDL
    1.54  AC_SUBST(SDL_CFLAGS)
    1.55  AC_SUBST(SDL_LIBS)
    1.56 @@ -2460,11 +2441,6 @@
    1.57  AC_SUBST(ENABLE_STATIC_TRUE)
    1.58  AC_SUBST(ENABLE_STATIC_FALSE)
    1.59  
    1.60 -dnl Expand the libraries needed for static and dynamic linking
    1.61 -AC_SUBST(STATIC_SYSTEM_LIBS)
    1.62 -AC_SUBST(SHARED_SYSTEM_LIBS)
    1.63 -AC_SUBST(SYSTEM_LIBS)
    1.64 -
    1.65  dnl Expand the sources and objects needed to build the library
    1.66  AC_SUBST(ac_aux_dir)
    1.67  AC_SUBST(INCLUDE)
     2.1 --- a/sdl-config.in	Fri Mar 17 19:54:39 2006 +0000
     2.2 +++ b/sdl-config.in	Sat Mar 18 18:41:59 2006 +0000
     2.3 @@ -42,13 +42,11 @@
     2.4        echo -I@includedir@/SDL @SDL_CFLAGS@
     2.5        ;;
     2.6  @ENABLE_SHARED_TRUE@    --libs)
     2.7 -@ENABLE_SHARED_TRUE@      libdirs="-L@libdir@ @SDL_RLD_FLAGS@"
     2.8 -@ENABLE_SHARED_TRUE@      echo $libdirs @SDL_LIBS@ @SHARED_SYSTEM_LIBS@
     2.9 +@ENABLE_SHARED_TRUE@      echo -L@libdir@ @SDL_RLD_FLAGS@ @SDL_LIBS@
    2.10  @ENABLE_SHARED_TRUE@      ;;
    2.11  @ENABLE_STATIC_TRUE@@ENABLE_SHARED_TRUE@    --static-libs)
    2.12  @ENABLE_STATIC_TRUE@@ENABLE_SHARED_FALSE@    --libs|--static-libs)
    2.13 -@ENABLE_STATIC_TRUE@      libdirs="-L@libdir@ @SDL_RLD_FLAGS@"
    2.14 -@ENABLE_STATIC_TRUE@      echo $libdirs @SDL_STATIC_LIBS@ @STATIC_SYSTEM_LIBS@
    2.15 +@ENABLE_STATIC_TRUE@      echo -L@libdir@ @SDL_RLD_FLAGS@ @SDL_STATIC_LIBS@
    2.16  @ENABLE_STATIC_TRUE@      ;;
    2.17      *)
    2.18        echo "${usage}" 1>&2