Don't put X_LIBS in the linker flags if we're dynamically loading X11
authorSam Lantinga <slouken@libsdl.org>
Mon, 06 Mar 2006 01:05:11 +0000
changeset 1468fecfef92fc94
parent 1467 b69f2b0309a0
child 1469 bf867c1e57e3
Don't put X_LIBS in the linker flags if we're dynamically loading X11
configure.in
     1.1 --- a/configure.in	Mon Mar 06 00:50:03 2006 +0000
     1.2 +++ b/configure.in	Mon Mar 06 01:05:11 2006 +0000
     1.3 @@ -763,11 +763,14 @@
     1.4              if test x$ac_cv_func_shmat != xyes; then
     1.5                  X_CFLAGS="$X_CFLAGS -DNO_SHARED_MEMORY"
     1.6              fi
     1.7 +
     1.8 +            AC_DEFINE(SDL_VIDEO_DRIVER_X11)
     1.9 +            SOURCES="$SOURCES $srcdir/src/video/x11/*.c"
    1.10 +            BUILD_CFLAGS="$BUILD_CFLAGS $X_CFLAGS"
    1.11              if test x$have_loadso != xyes && \
    1.12                 test x$enable_x11_shared = xyes; then
    1.13                  AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic X11 loading])
    1.14              fi
    1.15 -
    1.16              if test x$have_loadso = xyes && \
    1.17                 test x$enable_x11_shared = xyes && test x$x11_lib != x && test x$x11ext_lib != x; then
    1.18                  echo "-- dynamic libX11 -> $x11_lib"
    1.19 @@ -775,13 +778,8 @@
    1.20                  AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC, "$x11_lib")
    1.21                  AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT, "$x11ext_lib")
    1.22              else
    1.23 -                X_LIBS="$X_LIBS -lX11 -lXext"
    1.24 +                BUILD_LDFLAGS="$BUILD_LDFLAGS $X_LIBS -lX11 -lXext"
    1.25              fi
    1.26 -
    1.27 -            AC_DEFINE(SDL_VIDEO_DRIVER_X11)
    1.28 -            SOURCES="$SOURCES $srcdir/src/video/x11/*.c"
    1.29 -            BUILD_CFLAGS="$BUILD_CFLAGS $X_CFLAGS"
    1.30 -            BUILD_LDFLAGS="$BUILD_LDFLAGS $X_LIBS"
    1.31              have_video=yes
    1.32  
    1.33              AC_ARG_ENABLE(dga,