Mercurial > sdl-ios-xcode
diff configure.in @ 3025:54fac87e1f34
Added an API to enable/disable the screen saver.
The screensaver is disabled by default when using SDL 1.2 compatibility.
Use the new XScreenSaver extension, removed unused DPMS extension.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 12 Jan 2009 06:19:05 +0000 |
parents | cacb282192a1 |
children | 77c3e67f0740 |
line wrap: on
line diff
--- a/configure.in Sun Jan 11 23:56:19 2009 +0000 +++ b/configure.in Mon Jan 12 06:19:05 2009 +0000 @@ -1020,6 +1020,7 @@ xrender_lib='/usr/X11R6/lib/libXrender.1.dylib' xrandr_lib='/usr/X11R6/lib/libXrandr.2.dylib' xinput_lib='/usr/X11R6/lib/libXi.6.dylib' + xss_lib='/usr/X11R6/lib/libXss.6.dylib' ;; *-*-osf*) x11_lib='libX11.so' @@ -1062,6 +1063,12 @@ xinput_lib=[`ls -- $path/libXi.so.[0-9]* 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`] fi fi + if test "x$xss_lib" = "x"; then + xss_lib=[`ls -- $path/libXss.so.[0-9] 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`] + if test "x$xss_lib" = "x"; then + xss_lib=[`ls -- $path/libXss.so.[0-9]* 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`] + fi + fi done ;; esac @@ -1124,13 +1131,6 @@ AC_DEFINE(SDL_VIDEO_DRIVER_X11_XINERAMA) SOURCES="$SOURCES $srcdir/src/video/Xext/Xinerama/*.c" fi - AC_ARG_ENABLE(video-x11-xme, -AC_HELP_STRING([--enable-video-x11-xme], [enable Xi Graphics XME for fullscreen [[default=yes]]]), - , enable_video_x11_xme=yes) - if test x$enable_video_x11_xme = xyes; then - AC_DEFINE(SDL_VIDEO_DRIVER_X11_XME) - SOURCES="$SOURCES $srcdir/src/video/Xext/XME/*.c" - fi AC_ARG_ENABLE(video-x11-xrandr, AC_HELP_STRING([--enable-video-x11-xrandr], [enable X11 Xrandr extension for fullscreen [[default=yes]]]), , enable_video_x11_xrandr=yes) @@ -1188,19 +1188,32 @@ if test x$definitely_enable_video_x11_xinput = xyes; then AC_DEFINE(SDL_VIDEO_DRIVER_X11_XINPUT) fi - AC_ARG_ENABLE(video-x11-dpms, -AC_HELP_STRING([--enable-video-x11-dpms], [enable X11 DPMS extension [[default=yes]]]), - , enable_video_x11_dpms=yes) - if test x$enable_video_x11_dpms = xyes; then - AC_CHECK_HEADER(X11/extensions/dpms.h, - have_dpms_h_hdr=yes, - have_dpms_h_hdr=no, + AC_ARG_ENABLE(video-x11-scrnsaver, +AC_HELP_STRING([--enable-video-x11-scrnsaver], [enable X11 screensaver extension [[default=yes]]]), + , enable_video_x11_scrnsaver=yes) + if test x$enable_video_x11_scrnsaver = xyes; then + AC_CHECK_HEADER(X11/extensions/scrnsaver.h, + have_scrnsaver_h_hdr=yes, + have_scrnsaver_h_hdr=no, [#include <X11/Xlib.h> ]) - if test x$have_dpms_h_hdr = xyes; then - AC_DEFINE(SDL_VIDEO_DRIVER_X11_DPMS) + if test x$have_scrnsaver_h_hdr = xyes; then + if test x$enable_x11_shared = xyes && test x$xss_lib != x ; then + echo "-- dynamic libXss -> $xss_lib" + AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS, "$xss_lib") + definitely_enable_video_x11_scrnsaver=yes + else + AC_CHECK_LIB(Xss, XScreenSaverSuspend, have_xss_lib=yes) + if test x$have_xss_lib = xyes ; then + EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lXss" + definitely_enable_video_x11_scrnsaver=yes + fi + fi fi fi + if test x$definitely_enable_video_x11_scrnsaver = xyes; then + AC_DEFINE(SDL_VIDEO_DRIVER_X11_SCRNSAVER) + fi AC_ARG_ENABLE(render-x11, AC_HELP_STRING([--enable-render-x11], [enable the X11 render driver [[default=yes]]]),