configure.in
changeset 4618 844b5ef4b149
parent 4569 e1664f94f026
parent 4604 d7535d7a40ea
child 4625 1c562caa9123
     1.1 --- a/configure.in	Tue Jul 27 21:31:28 2010 -0700
     1.2 +++ b/configure.in	Wed Jul 28 00:54:23 2010 -0700
     1.3 @@ -1055,6 +1055,8 @@
     1.4                      xrandr_lib=[`find_lib "libXrandr.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
     1.5                      xinput_lib=[`find_lib "libXi.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
     1.6                      xss_lib=[`find_lib "libXss.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
     1.7 +                    xdamage_lib=[`find_lib "libXdamage.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
     1.8 +                    xfixes_lib=[`find_lib "libXfixes.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
     1.9                      ;;
    1.10              esac
    1.11  
    1.12 @@ -1128,16 +1130,13 @@
    1.13                                  ])
    1.14                  if test x$have_xrandr_h_hdr = xyes; then
    1.15                      if test x$enable_x11_shared = xyes && test x$xrandr_lib != x ; then
    1.16 -                        echo "-- dynamic libXrender -> $xrender_lib"
    1.17                          echo "-- dynamic libXrandr -> $xrandr_lib"
    1.18 -                        AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XRENDER, "$xrender_lib")
    1.19                          AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR, "$xrandr_lib")
    1.20                          definitely_enable_video_x11_xrandr=yes
    1.21                      else
    1.22 -                        AC_CHECK_LIB(Xrender, XRenderQueryExtension, have_xrender_lib=yes)
    1.23                          AC_CHECK_LIB(Xrandr, XRRQueryExtension, have_xrandr_lib=yes)
    1.24 -                        if test x$have_xrender_lib = xyes && test x$have_xrandr_lib = xyes ; then
    1.25 -                            EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lXrandr -lXrender"
    1.26 +                        if test x$have_xrandr_lib = xyes ; then
    1.27 +                            EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lXrandr"
    1.28                              definitely_enable_video_x11_xrandr=yes
    1.29                          fi
    1.30                      fi
    1.31 @@ -1199,7 +1198,69 @@
    1.32              if test x$definitely_enable_video_x11_scrnsaver = xyes; then
    1.33                  AC_DEFINE(SDL_VIDEO_DRIVER_X11_SCRNSAVER)
    1.34              fi
    1.35 -
    1.36 +            AC_ARG_ENABLE(video-x11-xrender,
    1.37 +AC_HELP_STRING([--enable-video-x11-xrender], [enable X11 Xrender extension [[default=yes]]]),
    1.38 +                            , enable_video_x11_xrender=yes)
    1.39 +            if test x$enable_video_x11_xrender = xyes; then
    1.40 +                AC_CHECK_HEADER(X11/extensions/Xrender.h,
    1.41 +                                have_xrender_h_hdr=yes,
    1.42 +                                have_xrender_h_hdr=no,
    1.43 +                                [#include <X11/Xlib.h>
    1.44 +                                ])
    1.45 +                if test x$have_xrender_h_hdr = xyes; then
    1.46 +                    if test x$enable_x11_shared = xyes && test x$xrender_lib != x ; then
    1.47 +                        echo "-- dynamic libXrender -> $xrender_lib"
    1.48 +                        AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XRENDER, "$xrender_lib")
    1.49 +                        definitely_enable_video_x11_xrender=yes
    1.50 +                    else
    1.51 +                        AC_CHECK_LIB(Xrender, XRenderQueryExtension, have_xrender_lib=yes)
    1.52 +                        if test x$have_xrender_lib = xyes ; then
    1.53 +                            EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lXrender"
    1.54 +                            definitely_enable_video_x11_xrender=yes
    1.55 +                        fi
    1.56 +                    fi
    1.57 +                fi
    1.58 +            fi
    1.59 +            if test x$definitely_enable_video_x11_xrender = xyes; then
    1.60 +                AC_DEFINE(SDL_VIDEO_DRIVER_X11_XRENDER)
    1.61 +            fi
    1.62 +            AC_ARG_ENABLE(video-x11-xdamage-xfixes,
    1.63 +AC_HELP_STRING([--enable-video-x11-xdamage-xfixes], [enable X11 Xdamage and Xfixes extensions [[default=yes]]]),
    1.64 +                            , enable_video_x11_xdamage=yes)
    1.65 +            if test x$enable_video_x11_xdamage = xyes && test x$definitely_enable_video_x11_xrender = xyes ; then
    1.66 +                AC_CHECK_HEADER(X11/extensions/Xdamage.h,
    1.67 +                                have_xdamage_h_hdr=yes,
    1.68 +                                have_xdamage_h_hdr=no,
    1.69 +                                [#include <X11/Xlib.h>
    1.70 +                                ])
    1.71 +                AC_CHECK_HEADER(X11/extensions/Xfixes.h,
    1.72 +                                have_xfixes_h_hdr=yes,
    1.73 +                                have_xfixes_h_hdr=no,
    1.74 +                                [#include <X11/Xlib.h>
    1.75 +                                ])
    1.76 +                if test x$have_xdamage_h_hdr = xyes && test x$have_xfixes_h_hdr = xyes ; then
    1.77 +                    if test x$enable_x11_shared = xyes && test x$xdamage_lib != x && test x$xfixes_lib != x ; then
    1.78 +                        echo "-- dynamic libXdamage -> $xdamage_lib"
    1.79 +                        echo "-- dynamic libXfixes -> $xfixes_lib"
    1.80 +                        AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XDAMAGE, "$xdamage_lib")
    1.81 +                        AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XFIXES, "$xfixes_lib")
    1.82 +                        definitely_enable_video_x11_xdamage=yes
    1.83 +                        definitely_enable_video_x11_xfixes=yes
    1.84 +                    else
    1.85 +                        AC_CHECK_LIB(Xdamage, XDamageQueryExtension, have_xdamage_lib=yes)
    1.86 +                        AC_CHECK_LIB(Xfixes, XFixesQueryExtension, have_xfixes_lib=yes)
    1.87 +                        if test x$have_xdamage_lib = xyes && test x$have_xfixes_lib = xyes ; then
    1.88 +                            EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lXdamage -lXfixes"
    1.89 +                            definitely_enable_video_x11_xdamage=yes
    1.90 +                            definitely_enable_video_x11_xfixes=yes
    1.91 +                        fi
    1.92 +                    fi
    1.93 +                fi
    1.94 +            fi
    1.95 +            if test x$definitely_enable_video_x11_xdamage = xyes && test x$definitely_enable_video_x11_xfixes = xyes ; then
    1.96 +                AC_DEFINE(SDL_VIDEO_DRIVER_X11_XDAMAGE)
    1.97 +                AC_DEFINE(SDL_VIDEO_DRIVER_X11_XFIXES)
    1.98 +            fi
    1.99              AC_ARG_ENABLE(render-x11,
   1.100  AC_HELP_STRING([--enable-render-x11], [enable the X11 render driver [[default=yes]]]),
   1.101                                  , enable_render_x11=yes)