configure.in
changeset 5408 35a63789c3f2
parent 5389 24903690f48a
child 5410 12bc832d3fa8
--- a/configure.in	Sun Feb 27 22:22:58 2011 -0800
+++ b/configure.in	Mon Feb 28 09:01:53 2011 -0800
@@ -1095,12 +1095,12 @@
                     x11_symbols_private=yes
                     x11_lib='/usr/X11R6/lib/libX11.6.dylib'
                     x11ext_lib='/usr/X11R6/lib/libXext.6.dylib'
-                    xrender_lib='/usr/X11R6/lib/libXrender.1.dylib'
-                    xrandr_lib='/usr/X11R6/lib/libXrandr.2.dylib'
+                    xinerama_lib='/usr/X11R6/lib/libXinerama.1.dylib'
                     xinput_lib='/usr/X11R6/lib/libXi.6.dylib'
-                    xss_lib='/usr/X11R6/lib/libXss.6.dylib'
-                    xdamage_lib='/usr/X11R6/lib/libXdamage.1.dylib'
-                    xfixes_lib='/usr/X11R6/lib/libXfixes.3.dylib'
+                    xrandr_lib='/usr/X11R6/lib/libXrandr.2.dylib'
+                    xrender_lib='/usr/X11R6/lib/libXrender.1.dylib'
+                    xss_lib='/usr/X11R6/lib/libXss.1.dylib'
+                    xvidmode_lib='/usr/X11R6/lib/libXxf86vm.1.dylib'
                     ;;
                 *-*-osf*)
                     x11_lib='libX11.so'
