configure.in
changeset 3025 54fac87e1f34
parent 3014 cacb282192a1
child 3032 77c3e67f0740
     1.1 --- a/configure.in	Sun Jan 11 23:56:19 2009 +0000
     1.2 +++ b/configure.in	Mon Jan 12 06:19:05 2009 +0000
     1.3 @@ -1020,6 +1020,7 @@
     1.4                      xrender_lib='/usr/X11R6/lib/libXrender.1.dylib'
     1.5                      xrandr_lib='/usr/X11R6/lib/libXrandr.2.dylib'
     1.6                      xinput_lib='/usr/X11R6/lib/libXi.6.dylib'
     1.7 +                    xss_lib='/usr/X11R6/lib/libXss.6.dylib'
     1.8                      ;;
     1.9                  *-*-osf*)
    1.10                      x11_lib='libX11.so'
    1.11 @@ -1062,6 +1063,12 @@
    1.12                                  xinput_lib=[`ls -- $path/libXi.so.[0-9]* 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`]
    1.13                              fi
    1.14                          fi
    1.15 +                        if test "x$xss_lib" = "x"; then
    1.16 +                            xss_lib=[`ls -- $path/libXss.so.[0-9] 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`]
    1.17 +                            if test "x$xss_lib" = "x"; then
    1.18 +                                xss_lib=[`ls -- $path/libXss.so.[0-9]* 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`]
    1.19 +                            fi
    1.20 +                        fi
    1.21                      done
    1.22                      ;;
    1.23              esac
    1.24 @@ -1124,13 +1131,6 @@
    1.25                  AC_DEFINE(SDL_VIDEO_DRIVER_X11_XINERAMA)
    1.26                  SOURCES="$SOURCES $srcdir/src/video/Xext/Xinerama/*.c"
    1.27              fi
    1.28 -            AC_ARG_ENABLE(video-x11-xme,
    1.29 -AC_HELP_STRING([--enable-video-x11-xme], [enable Xi Graphics XME for fullscreen [[default=yes]]]),
    1.30 -                            , enable_video_x11_xme=yes)
    1.31 -            if test x$enable_video_x11_xme = xyes; then
    1.32 -                AC_DEFINE(SDL_VIDEO_DRIVER_X11_XME)
    1.33 -                SOURCES="$SOURCES $srcdir/src/video/Xext/XME/*.c"
    1.34 -            fi
    1.35              AC_ARG_ENABLE(video-x11-xrandr,
    1.36  AC_HELP_STRING([--enable-video-x11-xrandr], [enable X11 Xrandr extension for fullscreen [[default=yes]]]),
    1.37                              , enable_video_x11_xrandr=yes)
    1.38 @@ -1188,19 +1188,32 @@
    1.39              if test x$definitely_enable_video_x11_xinput = xyes; then
    1.40                  AC_DEFINE(SDL_VIDEO_DRIVER_X11_XINPUT)
    1.41              fi
    1.42 -            AC_ARG_ENABLE(video-x11-dpms,
    1.43 -AC_HELP_STRING([--enable-video-x11-dpms], [enable X11 DPMS extension [[default=yes]]]),
    1.44 -                            , enable_video_x11_dpms=yes)
    1.45 -            if test x$enable_video_x11_dpms = xyes; then
    1.46 -                AC_CHECK_HEADER(X11/extensions/dpms.h,
    1.47 -                                have_dpms_h_hdr=yes,
    1.48 -                                have_dpms_h_hdr=no,
    1.49 +            AC_ARG_ENABLE(video-x11-scrnsaver,
    1.50 +AC_HELP_STRING([--enable-video-x11-scrnsaver], [enable X11 screensaver extension [[default=yes]]]),
    1.51 +                            , enable_video_x11_scrnsaver=yes)
    1.52 +            if test x$enable_video_x11_scrnsaver = xyes; then
    1.53 +                AC_CHECK_HEADER(X11/extensions/scrnsaver.h,
    1.54 +                                have_scrnsaver_h_hdr=yes,
    1.55 +                                have_scrnsaver_h_hdr=no,
    1.56                                  [#include <X11/Xlib.h>
    1.57                                  ])
    1.58 -                if test x$have_dpms_h_hdr = xyes; then
    1.59 -                    AC_DEFINE(SDL_VIDEO_DRIVER_X11_DPMS)
    1.60 +                if test x$have_scrnsaver_h_hdr = xyes; then
    1.61 +                    if test x$enable_x11_shared = xyes && test x$xss_lib != x ; then
    1.62 +                        echo "-- dynamic libXss -> $xss_lib"
    1.63 +                        AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS, "$xss_lib")
    1.64 +                        definitely_enable_video_x11_scrnsaver=yes
    1.65 +                    else
    1.66 +                        AC_CHECK_LIB(Xss, XScreenSaverSuspend, have_xss_lib=yes)
    1.67 +                        if test x$have_xss_lib = xyes ; then
    1.68 +                            EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lXss"
    1.69 +                            definitely_enable_video_x11_scrnsaver=yes
    1.70 +                        fi
    1.71 +                    fi
    1.72                  fi
    1.73              fi
    1.74 +            if test x$definitely_enable_video_x11_scrnsaver = xyes; then
    1.75 +                AC_DEFINE(SDL_VIDEO_DRIVER_X11_SCRNSAVER)
    1.76 +            fi
    1.77  
    1.78              AC_ARG_ENABLE(render-x11,
    1.79  AC_HELP_STRING([--enable-render-x11], [enable the X11 render driver [[default=yes]]]),