configure.in
changeset 5408 35a63789c3f2
parent 5389 24903690f48a
child 5410 12bc832d3fa8
     1.1 --- a/configure.in	Sun Feb 27 22:22:58 2011 -0800
     1.2 +++ b/configure.in	Mon Feb 28 09:01:53 2011 -0800
     1.3 @@ -1095,12 +1095,12 @@
     1.4                      x11_symbols_private=yes
     1.5                      x11_lib='/usr/X11R6/lib/libX11.6.dylib'
     1.6                      x11ext_lib='/usr/X11R6/lib/libXext.6.dylib'
     1.7 -                    xrender_lib='/usr/X11R6/lib/libXrender.1.dylib'
     1.8 -                    xrandr_lib='/usr/X11R6/lib/libXrandr.2.dylib'
     1.9 +                    xinerama_lib='/usr/X11R6/lib/libXinerama.1.dylib'
    1.10                      xinput_lib='/usr/X11R6/lib/libXi.6.dylib'
    1.11 -                    xss_lib='/usr/X11R6/lib/libXss.6.dylib'
    1.12 -                    xdamage_lib='/usr/X11R6/lib/libXdamage.1.dylib'
    1.13 -                    xfixes_lib='/usr/X11R6/lib/libXfixes.3.dylib'
    1.14 +                    xrandr_lib='/usr/X11R6/lib/libXrandr.2.dylib'
    1.15 +                    xrender_lib='/usr/X11R6/lib/libXrender.1.dylib'
    1.16 +                    xss_lib='/usr/X11R6/lib/libXss.1.dylib'
    1.17 +                    xvidmode_lib='/usr/X11R6/lib/libXxf86vm.1.dylib'
    1.18                      ;;
    1.19                  *-*-osf*)
    1.20                      x11_lib='libX11.so'
    1.21 @@ -1113,12 +1113,12 @@
    1.22                  *)
    1.23                      x11_lib=[`find_lib "libX11.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
    1.24                      x11ext_lib=[`find_lib "libXext.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
    1.25 -                    xrender_lib=[`find_lib "libXrender.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
    1.26 -                    xrandr_lib=[`find_lib "libXrandr.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
    1.27 +                    xinerama_lib=[`find_lib "libXinerama.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
    1.28                      xinput_lib=[`find_lib "libXi.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
    1.29 +                    xrandr_lib=[`find_lib "libXrandr.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
    1.30 +                    xrender_lib=[`find_lib "libXrender.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
    1.31                      xss_lib=[`find_lib "libXss.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
    1.32 -                    xdamage_lib=[`find_lib "libXdamage.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
    1.33 -                    xfixes_lib=[`find_lib "libXfixes.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
    1.34 +                    xvidmode_lib=[`find_lib "libXxf86vm.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
    1.35                      ;;
    1.36              esac
    1.37  
    1.38 @@ -1158,40 +1158,60 @@
    1.39              fi
    1.40              have_video=yes
    1.41  
    1.42 -            AC_ARG_ENABLE(video-x11-vm,
    1.43 -AC_HELP_STRING([--enable-video-x11-vm], [use X11 VM extension for fullscreen [[default=yes]]]),
    1.44 -                          , enable_video_x11_vm=yes)
    1.45 -            if test x$enable_video_x11_vm = xyes; then
    1.46 -                AC_DEFINE(SDL_VIDEO_DRIVER_X11_VIDMODE)
    1.47 -                SOURCES="$SOURCES $srcdir/src/video/Xext/Xxf86vm/*.c"
    1.48 -            fi
    1.49 -            AC_ARG_ENABLE(video-x11-xv,
    1.50 -AC_HELP_STRING([--enable-video-x11-xv], [use X11 XvImage extension for video [[default=yes]]]),
    1.51 -                          , enable_video_x11_xv=yes)
    1.52 -            if test x$enable_video_x11_xv = xyes; then
    1.53 -                AC_DEFINE(SDL_VIDEO_DRIVER_X11_XV)
    1.54 -                SOURCES="$SOURCES $srcdir/src/video/Xext/Xv/*.c"
    1.55 -            fi
    1.56              AC_ARG_ENABLE(video-x11-xinerama,
    1.57  AC_HELP_STRING([--enable-video-x11-xinerama], [enable X11 Xinerama support [[default=yes]]]),
    1.58                              , enable_video_x11_xinerama=yes)
    1.59              if test x$enable_video_x11_xinerama = xyes; then
    1.60 -                AC_DEFINE(SDL_VIDEO_DRIVER_X11_XINERAMA)
    1.61 -                SOURCES="$SOURCES $srcdir/src/video/Xext/Xinerama/*.c"
    1.62 -            fi
    1.63 -            AC_ARG_ENABLE(video-x11-xshape,
    1.64 -AC_HELP_STRING([--enable-video-x11-xshape], [enable X11 XShape support [[default=yes]]]),
    1.65 -                            , enable_video_x11_xshape=yes)
    1.66 -            if test x$enable_video_x11_xshape = xyes; then
    1.67 -                AC_CHECK_HEADER(X11/extensions/shape.h,
    1.68 -                                have_shape_h_hdr=yes,
    1.69 -                                have_shape_h_hdr=no,
    1.70 +                definitely_enable_video_x11_xinerama=no
    1.71 +                AC_CHECK_HEADER(X11/extensions/Xinerama.h,
    1.72 +                                have_xinerama_h_hdr=yes,
    1.73 +                                have_xinerama_h_hdr=no,
    1.74                                  [#include <X11/Xlib.h>
    1.75                                  ])
    1.76 -                if test x$have_shape_h_hdr = xyes; then
    1.77 -                    AC_DEFINE(SDL_VIDEO_DRIVER_X11_XSHAPE)
    1.78 +                if test x$have_xinerama_h_hdr = xyes; then
    1.79 +                    if test x$enable_x11_shared = xyes && test x$xinerama_lib != x ; then
    1.80 +                        echo "-- dynamic libXinerama -> $xinerama_lib"
    1.81 +                        AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA, "$xinerama_lib")
    1.82 +                        definitely_enable_video_x11_xinerama=yes
    1.83 +                    else
    1.84 +                        AC_CHECK_LIB(Xinerama, XineramaQueryExtension, have_xinerama_lib=yes)
    1.85 +                        if test x$have_xinerama_lib = xyes ; then
    1.86 +                            EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lXinerama"
    1.87 +                            definitely_enable_video_x11_xinerama=yes
    1.88 +                        fi
    1.89 +                    fi
    1.90                  fi
    1.91              fi
    1.92 +            if test x$definitely_enable_video_x11_xinerama = xyes; then
    1.93 +                AC_DEFINE(SDL_VIDEO_DRIVER_X11_XINERAMA)
    1.94 +            fi
    1.95 +            AC_ARG_ENABLE(video-x11-xinput,
    1.96 +AC_HELP_STRING([--enable-video-x11-xinput], [enable X11 XInput extension for manymouse, tablets, etc [[default=yes]]]),
    1.97 +                            , enable_video_x11_xinput=yes)
    1.98 +            if test x$enable_video_x11_xinput = xyes; then
    1.99 +                definitely_enable_video_x11_xinput=no
   1.100 +                AC_CHECK_HEADER(X11/extensions/XInput.h,
   1.101 +                                have_xinput_h_hdr=yes,
   1.102 +                                have_xinput_h_hdr=no,
   1.103 +                                [#include <X11/Xlib.h>
   1.104 +                                ])
   1.105 +                if test x$have_xinput_h_hdr = xyes; then
   1.106 +                    if test x$enable_x11_shared = xyes && test x$xinput_lib != x ; then
   1.107 +                        echo "-- dynamic libXi -> $xinput_lib"
   1.108 +                        AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT, "$xinput_lib")
   1.109 +                        definitely_enable_video_x11_xinput=yes
   1.110 +                    else
   1.111 +                        AC_CHECK_LIB(Xi, XOpenDevice, have_xinput_lib=yes)
   1.112 +                        if test x$have_xinput_lib = xyes ; then
   1.113 +                            EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lXi"
   1.114 +                            definitely_enable_video_x11_xinput=yes
   1.115 +                        fi
   1.116 +                    fi
   1.117 +                fi
   1.118 +            fi
   1.119 +            if test x$definitely_enable_video_x11_xinput = xyes; then
   1.120 +                AC_DEFINE(SDL_VIDEO_DRIVER_X11_XINPUT)
   1.121 +            fi
   1.122              AC_ARG_ENABLE(video-x11-xrandr,
   1.123  AC_HELP_STRING([--enable-video-x11-xrandr], [enable X11 Xrandr extension for fullscreen [[default=yes]]]),
   1.124                              , enable_video_x11_xrandr=yes)
   1.125 @@ -1219,33 +1239,6 @@
   1.126              if test x$definitely_enable_video_x11_xrandr = xyes; then
   1.127                  AC_DEFINE(SDL_VIDEO_DRIVER_X11_XRANDR)
   1.128              fi
   1.129 -            AC_ARG_ENABLE(video-x11-xinput,
   1.130 -AC_HELP_STRING([--enable-video-x11-xinput], [enable X11 XInput extension for manymouse, tablets, etc [[default=yes]]]),
   1.131 -                            , enable_video_x11_xinput=yes)
   1.132 -            if test x$enable_video_x11_xinput = xyes; then
   1.133 -                definitely_enable_video_x11_xinput=no
   1.134 -                AC_CHECK_HEADER(X11/extensions/XInput.h,
   1.135 -                                have_xinput_h_hdr=yes,
   1.136 -                                have_xinput_h_hdr=no,
   1.137 -                                [#include <X11/Xlib.h>
   1.138 -                                ])
   1.139 -                if test x$have_xinput_h_hdr = xyes; then
   1.140 -                    if test x$enable_x11_shared = xyes && test x$xinput_lib != x ; then
   1.141 -                        echo "-- dynamic libXi -> $xinput_lib"
   1.142 -                        AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT, "$xinput_lib")
   1.143 -                        definitely_enable_video_x11_xinput=yes
   1.144 -                    else
   1.145 -                        AC_CHECK_LIB(Xi, XOpenDevice, have_xinput_lib=yes)
   1.146 -                        if test x$have_xinput_lib = xyes ; then
   1.147 -                            EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lXi"
   1.148 -                            definitely_enable_video_x11_xinput=yes
   1.149 -                        fi
   1.150 -                    fi
   1.151 -                fi
   1.152 -            fi
   1.153 -            if test x$definitely_enable_video_x11_xinput = xyes; then
   1.154 -                AC_DEFINE(SDL_VIDEO_DRIVER_X11_XINPUT)
   1.155 -            fi
   1.156              AC_ARG_ENABLE(video-x11-scrnsaver,
   1.157  AC_HELP_STRING([--enable-video-x11-scrnsaver], [enable X11 screensaver extension [[default=yes]]]),
   1.158                              , enable_video_x11_scrnsaver=yes)
   1.159 @@ -1270,7 +1263,47 @@
   1.160                  fi
   1.161              fi
   1.162              if test x$definitely_enable_video_x11_scrnsaver = xyes; then
   1.163 -                AC_DEFINE(SDL_VIDEO_DRIVER_X11_SCRNSAVER)
   1.164 +                AC_DEFINE(SDL_VIDEO_DRIVER_X11_XSCRNSAVER)
   1.165 +            fi
   1.166 +            AC_ARG_ENABLE(video-x11-xshape,
   1.167 +AC_HELP_STRING([--enable-video-x11-xshape], [enable X11 XShape support [[default=yes]]]),
   1.168 +                            , enable_video_x11_xshape=yes)
   1.169 +            if test x$enable_video_x11_xshape = xyes; then
   1.170 +                AC_CHECK_HEADER(X11/extensions/shape.h,
   1.171 +                                have_shape_h_hdr=yes,
   1.172 +                                have_shape_h_hdr=no,
   1.173 +                                [#include <X11/Xlib.h>
   1.174 +                                ])
   1.175 +                if test x$have_shape_h_hdr = xyes; then
   1.176 +                    AC_DEFINE(SDL_VIDEO_DRIVER_X11_XSHAPE)
   1.177 +                fi
   1.178 +            fi
   1.179 +            AC_ARG_ENABLE(video-x11-vm,
   1.180 +AC_HELP_STRING([--enable-video-x11-vm], [use X11 VM extension for fullscreen [[default=yes]]]),
   1.181 +                            , enable_video_x11_vm=yes)
   1.182 +            if test x$enable_video_x11_vm = xyes; then
   1.183 +                definitely_enable_video_x11_vm=no
   1.184 +                AC_CHECK_HEADER(X11/extensions/xf86vmode.h,
   1.185 +                                have_vm_h_hdr=yes,
   1.186 +                                have_vm_h_hdr=no,
   1.187 +                                [#include <X11/Xlib.h>
   1.188 +                                ])
   1.189 +                if test x$have_vm_h_hdr = xyes; then
   1.190 +                    if test x$enable_x11_shared = xyes && test x$xvidmode_lib != x ; then
   1.191 +                        echo "-- dynamic libXxf86vm -> $xvidmode_lib"
   1.192 +                        AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE, "$xvidmode_lib")
   1.193 +                        definitely_enable_video_x11_vm=yes
   1.194 +                    else
   1.195 +                        AC_CHECK_LIB(Xxf86vm, XF86VidModeQueryVersion, have_vm_lib=yes)
   1.196 +                        if test x$have_vm_lib = xyes ; then
   1.197 +                            EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lXxf86vm"
   1.198 +                            definitely_enable_video_x11_vm=yes
   1.199 +                        fi
   1.200 +                    fi
   1.201 +                fi
   1.202 +            fi
   1.203 +            if test x$definitely_enable_video_x11_vm = xyes; then
   1.204 +                AC_DEFINE(SDL_VIDEO_DRIVER_X11_XVIDMODE)
   1.205              fi
   1.206          fi
   1.207      fi