@@ -1113,12 +1113,12 @@
                 *)
                     x11_lib=[`find_lib "libX11.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
                     x11ext_lib=[`find_lib "libXext.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
-                    xrender_lib=[`find_lib "libXrender.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
-                    xrandr_lib=[`find_lib "libXrandr.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
+                    xinerama_lib=[`find_lib "libXinerama.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
                     xinput_lib=[`find_lib "libXi.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
+                    xrandr_lib=[`find_lib "libXrandr.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
+                    xrender_lib=[`find_lib "libXrender.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
                     xss_lib=[`find_lib "libXss.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
-                    xdamage_lib=[`find_lib "libXdamage.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
-                    xfixes_lib=[`find_lib "libXfixes.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
+                    xvidmode_lib=[`find_lib "libXxf86vm.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
                     ;;
             esac
 
@@ -1158,40 +1158,60 @@
             fi
             have_video=yes
 
-            AC_ARG_ENABLE(video-x11-vm,
-AC_HELP_STRING([--enable-video-x11-vm], [use X11 VM extension for fullscreen [[default=yes]]]),
-                          , enable_video_x11_vm=yes)
-            if test x$enable_video_x11_vm = xyes; then
-                AC_DEFINE(SDL_VIDEO_DRIVER_X11_VIDMODE)
-                SOURCES="$SOURCES $srcdir/src/video/Xext/Xxf86vm/*.c"
-            fi
-            AC_ARG_ENABLE(video-x11-xv,
-AC_HELP_STRING([--enable-video-x11-xv], [use X11 XvImage extension for video [[default=yes]]]),
-                          , enable_video_x11_xv=yes)
-            if test x$enable_video_x11_xv = xyes; then
-                AC_DEFINE(SDL_VIDEO_DRIVER_X11_XV)
-                SOURCES="$SOURCES $srcdir/src/video/Xext/Xv/*.c"
-            fi
             AC_ARG_ENABLE(video-x11-xinerama,
 AC_HELP_STRING([--enable-video-x11-xinerama], [enable X11 Xinerama support [[default=yes]]]),
                             , enable_video_x11_xinerama=yes)
             if test x$enable_video_x11_xinerama = xyes; then
-                AC_DEFINE(SDL_VIDEO_DRIVER_X11_XINERAMA)
-                SOURCES="$SOURCES $srcdir/src/video/Xext/Xinerama/*.c"
-            fi
-            AC_ARG_ENABLE(video-x11-xshape,
-AC_HELP_STRING([--enable-video-x11-xshape], [enable X11 XShape support [[default=yes]]]),
-                            , enable_video_x11_xshape=yes)
-            if test x$enable_video_x11_xshape = xyes; then
-                AC_CHECK_HEADER(X11/extensions/shape.h,
-                                have_shape_h_hdr=yes,
-                                have_shape_h_hdr=no,
+                definitely_enable_video_x11_xinerama=no
+                AC_CHECK_HEADER(X11/extensions/Xinerama.h,
+                                have_xinerama_h_hdr=yes,
+                                have_xinerama_h_hdr=no,
                                 [#include <X11/Xlib.h>
                                 ])
-                if test x$have_shape_h_hdr = xyes; then
-                    AC_DEFINE(SDL_VIDEO_DRIVER_X11_XSHAPE)
+                if test x$have_xinerama_h_hdr = xyes; then
+                    if test x$enable_x11_shared = xyes && test x$xinerama_lib != x ; then
+                        echo "-- dynamic libXinerama -> $xinerama_lib"
+                        AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA, "$xinerama_lib")
+                        definitely_enable_video_x11_xinerama=yes
+                    else
+                        AC_CHECK_LIB(Xinerama, XineramaQueryExtension, have_xinerama_lib=yes)
+                        if test x$have_xinerama_lib = xyes ; then
+                            EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lXinerama"
+                            definitely_enable_video_x11_xinerama=yes
+                        fi
+                    fi
                 fi
             fi
+            if test x$definitely_enable_video_x11_xinerama = xyes; then
+                AC_DEFINE(SDL_VIDEO_DRIVER_X11_XINERAMA)
+            fi
+            AC_ARG_ENABLE(video-x11-xinput,
+AC_HELP_STRING([--enable-video-x11-xinput], [enable X11 XInput extension for manymouse, tablets, etc [[default=yes]]]),
+                            , enable_video_x11_xinput=yes)
+            if test x$enable_video_x11_xinput = xyes; then
+                definitely_enable_video_x11_xinput=no
+                AC_CHECK_HEADER(X11/extensions/XInput.h,
+                                have_xinput_h_hdr=yes,
+                                have_xinput_h_hdr=no,
+                                [#include <X11/Xlib.h>
+                                ])
+                if test x$have_xinput_h_hdr = xyes; then
+                    if test x$enable_x11_shared = xyes && test x$xinput_lib != x ; then
+                        echo "-- dynamic libXi -> $xinput_lib"
+                        AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT, "$xinput_lib")
+                        definitely_enable_video_x11_xinput=yes
+                    else
+                        AC_CHECK_LIB(Xi, XOpenDevice, have_xinput_lib=yes)
+                        if test x$have_xinput_lib = xyes ; then
+                            EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lXi"
+                            definitely_enable_video_x11_xinput=yes
+                        fi
+                    fi
+                fi
+            fi
+            if test x$definitely_enable_video_x11_xinput = xyes; then
+                AC_DEFINE(SDL_VIDEO_DRIVER_X11_XINPUT)
+            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)
@@ -1219,33 +1239,6 @@
             if test x$definitely_enable_video_x11_xrandr = xyes; then
                 AC_DEFINE(SDL_VIDEO_DRIVER_X11_XRANDR)
             fi
-            AC_ARG_ENABLE(video-x11-xinput,
-AC_HELP_STRING([--enable-video-x11-xinput], [enable X11 XInput extension for manymouse, tablets, etc [[default=yes]]]),
-                            , enable_video_x11_xinput=yes)
-            if test x$enable_video_x11_xinput = xyes; then
-                definitely_enable_video_x11_xinput=no
-                AC_CHECK_HEADER(X11/extensions/XInput.h,
-                                have_xinput_h_hdr=yes,
-                                have_xinput_h_hdr=no,
-                                [#include <X11/Xlib.h>
-                                ])
-                if test x$have_xinput_h_hdr = xyes; then
-                    if test x$enable_x11_shared = xyes && test x$xinput_lib != x ; then
-                        echo "-- dynamic libXi -> $xinput_lib"
-                        AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT, "$xinput_lib")
-                        definitely_enable_video_x11_xinput=yes
-                    else
-                        AC_CHECK_LIB(Xi, XOpenDevice, have_xinput_lib=yes)
-                        if test x$have_xinput_lib = xyes ; then
-                            EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lXi"
-                            definitely_enable_video_x11_xinput=yes
-                        fi
-                    fi
-                fi
-            fi
-            if test x$definitely_enable_video_x11_xinput = xyes; then
-                AC_DEFINE(SDL_VIDEO_DRIVER_X11_XINPUT)
-            fi
             AC_ARG_ENABLE(video-x11-scrnsaver,
 AC_HELP_STRING([--enable-video-x11-scrnsaver], [enable X11 screensaver extension [[default=yes]]]),
                             , enable_video_x11_scrnsaver=yes)
@@ -1270,7 +1263,47 @@
                 fi
             fi
             if test x$definitely_enable_video_x11_scrnsaver = xyes; then
-                AC_DEFINE(SDL_VIDEO_DRIVER_X11_SCRNSAVER)
+                AC_DEFINE(SDL_VIDEO_DRIVER_X11_XSCRNSAVER)
+            fi
+            AC_ARG_ENABLE(video-x11-xshape,
+AC_HELP_STRING([--enable-video-x11-xshape], [enable X11 XShape support [[default=yes]]]),
+                            , enable_video_x11_xshape=yes)
+            if test x$enable_video_x11_xshape = xyes; then
+                AC_CHECK_HEADER(X11/extensions/shape.h,
+                                have_shape_h_hdr=yes,
+                                have_shape_h_hdr=no,
+                                [#include <X11/Xlib.h>
+                                ])
+                if test x$have_shape_h_hdr = xyes; then
+                    AC_DEFINE(SDL_VIDEO_DRIVER_X11_XSHAPE)
+                fi
+            fi
+            AC_ARG_ENABLE(video-x11-vm,
+AC_HELP_STRING([--enable-video-x11-vm], [use X11 VM extension for fullscreen [[default=yes]]]),
+                            , enable_video_x11_vm=yes)
+            if test x$enable_video_x11_vm = xyes; then
+                definitely_enable_video_x11_vm=no
+                AC_CHECK_HEADER(X11/extensions/xf86vmode.h,
+                                have_vm_h_hdr=yes,
+                                have_vm_h_hdr=no,
+                                [#include <X11/Xlib.h>
+                                ])
+                if test x$have_vm_h_hdr = xyes; then
+                    if test x$enable_x11_shared = xyes && test x$xvidmode_lib != x ; then
+                        echo "-- dynamic libXxf86vm -> $xvidmode_lib"
+                        AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE, "$xvidmode_lib")
+                        definitely_enable_video_x11_vm=yes
+                    else
+                        AC_CHECK_LIB(Xxf86vm, XF86VidModeQueryVersion, have_vm_lib=yes)
+                        if test x$have_vm_lib = xyes ; then
+                            EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lXxf86vm"
+                            definitely_enable_video_x11_vm=yes
+                        fi
+                    fi
+                fi
+            fi
+            if test x$definitely_enable_video_x11_vm = xyes; then
+                AC_DEFINE(SDL_VIDEO_DRIVER_X11_XVIDMODE)
             fi
         fi
     fi