configure
changeset 5408 35a63789c3f2
parent 5389 24903690f48a
child 5410 12bc832d3fa8
     1.1 --- a/configure	Sun Feb 27 22:22:58 2011 -0800
     1.2 +++ b/configure	Mon Feb 28 09:01:53 2011 -0800
     1.3 @@ -1537,20 +1537,19 @@
     1.4    --enable-dummyaudio     support the dummy audio driver [default=yes]
     1.5    --enable-video-x11      use X11 video driver [default=yes]
     1.6    --enable-x11-shared     dynamically load X11 support [default=maybe]
     1.7 -  --enable-video-x11-vm   use X11 VM extension for fullscreen [default=yes]
     1.8 -  --enable-video-x11-xv   use X11 XvImage extension for video [default=yes]
     1.9    --enable-video-x11-xinerama
    1.10                            enable X11 Xinerama support [default=yes]
    1.11 -  --enable-video-x11-xshape
    1.12 -                          enable X11 XShape support [default=yes]
    1.13 +  --enable-video-x11-xinput
    1.14 +                          enable X11 XInput extension for manymouse, tablets,
    1.15 +                          etc [default=yes]
    1.16    --enable-video-x11-xrandr
    1.17                            enable X11 Xrandr extension for fullscreen
    1.18                            [default=yes]
    1.19 -  --enable-video-x11-xinput
    1.20 -                          enable X11 XInput extension for manymouse, tablets,
    1.21 -                          etc [default=yes]
    1.22    --enable-video-x11-scrnsaver
    1.23                            enable X11 screensaver extension [default=yes]
    1.24 +  --enable-video-x11-xshape
    1.25 +                          enable X11 XShape support [default=yes]
    1.26 +  --enable-video-x11-vm   use X11 VM extension for fullscreen [default=yes]
    1.27    --enable-video-cocoa    use Cocoa video driver [default=yes]
    1.28    --enable-video-directfb use DirectFB video driver [default=no]
    1.29    --enable-directfb-shared
    1.30 @@ -3770,13 +3769,13 @@
    1.31  else
    1.32    lt_cv_nm_interface="BSD nm"
    1.33    echo "int some_variable = 0;" > conftest.$ac_ext
    1.34 -  (eval echo "\"\$as_me:3773: $ac_compile\"" >&5)
    1.35 +  (eval echo "\"\$as_me:3772: $ac_compile\"" >&5)
    1.36    (eval "$ac_compile" 2>conftest.err)
    1.37    cat conftest.err >&5
    1.38 -  (eval echo "\"\$as_me:3776: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
    1.39 +  (eval echo "\"\$as_me:3775: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
    1.40    (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
    1.41    cat conftest.err >&5
    1.42 -  (eval echo "\"\$as_me:3779: output\"" >&5)
    1.43 +  (eval echo "\"\$as_me:3778: output\"" >&5)
    1.44    cat conftest.out >&5
    1.45    if $GREP 'External.*some_variable' conftest.out > /dev/null; then
    1.46      lt_cv_nm_interface="MS dumpbin"
    1.47 @@ -5003,7 +5002,7 @@
    1.48    ;;
    1.49  *-*-irix6*)
    1.50    # Find out which ABI we are using.
    1.51 -  echo '#line 5006 "configure"' > conftest.$ac_ext
    1.52 +  echo '#line 5005 "configure"' > conftest.$ac_ext
    1.53    if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
    1.54    (eval $ac_compile) 2>&5
    1.55    ac_status=$?
    1.56 @@ -7164,11 +7163,11 @@
    1.57     -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    1.58     -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1.59     -e 's:$: $lt_compiler_flag:'`
    1.60 -   (eval echo "\"\$as_me:7167: $lt_compile\"" >&5)
    1.61 +   (eval echo "\"\$as_me:7166: $lt_compile\"" >&5)
    1.62     (eval "$lt_compile" 2>conftest.err)
    1.63     ac_status=$?
    1.64     cat conftest.err >&5
    1.65 -   echo "$as_me:7171: \$? = $ac_status" >&5
    1.66 +   echo "$as_me:7170: \$? = $ac_status" >&5
    1.67     if (exit $ac_status) && test -s "$ac_outfile"; then
    1.68       # The compiler can only warn and ignore the option if not recognized
    1.69       # So say no if there are warnings other than the usual output.
    1.70 @@ -7503,11 +7502,11 @@
    1.71     -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    1.72     -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1.73     -e 's:$: $lt_compiler_flag:'`
    1.74 -   (eval echo "\"\$as_me:7506: $lt_compile\"" >&5)
    1.75 +   (eval echo "\"\$as_me:7505: $lt_compile\"" >&5)
    1.76     (eval "$lt_compile" 2>conftest.err)
    1.77     ac_status=$?
    1.78     cat conftest.err >&5
    1.79 -   echo "$as_me:7510: \$? = $ac_status" >&5
    1.80 +   echo "$as_me:7509: \$? = $ac_status" >&5
    1.81     if (exit $ac_status) && test -s "$ac_outfile"; then
    1.82       # The compiler can only warn and ignore the option if not recognized
    1.83       # So say no if there are warnings other than the usual output.
    1.84 @@ -7608,11 +7607,11 @@
    1.85     -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    1.86     -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1.87     -e 's:$: $lt_compiler_flag:'`
    1.88 -   (eval echo "\"\$as_me:7611: $lt_compile\"" >&5)
    1.89 +   (eval echo "\"\$as_me:7610: $lt_compile\"" >&5)
    1.90     (eval "$lt_compile" 2>out/conftest.err)
    1.91     ac_status=$?
    1.92     cat out/conftest.err >&5
    1.93 -   echo "$as_me:7615: \$? = $ac_status" >&5
    1.94 +   echo "$as_me:7614: \$? = $ac_status" >&5
    1.95     if (exit $ac_status) && test -s out/conftest2.$ac_objext
    1.96     then
    1.97       # The compiler can only warn and ignore the option if not recognized
    1.98 @@ -7663,11 +7662,11 @@
    1.99     -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
   1.100     -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
   1.101     -e 's:$: $lt_compiler_flag:'`
   1.102 -   (eval echo "\"\$as_me:7666: $lt_compile\"" >&5)
   1.103 +   (eval echo "\"\$as_me:7665: $lt_compile\"" >&5)
   1.104     (eval "$lt_compile" 2>out/conftest.err)
   1.105     ac_status=$?
   1.106     cat out/conftest.err >&5
   1.107 -   echo "$as_me:7670: \$? = $ac_status" >&5
   1.108 +   echo "$as_me:7669: \$? = $ac_status" >&5
   1.109     if (exit $ac_status) && test -s out/conftest2.$ac_objext
   1.110     then
   1.111       # The compiler can only warn and ignore the option if not recognized
   1.112 @@ -10421,7 +10420,7 @@
   1.113    lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   1.114    lt_status=$lt_dlunknown
   1.115    cat > conftest.$ac_ext <<_LT_EOF
   1.116 -#line 10424 "configure"
   1.117 +#line 10423 "configure"
   1.118  #include "confdefs.h"
   1.119  
   1.120  #if HAVE_DLFCN_H
   1.121 @@ -10517,7 +10516,7 @@
   1.122    lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   1.123    lt_status=$lt_dlunknown
   1.124    cat > conftest.$ac_ext <<_LT_EOF
   1.125 -#line 10520 "configure"
   1.126 +#line 10519 "configure"
   1.127  #include "confdefs.h"
   1.128  
   1.129  #if HAVE_DLFCN_H
   1.130 @@ -14199,11 +14198,11 @@
   1.131     -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
   1.132     -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
   1.133     -e 's:$: $lt_compiler_flag:'`
   1.134 -   (eval echo "\"\$as_me:14202: $lt_compile\"" >&5)
   1.135 +   (eval echo "\"\$as_me:14201: $lt_compile\"" >&5)
   1.136     (eval "$lt_compile" 2>conftest.err)
   1.137     ac_status=$?
   1.138     cat conftest.err >&5
   1.139 -   echo "$as_me:14206: \$? = $ac_status" >&5
   1.140 +   echo "$as_me:14205: \$? = $ac_status" >&5
   1.141     if (exit $ac_status) && test -s "$ac_outfile"; then
   1.142       # The compiler can only warn and ignore the option if not recognized
   1.143       # So say no if there are warnings other than the usual output.
   1.144 @@ -14298,11 +14297,11 @@
   1.145     -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
   1.146     -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
   1.147     -e 's:$: $lt_compiler_flag:'`
   1.148 -   (eval echo "\"\$as_me:14301: $lt_compile\"" >&5)
   1.149 +   (eval echo "\"\$as_me:14300: $lt_compile\"" >&5)
   1.150     (eval "$lt_compile" 2>out/conftest.err)
   1.151     ac_status=$?
   1.152     cat out/conftest.err >&5
   1.153 -   echo "$as_me:14305: \$? = $ac_status" >&5
   1.154 +   echo "$as_me:14304: \$? = $ac_status" >&5
   1.155     if (exit $ac_status) && test -s out/conftest2.$ac_objext
   1.156     then
   1.157       # The compiler can only warn and ignore the option if not recognized
   1.158 @@ -14350,11 +14349,11 @@
   1.159     -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
   1.160     -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
   1.161     -e 's:$: $lt_compiler_flag:'`
   1.162 -   (eval echo "\"\$as_me:14353: $lt_compile\"" >&5)
   1.163 +   (eval echo "\"\$as_me:14352: $lt_compile\"" >&5)
   1.164     (eval "$lt_compile" 2>out/conftest.err)
   1.165     ac_status=$?
   1.166     cat out/conftest.err >&5
   1.167 -   echo "$as_me:14357: \$? = $ac_status" >&5
   1.168 +   echo "$as_me:14356: \$? = $ac_status" >&5
   1.169     if (exit $ac_status) && test -s out/conftest2.$ac_objext
   1.170     then
   1.171       # The compiler can only warn and ignore the option if not recognized
   1.172 @@ -24086,12 +24085,12 @@
   1.173                      x11_symbols_private=yes
   1.174                      x11_lib='/usr/X11R6/lib/libX11.6.dylib'
   1.175                      x11ext_lib='/usr/X11R6/lib/libXext.6.dylib'
   1.176 +                    xinerama_lib='/usr/X11R6/lib/libXinerama.1.dylib'
   1.177 +                    xinput_lib='/usr/X11R6/lib/libXi.6.dylib'
   1.178 +                    xrandr_lib='/usr/X11R6/lib/libXrandr.2.dylib'
   1.179                      xrender_lib='/usr/X11R6/lib/libXrender.1.dylib'
   1.180 -                    xrandr_lib='/usr/X11R6/lib/libXrandr.2.dylib'
   1.181 -                    xinput_lib='/usr/X11R6/lib/libXi.6.dylib'
   1.182 -                    xss_lib='/usr/X11R6/lib/libXss.6.dylib'
   1.183 -                    xdamage_lib='/usr/X11R6/lib/libXdamage.1.dylib'
   1.184 -                    xfixes_lib='/usr/X11R6/lib/libXfixes.3.dylib'
   1.185 +                    xss_lib='/usr/X11R6/lib/libXss.1.dylib'
   1.186 +                    xvidmode_lib='/usr/X11R6/lib/libXxf86vm.1.dylib'
   1.187                      ;;
   1.188                  *-*-osf*)
   1.189                      x11_lib='libX11.so'
   1.190 @@ -24104,12 +24103,12 @@
   1.191                  *)
   1.192                      x11_lib=`find_lib "libX11.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`
   1.193                      x11ext_lib=`find_lib "libXext.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`
   1.194 +                    xinerama_lib=`find_lib "libXinerama.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`
   1.195 +                    xinput_lib=`find_lib "libXi.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`
   1.196 +                    xrandr_lib=`find_lib "libXrandr.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`
   1.197                      xrender_lib=`find_lib "libXrender.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`
   1.198 -                    xrandr_lib=`find_lib "libXrandr.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`
   1.199 -                    xinput_lib=`find_lib "libXi.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`
   1.200                      xss_lib=`find_lib "libXss.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`
   1.201 -                    xdamage_lib=`find_lib "libXdamage.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`
   1.202 -                    xfixes_lib=`find_lib "libXfixes.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`
   1.203 +                    xvidmode_lib=`find_lib "libXxf86vm.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`
   1.204                      ;;
   1.205              esac
   1.206  
   1.207 @@ -24160,34 +24159,6 @@
   1.208              fi
   1.209              have_video=yes
   1.210  
   1.211 -            # Check whether --enable-video-x11-vm was given.
   1.212 -if test "${enable_video_x11_vm+set}" = set; then
   1.213 -  enableval=$enable_video_x11_vm;
   1.214 -else
   1.215 -  enable_video_x11_vm=yes
   1.216 -fi
   1.217 -
   1.218 -            if test x$enable_video_x11_vm = xyes; then
   1.219 -                cat >>confdefs.h <<\_ACEOF
   1.220 -#define SDL_VIDEO_DRIVER_X11_VIDMODE 1
   1.221 -_ACEOF
   1.222 -
   1.223 -                SOURCES="$SOURCES $srcdir/src/video/Xext/Xxf86vm/*.c"
   1.224 -            fi
   1.225 -            # Check whether --enable-video-x11-xv was given.
   1.226 -if test "${enable_video_x11_xv+set}" = set; then
   1.227 -  enableval=$enable_video_x11_xv;
   1.228 -else
   1.229 -  enable_video_x11_xv=yes
   1.230 -fi
   1.231 -
   1.232 -            if test x$enable_video_x11_xv = xyes; then
   1.233 -                cat >>confdefs.h <<\_ACEOF
   1.234 -#define SDL_VIDEO_DRIVER_X11_XV 1
   1.235 -_ACEOF
   1.236 -
   1.237 -                SOURCES="$SOURCES $srcdir/src/video/Xext/Xv/*.c"
   1.238 -            fi
   1.239              # Check whether --enable-video-x11-xinerama was given.
   1.240  if test "${enable_video_x11_xinerama+set}" = set; then
   1.241    enableval=$enable_video_x11_xinerama;
   1.242 @@ -24196,23 +24167,158 @@
   1.243  fi
   1.244  
   1.245              if test x$enable_video_x11_xinerama = xyes; then
   1.246 +                definitely_enable_video_x11_xinerama=no
   1.247 +                { echo "$as_me:$LINENO: checking for X11/extensions/Xinerama.h" >&5
   1.248 +echo $ECHO_N "checking for X11/extensions/Xinerama.h... $ECHO_C" >&6; }
   1.249 +if test "${ac_cv_header_X11_extensions_Xinerama_h+set}" = set; then
   1.250 +  echo $ECHO_N "(cached) $ECHO_C" >&6
   1.251 +else
   1.252 +  cat >conftest.$ac_ext <<_ACEOF
   1.253 +/* confdefs.h.  */
   1.254 +_ACEOF
   1.255 +cat confdefs.h >>conftest.$ac_ext
   1.256 +cat >>conftest.$ac_ext <<_ACEOF
   1.257 +/* end confdefs.h.  */
   1.258 +#include <X11/Xlib.h>
   1.259 +
   1.260 +
   1.261 +#include <X11/extensions/Xinerama.h>
   1.262 +_ACEOF
   1.263 +rm -f conftest.$ac_objext
   1.264 +if { (ac_try="$ac_compile"
   1.265 +case "(($ac_try" in
   1.266 +  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   1.267 +  *) ac_try_echo=$ac_try;;
   1.268 +esac
   1.269 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   1.270 +  (eval "$ac_compile") 2>conftest.er1
   1.271 +  ac_status=$?
   1.272 +  grep -v '^ *+' conftest.er1 >conftest.err
   1.273 +  rm -f conftest.er1
   1.274 +  cat conftest.err >&5
   1.275 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   1.276 +  (exit $ac_status); } && {
   1.277 +	 test -z "$ac_c_werror_flag" ||
   1.278 +	 test ! -s conftest.err
   1.279 +       } && test -s conftest.$ac_objext; then
   1.280 +  ac_cv_header_X11_extensions_Xinerama_h=yes
   1.281 +else
   1.282 +  echo "$as_me: failed program was:" >&5
   1.283 +sed 's/^/| /' conftest.$ac_ext >&5
   1.284 +
   1.285 +	ac_cv_header_X11_extensions_Xinerama_h=no
   1.286 +fi
   1.287 +
   1.288 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   1.289 +fi
   1.290 +{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xinerama_h" >&5
   1.291 +echo "${ECHO_T}$ac_cv_header_X11_extensions_Xinerama_h" >&6; }
   1.292 +if test $ac_cv_header_X11_extensions_Xinerama_h = yes; then
   1.293 +  have_xinerama_h_hdr=yes
   1.294 +else
   1.295 +  have_xinerama_h_hdr=no
   1.296 +fi
   1.297 +
   1.298 +
   1.299 +                if test x$have_xinerama_h_hdr = xyes; then
   1.300 +                    if test x$enable_x11_shared = xyes && test x$xinerama_lib != x ; then
   1.301 +                        echo "-- dynamic libXinerama -> $xinerama_lib"
   1.302 +                        cat >>confdefs.h <<_ACEOF
   1.303 +#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA "$xinerama_lib"
   1.304 +_ACEOF
   1.305 +
   1.306 +                        definitely_enable_video_x11_xinerama=yes
   1.307 +                    else
   1.308 +                        { echo "$as_me:$LINENO: checking for XineramaQueryExtension in -lXinerama" >&5
   1.309 +echo $ECHO_N "checking for XineramaQueryExtension in -lXinerama... $ECHO_C" >&6; }
   1.310 +if test "${ac_cv_lib_Xinerama_XineramaQueryExtension+set}" = set; then
   1.311 +  echo $ECHO_N "(cached) $ECHO_C" >&6
   1.312 +else
   1.313 +  ac_check_lib_save_LIBS=$LIBS
   1.314 +LIBS="-lXinerama  $LIBS"
   1.315 +cat >conftest.$ac_ext <<_ACEOF
   1.316 +/* confdefs.h.  */
   1.317 +_ACEOF
   1.318 +cat confdefs.h >>conftest.$ac_ext
   1.319 +cat >>conftest.$ac_ext <<_ACEOF
   1.320 +/* end confdefs.h.  */
   1.321 +
   1.322 +/* Override any GCC internal prototype to avoid an error.
   1.323 +   Use char because int might match the return type of a GCC
   1.324 +   builtin and then its argument prototype would still apply.  */
   1.325 +#ifdef __cplusplus
   1.326 +extern "C"
   1.327 +#endif
   1.328 +char XineramaQueryExtension ();
   1.329 +int
   1.330 +main ()
   1.331 +{
   1.332 +return XineramaQueryExtension ();
   1.333 +  ;
   1.334 +  return 0;
   1.335 +}
   1.336 +_ACEOF
   1.337 +rm -f conftest.$ac_objext conftest$ac_exeext
   1.338 +if { (ac_try="$ac_link"
   1.339 +case "(($ac_try" in
   1.340 +  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   1.341 +  *) ac_try_echo=$ac_try;;
   1.342 +esac
   1.343 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   1.344 +  (eval "$ac_link") 2>conftest.er1
   1.345 +  ac_status=$?
   1.346 +  grep -v '^ *+' conftest.er1 >conftest.err
   1.347 +  rm -f conftest.er1
   1.348 +  cat conftest.err >&5
   1.349 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   1.350 +  (exit $ac_status); } && {
   1.351 +	 test -z "$ac_c_werror_flag" ||
   1.352 +	 test ! -s conftest.err
   1.353 +       } && test -s conftest$ac_exeext &&
   1.354 +       $as_test_x conftest$ac_exeext; then
   1.355 +  ac_cv_lib_Xinerama_XineramaQueryExtension=yes
   1.356 +else
   1.357 +  echo "$as_me: failed program was:" >&5
   1.358 +sed 's/^/| /' conftest.$ac_ext >&5
   1.359 +
   1.360 +	ac_cv_lib_Xinerama_XineramaQueryExtension=no
   1.361 +fi
   1.362 +
   1.363 +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
   1.364 +      conftest$ac_exeext conftest.$ac_ext
   1.365 +LIBS=$ac_check_lib_save_LIBS
   1.366 +fi
   1.367 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xinerama_XineramaQueryExtension" >&5
   1.368 +echo "${ECHO_T}$ac_cv_lib_Xinerama_XineramaQueryExtension" >&6; }
   1.369 +if test $ac_cv_lib_Xinerama_XineramaQueryExtension = yes; then
   1.370 +  have_xinerama_lib=yes
   1.371 +fi
   1.372 +
   1.373 +                        if test x$have_xinerama_lib = xyes ; then
   1.374 +                            EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lXinerama"
   1.375 +                            definitely_enable_video_x11_xinerama=yes
   1.376 +                        fi
   1.377 +                    fi
   1.378 +                fi
   1.379 +            fi
   1.380 +            if test x$definitely_enable_video_x11_xinerama = xyes; then
   1.381                  cat >>confdefs.h <<\_ACEOF
   1.382  #define SDL_VIDEO_DRIVER_X11_XINERAMA 1
   1.383  _ACEOF
   1.384  
   1.385 -                SOURCES="$SOURCES $srcdir/src/video/Xext/Xinerama/*.c"
   1.386 -            fi
   1.387 -            # Check whether --enable-video-x11-xshape was given.
   1.388 -if test "${enable_video_x11_xshape+set}" = set; then
   1.389 -  enableval=$enable_video_x11_xshape;
   1.390 -else
   1.391 -  enable_video_x11_xshape=yes
   1.392 -fi
   1.393 -
   1.394 -            if test x$enable_video_x11_xshape = xyes; then
   1.395 -                { echo "$as_me:$LINENO: checking for X11/extensions/shape.h" >&5
   1.396 -echo $ECHO_N "checking for X11/extensions/shape.h... $ECHO_C" >&6; }
   1.397 -if test "${ac_cv_header_X11_extensions_shape_h+set}" = set; then
   1.398 +            fi
   1.399 +            # Check whether --enable-video-x11-xinput was given.
   1.400 +if test "${enable_video_x11_xinput+set}" = set; then
   1.401 +  enableval=$enable_video_x11_xinput;
   1.402 +else
   1.403 +  enable_video_x11_xinput=yes
   1.404 +fi
   1.405 +
   1.406 +            if test x$enable_video_x11_xinput = xyes; then
   1.407 +                definitely_enable_video_x11_xinput=no
   1.408 +                { echo "$as_me:$LINENO: checking for X11/extensions/XInput.h" >&5
   1.409 +echo $ECHO_N "checking for X11/extensions/XInput.h... $ECHO_C" >&6; }
   1.410 +if test "${ac_cv_header_X11_extensions_XInput_h+set}" = set; then
   1.411    echo $ECHO_N "(cached) $ECHO_C" >&6
   1.412  else
   1.413    cat >conftest.$ac_ext <<_ACEOF
   1.414 @@ -24224,51 +24330,131 @@
   1.415  #include <X11/Xlib.h>
   1.416  
   1.417  
   1.418 -#include <X11/extensions/shape.h>
   1.419 -_ACEOF
   1.420 -rm -f conftest.$ac_objext
   1.421 -if { (ac_try="$ac_compile"
   1.422 -case "(($ac_try" in
   1.423 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   1.424 -  *) ac_try_echo=$ac_try;;
   1.425 -esac
   1.426 -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   1.427 -  (eval "$ac_compile") 2>conftest.er1
   1.428 -  ac_status=$?
   1.429 -  grep -v '^ *+' conftest.er1 >conftest.err
   1.430 -  rm -f conftest.er1
   1.431 -  cat conftest.err >&5
   1.432 -  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   1.433 -  (exit $ac_status); } && {
   1.434 -	 test -z "$ac_c_werror_flag" ||
   1.435 -	 test ! -s conftest.err
   1.436 -       } && test -s conftest.$ac_objext; then
   1.437 -  ac_cv_header_X11_extensions_shape_h=yes
   1.438 -else
   1.439 -  echo "$as_me: failed program was:" >&5
   1.440 -sed 's/^/| /' conftest.$ac_ext >&5
   1.441 -
   1.442 -	ac_cv_header_X11_extensions_shape_h=no
   1.443 -fi
   1.444 -
   1.445 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   1.446 -fi
   1.447 -{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_shape_h" >&5
   1.448 -echo "${ECHO_T}$ac_cv_header_X11_extensions_shape_h" >&6; }
   1.449 -if test $ac_cv_header_X11_extensions_shape_h = yes; then
   1.450 -  have_shape_h_hdr=yes
   1.451 -else
   1.452 -  have_shape_h_hdr=no
   1.453 -fi
   1.454 -
   1.455 -
   1.456 -                if test x$have_shape_h_hdr = xyes; then
   1.457 -                    cat >>confdefs.h <<\_ACEOF
   1.458 -#define SDL_VIDEO_DRIVER_X11_XSHAPE 1
   1.459 -_ACEOF
   1.460 -
   1.461 +#include <X11/extensions/XInput.h>
   1.462 +_ACEOF
   1.463 +rm -f conftest.$ac_objext
   1.464 +if { (ac_try="$ac_compile"
   1.465 +case "(($ac_try" in
   1.466 +  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   1.467 +  *) ac_try_echo=$ac_try;;
   1.468 +esac
   1.469 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   1.470 +  (eval "$ac_compile") 2>conftest.er1
   1.471 +  ac_status=$?
   1.472 +  grep -v '^ *+' conftest.er1 >conftest.err
   1.473 +  rm -f conftest.er1
   1.474 +  cat conftest.err >&5
   1.475 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   1.476 +  (exit $ac_status); } && {
   1.477 +	 test -z "$ac_c_werror_flag" ||
   1.478 +	 test ! -s conftest.err
   1.479 +       } && test -s conftest.$ac_objext; then
   1.480 +  ac_cv_header_X11_extensions_XInput_h=yes
   1.481 +else
   1.482 +  echo "$as_me: failed program was:" >&5
   1.483 +sed 's/^/| /' conftest.$ac_ext >&5
   1.484 +
   1.485 +	ac_cv_header_X11_extensions_XInput_h=no
   1.486 +fi
   1.487 +
   1.488 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   1.489 +fi
   1.490 +{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XInput_h" >&5
   1.491 +echo "${ECHO_T}$ac_cv_header_X11_extensions_XInput_h" >&6; }
   1.492 +if test $ac_cv_header_X11_extensions_XInput_h = yes; then
   1.493 +  have_xinput_h_hdr=yes
   1.494 +else
   1.495 +  have_xinput_h_hdr=no
   1.496 +fi
   1.497 +
   1.498 +
   1.499 +                if test x$have_xinput_h_hdr = xyes; then
   1.500 +                    if test x$enable_x11_shared = xyes && test x$xinput_lib != x ; then
   1.501 +                        echo "-- dynamic libXi -> $xinput_lib"
   1.502 +                        cat >>confdefs.h <<_ACEOF
   1.503 +#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT "$xinput_lib"
   1.504 +_ACEOF
   1.505 +
   1.506 +                        definitely_enable_video_x11_xinput=yes
   1.507 +                    else
   1.508 +                        { echo "$as_me:$LINENO: checking for XOpenDevice in -lXi" >&5
   1.509 +echo $ECHO_N "checking for XOpenDevice in -lXi... $ECHO_C" >&6; }
   1.510 +if test "${ac_cv_lib_Xi_XOpenDevice+set}" = set; then
   1.511 +  echo $ECHO_N "(cached) $ECHO_C" >&6
   1.512 +else
   1.513 +  ac_check_lib_save_LIBS=$LIBS
   1.514 +LIBS="-lXi  $LIBS"
   1.515 +cat >conftest.$ac_ext <<_ACEOF
   1.516 +/* confdefs.h.  */
   1.517 +_ACEOF
   1.518 +cat confdefs.h >>conftest.$ac_ext
   1.519 +cat >>conftest.$ac_ext <<_ACEOF
   1.520 +/* end confdefs.h.  */
   1.521 +
   1.522 +/* Override any GCC internal prototype to avoid an error.
   1.523 +   Use char because int might match the return type of a GCC
   1.524 +   builtin and then its argument prototype would still apply.  */
   1.525 +#ifdef __cplusplus
   1.526 +extern "C"
   1.527 +#endif
   1.528 +char XOpenDevice ();
   1.529 +int
   1.530 +main ()
   1.531 +{
   1.532 +return XOpenDevice ();
   1.533 +  ;
   1.534 +  return 0;
   1.535 +}
   1.536 +_ACEOF
   1.537 +rm -f conftest.$ac_objext conftest$ac_exeext
   1.538 +if { (ac_try="$ac_link"
   1.539 +case "(($ac_try" in
   1.540 +  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   1.541 +  *) ac_try_echo=$ac_try;;
   1.542 +esac
   1.543 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   1.544 +  (eval "$ac_link") 2>conftest.er1
   1.545 +  ac_status=$?
   1.546 +  grep -v '^ *+' conftest.er1 >conftest.err
   1.547 +  rm -f conftest.er1
   1.548 +  cat conftest.err >&5
   1.549 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   1.550 +  (exit $ac_status); } && {
   1.551 +	 test -z "$ac_c_werror_flag" ||
   1.552 +	 test ! -s conftest.err
   1.553 +       } && test -s conftest$ac_exeext &&
   1.554 +       $as_test_x conftest$ac_exeext; then
   1.555 +  ac_cv_lib_Xi_XOpenDevice=yes
   1.556 +else
   1.557 +  echo "$as_me: failed program was:" >&5
   1.558 +sed 's/^/| /' conftest.$ac_ext >&5
   1.559 +
   1.560 +	ac_cv_lib_Xi_XOpenDevice=no
   1.561 +fi
   1.562 +
   1.563 +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
   1.564 +      conftest$ac_exeext conftest.$ac_ext
   1.565 +LIBS=$ac_check_lib_save_LIBS
   1.566 +fi
   1.567 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xi_XOpenDevice" >&5
   1.568 +echo "${ECHO_T}$ac_cv_lib_Xi_XOpenDevice" >&6; }
   1.569 +if test $ac_cv_lib_Xi_XOpenDevice = yes; then
   1.570 +  have_xinput_lib=yes
   1.571 +fi
   1.572 +
   1.573 +                        if test x$have_xinput_lib = xyes ; then
   1.574 +                            EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lXi"
   1.575 +                            definitely_enable_video_x11_xinput=yes
   1.576 +                        fi
   1.577 +                    fi
   1.578                  fi
   1.579              fi
   1.580 +            if test x$definitely_enable_video_x11_xinput = xyes; then
   1.581 +                cat >>confdefs.h <<\_ACEOF
   1.582 +#define SDL_VIDEO_DRIVER_X11_XINPUT 1
   1.583 +_ACEOF
   1.584 +
   1.585 +            fi
   1.586              # Check whether --enable-video-x11-xrandr was given.
   1.587  if test "${enable_video_x11_xrandr+set}" = set; then
   1.588    enableval=$enable_video_x11_xrandr;
   1.589 @@ -24417,154 +24603,6 @@
   1.590  _ACEOF
   1.591  
   1.592              fi
   1.593 -            # Check whether --enable-video-x11-xinput was given.
   1.594 -if test "${enable_video_x11_xinput+set}" = set; then
   1.595 -  enableval=$enable_video_x11_xinput;
   1.596 -else
   1.597 -  enable_video_x11_xinput=yes
   1.598 -fi
   1.599 -
   1.600 -            if test x$enable_video_x11_xinput = xyes; then
   1.601 -                definitely_enable_video_x11_xinput=no
   1.602 -                { echo "$as_me:$LINENO: checking for X11/extensions/XInput.h" >&5
   1.603 -echo $ECHO_N "checking for X11/extensions/XInput.h... $ECHO_C" >&6; }
   1.604 -if test "${ac_cv_header_X11_extensions_XInput_h+set}" = set; then
   1.605 -  echo $ECHO_N "(cached) $ECHO_C" >&6
   1.606 -else
   1.607 -  cat >conftest.$ac_ext <<_ACEOF
   1.608 -/* confdefs.h.  */
   1.609 -_ACEOF
   1.610 -cat confdefs.h >>conftest.$ac_ext
   1.611 -cat >>conftest.$ac_ext <<_ACEOF
   1.612 -/* end confdefs.h.  */
   1.613 -#include <X11/Xlib.h>
   1.614 -
   1.615 -
   1.616 -#include <X11/extensions/XInput.h>
   1.617 -_ACEOF
   1.618 -rm -f conftest.$ac_objext
   1.619 -if { (ac_try="$ac_compile"
   1.620 -case "(($ac_try" in
   1.621 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   1.622 -  *) ac_try_echo=$ac_try;;
   1.623 -esac
   1.624 -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   1.625 -  (eval "$ac_compile") 2>conftest.er1
   1.626 -  ac_status=$?
   1.627 -  grep -v '^ *+' conftest.er1 >conftest.err
   1.628 -  rm -f conftest.er1
   1.629 -  cat conftest.err >&5
   1.630 -  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   1.631 -  (exit $ac_status); } && {
   1.632 -	 test -z "$ac_c_werror_flag" ||
   1.633 -	 test ! -s conftest.err
   1.634 -       } && test -s conftest.$ac_objext; then
   1.635 -  ac_cv_header_X11_extensions_XInput_h=yes
   1.636 -else
   1.637 -  echo "$as_me: failed program was:" >&5
   1.638 -sed 's/^/| /' conftest.$ac_ext >&5
   1.639 -
   1.640 -	ac_cv_header_X11_extensions_XInput_h=no
   1.641 -fi
   1.642 -
   1.643 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   1.644 -fi
   1.645 -{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XInput_h" >&5
   1.646 -echo "${ECHO_T}$ac_cv_header_X11_extensions_XInput_h" >&6; }
   1.647 -if test $ac_cv_header_X11_extensions_XInput_h = yes; then
   1.648 -  have_xinput_h_hdr=yes
   1.649 -else
   1.650 -  have_xinput_h_hdr=no
   1.651 -fi
   1.652 -
   1.653 -
   1.654 -                if test x$have_xinput_h_hdr = xyes; then
   1.655 -                    if test x$enable_x11_shared = xyes && test x$xinput_lib != x ; then
   1.656 -                        echo "-- dynamic libXi -> $xinput_lib"
   1.657 -                        cat >>confdefs.h <<_ACEOF
   1.658 -#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT "$xinput_lib"
   1.659 -_ACEOF
   1.660 -
   1.661 -                        definitely_enable_video_x11_xinput=yes
   1.662 -                    else
   1.663 -                        { echo "$as_me:$LINENO: checking for XOpenDevice in -lXi" >&5
   1.664 -echo $ECHO_N "checking for XOpenDevice in -lXi... $ECHO_C" >&6; }
   1.665 -if test "${ac_cv_lib_Xi_XOpenDevice+set}" = set; then
   1.666 -  echo $ECHO_N "(cached) $ECHO_C" >&6
   1.667 -else
   1.668 -  ac_check_lib_save_LIBS=$LIBS
   1.669 -LIBS="-lXi  $LIBS"
   1.670 -cat >conftest.$ac_ext <<_ACEOF
   1.671 -/* confdefs.h.  */
   1.672 -_ACEOF
   1.673 -cat confdefs.h >>conftest.$ac_ext
   1.674 -cat >>conftest.$ac_ext <<_ACEOF
   1.675 -/* end confdefs.h.  */
   1.676 -
   1.677 -/* Override any GCC internal prototype to avoid an error.
   1.678 -   Use char because int might match the return type of a GCC
   1.679 -   builtin and then its argument prototype would still apply.  */
   1.680 -#ifdef __cplusplus
   1.681 -extern "C"
   1.682 -#endif
   1.683 -char XOpenDevice ();
   1.684 -int
   1.685 -main ()
   1.686 -{
   1.687 -return XOpenDevice ();
   1.688 -  ;
   1.689 -  return 0;
   1.690 -}
   1.691 -_ACEOF
   1.692 -rm -f conftest.$ac_objext conftest$ac_exeext
   1.693 -if { (ac_try="$ac_link"
   1.694 -case "(($ac_try" in
   1.695 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   1.696 -  *) ac_try_echo=$ac_try;;
   1.697 -esac
   1.698 -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   1.699 -  (eval "$ac_link") 2>conftest.er1
   1.700 -  ac_status=$?
   1.701 -  grep -v '^ *+' conftest.er1 >conftest.err
   1.702 -  rm -f conftest.er1
   1.703 -  cat conftest.err >&5
   1.704 -  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   1.705 -  (exit $ac_status); } && {
   1.706 -	 test -z "$ac_c_werror_flag" ||
   1.707 -	 test ! -s conftest.err
   1.708 -       } && test -s conftest$ac_exeext &&
   1.709 -       $as_test_x conftest$ac_exeext; then
   1.710 -  ac_cv_lib_Xi_XOpenDevice=yes
   1.711 -else
   1.712 -  echo "$as_me: failed program was:" >&5
   1.713 -sed 's/^/| /' conftest.$ac_ext >&5
   1.714 -
   1.715 -	ac_cv_lib_Xi_XOpenDevice=no
   1.716 -fi
   1.717 -
   1.718 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
   1.719 -      conftest$ac_exeext conftest.$ac_ext
   1.720 -LIBS=$ac_check_lib_save_LIBS
   1.721 -fi
   1.722 -{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xi_XOpenDevice" >&5
   1.723 -echo "${ECHO_T}$ac_cv_lib_Xi_XOpenDevice" >&6; }
   1.724 -if test $ac_cv_lib_Xi_XOpenDevice = yes; then
   1.725 -  have_xinput_lib=yes
   1.726 -fi
   1.727 -
   1.728 -                        if test x$have_xinput_lib = xyes ; then
   1.729 -                            EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lXi"
   1.730 -                            definitely_enable_video_x11_xinput=yes
   1.731 -                        fi
   1.732 -                    fi
   1.733 -                fi
   1.734 -            fi
   1.735 -            if test x$definitely_enable_video_x11_xinput = xyes; then
   1.736 -                cat >>confdefs.h <<\_ACEOF
   1.737 -#define SDL_VIDEO_DRIVER_X11_XINPUT 1
   1.738 -_ACEOF
   1.739 -
   1.740 -            fi
   1.741              # Check whether --enable-video-x11-scrnsaver was given.
   1.742  if test "${enable_video_x11_scrnsaver+set}" = set; then
   1.743    enableval=$enable_video_x11_scrnsaver;
   1.744 @@ -24708,7 +24746,222 @@
   1.745              fi
   1.746              if test x$definitely_enable_video_x11_scrnsaver = xyes; then
   1.747                  cat >>confdefs.h <<\_ACEOF
   1.748 -#define SDL_VIDEO_DRIVER_X11_SCRNSAVER 1
   1.749 +#define SDL_VIDEO_DRIVER_X11_XSCRNSAVER 1
   1.750 +_ACEOF
   1.751 +
   1.752 +            fi
   1.753 +            # Check whether --enable-video-x11-xshape was given.
   1.754 +if test "${enable_video_x11_xshape+set}" = set; then
   1.755 +  enableval=$enable_video_x11_xshape;
   1.756 +else
   1.757 +  enable_video_x11_xshape=yes
   1.758 +fi
   1.759 +
   1.760 +            if test x$enable_video_x11_xshape = xyes; then
   1.761 +                { echo "$as_me:$LINENO: checking for X11/extensions/shape.h" >&5
   1.762 +echo $ECHO_N "checking for X11/extensions/shape.h... $ECHO_C" >&6; }
   1.763 +if test "${ac_cv_header_X11_extensions_shape_h+set}" = set; then
   1.764 +  echo $ECHO_N "(cached) $ECHO_C" >&6
   1.765 +else
   1.766 +  cat >conftest.$ac_ext <<_ACEOF
   1.767 +/* confdefs.h.  */
   1.768 +_ACEOF
   1.769 +cat confdefs.h >>conftest.$ac_ext
   1.770 +cat >>conftest.$ac_ext <<_ACEOF
   1.771 +/* end confdefs.h.  */
   1.772 +#include <X11/Xlib.h>
   1.773 +
   1.774 +
   1.775 +#include <X11/extensions/shape.h>
   1.776 +_ACEOF
   1.777 +rm -f conftest.$ac_objext
   1.778 +if { (ac_try="$ac_compile"
   1.779 +case "(($ac_try" in
   1.780 +  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   1.781 +  *) ac_try_echo=$ac_try;;
   1.782 +esac
   1.783 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   1.784 +  (eval "$ac_compile") 2>conftest.er1
   1.785 +  ac_status=$?
   1.786 +  grep -v '^ *+' conftest.er1 >conftest.err
   1.787 +  rm -f conftest.er1
   1.788 +  cat conftest.err >&5
   1.789 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   1.790 +  (exit $ac_status); } && {
   1.791 +	 test -z "$ac_c_werror_flag" ||
   1.792 +	 test ! -s conftest.err
   1.793 +       } && test -s conftest.$ac_objext; then
   1.794 +  ac_cv_header_X11_extensions_shape_h=yes
   1.795 +else
   1.796 +  echo "$as_me: failed program was:" >&5
   1.797 +sed 's/^/| /' conftest.$ac_ext >&5
   1.798 +
   1.799 +	ac_cv_header_X11_extensions_shape_h=no
   1.800 +fi
   1.801 +
   1.802 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   1.803 +fi
   1.804 +{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_shape_h" >&5
   1.805 +echo "${ECHO_T}$ac_cv_header_X11_extensions_shape_h" >&6; }
   1.806 +if test $ac_cv_header_X11_extensions_shape_h = yes; then
   1.807 +  have_shape_h_hdr=yes
   1.808 +else
   1.809 +  have_shape_h_hdr=no
   1.810 +fi
   1.811 +
   1.812 +
   1.813 +                if test x$have_shape_h_hdr = xyes; then
   1.814 +                    cat >>confdefs.h <<\_ACEOF
   1.815 +#define SDL_VIDEO_DRIVER_X11_XSHAPE 1
   1.816 +_ACEOF
   1.817 +
   1.818 +                fi
   1.819 +            fi
   1.820 +            # Check whether --enable-video-x11-vm was given.
   1.821 +if test "${enable_video_x11_vm+set}" = set; then
   1.822 +  enableval=$enable_video_x11_vm;
   1.823 +else
   1.824 +  enable_video_x11_vm=yes
   1.825 +fi
   1.826 +
   1.827 +            if test x$enable_video_x11_vm = xyes; then
   1.828 +                definitely_enable_video_x11_vm=no
   1.829 +                { echo "$as_me:$LINENO: checking for X11/extensions/xf86vmode.h" >&5
   1.830 +echo $ECHO_N "checking for X11/extensions/xf86vmode.h... $ECHO_C" >&6; }
   1.831 +if test "${ac_cv_header_X11_extensions_xf86vmode_h+set}" = set; then
   1.832 +  echo $ECHO_N "(cached) $ECHO_C" >&6
   1.833 +else
   1.834 +  cat >conftest.$ac_ext <<_ACEOF
   1.835 +/* confdefs.h.  */
   1.836 +_ACEOF
   1.837 +cat confdefs.h >>conftest.$ac_ext
   1.838 +cat >>conftest.$ac_ext <<_ACEOF
   1.839 +/* end confdefs.h.  */
   1.840 +#include <X11/Xlib.h>
   1.841 +
   1.842 +
   1.843 +#include <X11/extensions/xf86vmode.h>
   1.844 +_ACEOF
   1.845 +rm -f conftest.$ac_objext
   1.846 +if { (ac_try="$ac_compile"
   1.847 +case "(($ac_try" in
   1.848 +  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   1.849 +  *) ac_try_echo=$ac_try;;
   1.850 +esac
   1.851 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   1.852 +  (eval "$ac_compile") 2>conftest.er1
   1.853 +  ac_status=$?
   1.854 +  grep -v '^ *+' conftest.er1 >conftest.err
   1.855 +  rm -f conftest.er1
   1.856 +  cat conftest.err >&5
   1.857 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   1.858 +  (exit $ac_status); } && {
   1.859 +	 test -z "$ac_c_werror_flag" ||
   1.860 +	 test ! -s conftest.err
   1.861 +       } && test -s conftest.$ac_objext; then
   1.862 +  ac_cv_header_X11_extensions_xf86vmode_h=yes
   1.863 +else
   1.864 +  echo "$as_me: failed program was:" >&5
   1.865 +sed 's/^/| /' conftest.$ac_ext >&5
   1.866 +
   1.867 +	ac_cv_header_X11_extensions_xf86vmode_h=no
   1.868 +fi
   1.869 +
   1.870 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   1.871 +fi
   1.872 +{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xf86vmode_h" >&5
   1.873 +echo "${ECHO_T}$ac_cv_header_X11_extensions_xf86vmode_h" >&6; }
   1.874 +if test $ac_cv_header_X11_extensions_xf86vmode_h = yes; then
   1.875 +  have_vm_h_hdr=yes
   1.876 +else
   1.877 +  have_vm_h_hdr=no
   1.878 +fi
   1.879 +
   1.880 +
   1.881 +                if test x$have_vm_h_hdr = xyes; then
   1.882 +                    if test x$enable_x11_shared = xyes && test x$xvidmode_lib != x ; then
   1.883 +                        echo "-- dynamic libXxf86vm -> $xvidmode_lib"
   1.884 +                        cat >>confdefs.h <<_ACEOF
   1.885 +#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE "$xvidmode_lib"
   1.886 +_ACEOF
   1.887 +
   1.888 +                        definitely_enable_video_x11_vm=yes
   1.889 +                    else
   1.890 +                        { echo "$as_me:$LINENO: checking for XF86VidModeQueryVersion in -lXxf86vm" >&5
   1.891 +echo $ECHO_N "checking for XF86VidModeQueryVersion in -lXxf86vm... $ECHO_C" >&6; }
   1.892 +if test "${ac_cv_lib_Xxf86vm_XF86VidModeQueryVersion+set}" = set; then
   1.893 +  echo $ECHO_N "(cached) $ECHO_C" >&6
   1.894 +else
   1.895 +  ac_check_lib_save_LIBS=$LIBS
   1.896 +LIBS="-lXxf86vm  $LIBS"
   1.897 +cat >conftest.$ac_ext <<_ACEOF
   1.898 +/* confdefs.h.  */
   1.899 +_ACEOF
   1.900 +cat confdefs.h >>conftest.$ac_ext
   1.901 +cat >>conftest.$ac_ext <<_ACEOF
   1.902 +/* end confdefs.h.  */
   1.903 +
   1.904 +/* Override any GCC internal prototype to avoid an error.
   1.905 +   Use char because int might match the return type of a GCC
   1.906 +   builtin and then its argument prototype would still apply.  */
   1.907 +#ifdef __cplusplus
   1.908 +extern "C"
   1.909 +#endif
   1.910 +char XF86VidModeQueryVersion ();
   1.911 +int
   1.912 +main ()
   1.913 +{
   1.914 +return XF86VidModeQueryVersion ();
   1.915 +  ;
   1.916 +  return 0;
   1.917 +}
   1.918 +_ACEOF
   1.919 +rm -f conftest.$ac_objext conftest$ac_exeext
   1.920 +if { (ac_try="$ac_link"
   1.921 +case "(($ac_try" in
   1.922 +  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   1.923 +  *) ac_try_echo=$ac_try;;
   1.924 +esac
   1.925 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   1.926 +  (eval "$ac_link") 2>conftest.er1
   1.927 +  ac_status=$?
   1.928 +  grep -v '^ *+' conftest.er1 >conftest.err
   1.929 +  rm -f conftest.er1
   1.930 +  cat conftest.err >&5
   1.931 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   1.932 +  (exit $ac_status); } && {
   1.933 +	 test -z "$ac_c_werror_flag" ||
   1.934 +	 test ! -s conftest.err
   1.935 +       } && test -s conftest$ac_exeext &&
   1.936 +       $as_test_x conftest$ac_exeext; then
   1.937 +  ac_cv_lib_Xxf86vm_XF86VidModeQueryVersion=yes
   1.938 +else
   1.939 +  echo "$as_me: failed program was:" >&5
   1.940 +sed 's/^/| /' conftest.$ac_ext >&5
   1.941 +
   1.942 +	ac_cv_lib_Xxf86vm_XF86VidModeQueryVersion=no
   1.943 +fi
   1.944 +
   1.945 +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
   1.946 +      conftest$ac_exeext conftest.$ac_ext
   1.947 +LIBS=$ac_check_lib_save_LIBS
   1.948 +fi
   1.949 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeQueryVersion" >&5
   1.950 +echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeQueryVersion" >&6; }
   1.951 +if test $ac_cv_lib_Xxf86vm_XF86VidModeQueryVersion = yes; then
   1.952 +  have_vm_lib=yes
   1.953 +fi
   1.954 +
   1.955 +                        if test x$have_vm_lib = xyes ; then
   1.956 +                            EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lXxf86vm"
   1.957 +                            definitely_enable_video_x11_vm=yes
   1.958 +                        fi
   1.959 +                    fi
   1.960 +                fi
   1.961 +            fi
   1.962 +            if test x$definitely_enable_video_x11_vm = xyes; then
   1.963 +                cat >>confdefs.h <<\_ACEOF
   1.964 +#define SDL_VIDEO_DRIVER_X11_XVIDMODE 1
   1.965  _ACEOF
   1.966  
   1.967              fi