Skip to content
Permalink
Browse files

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.
  • Loading branch information
slouken committed Mar 18, 2006
1 parent 5a6db3c commit a7f2e93762f3de68f3284c77cc778b28e2f8c65f
Showing with 5 additions and 31 deletions.
  1. +3 −27 configure.in
  2. +2 −4 sdl-config.in
@@ -2306,8 +2306,6 @@ case "$target" in
fi
have_timers=yes
fi
# Now set libraries needed in sdl-config
SYSTEM_LIBS="$EXTRA_LDFLAGS"
;;
*-riscos)
ARCH=riscos
@@ -2401,31 +2399,16 @@ else
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 @@ case "$ARCH" in
;;
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_SHARED_FALSE)
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)
@@ -42,13 +42,11 @@ while test $# -gt 0; do
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

0 comments on commit a7f2e93

Please sign in to comment.