configure.in
changeset 4604 d7535d7a40ea
parent 4577 87a2d87786d4
child 4618 844b5ef4b149
     1.1 --- a/configure.in	Mon Jul 19 18:57:02 2010 +0530
     1.2 +++ b/configure.in	Mon Jul 19 20:05:53 2010 +0530
     1.3 @@ -1055,7 +1055,9 @@
     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 -                    ;;
     1.8 +                    xdamage_lib=[`find_lib "libXdamage.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
     1.9 +                    xfixes_lib=[`find_lib "libXfixes.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
    1.10 +;;
    1.11              esac
    1.12  
    1.13              if test x$ac_cv_func_shmat != xyes; then
    1.14 @@ -1222,14 +1224,50 @@
    1.15              if test x$definitely_enable_video_x11_xrender = xyes; then
    1.16                  AC_DEFINE(SDL_VIDEO_DRIVER_X11_XRENDER)
    1.17              fi
    1.18 -
    1.19 +            AC_ARG_ENABLE(video-x11-xdamage-xfixes,
    1.20 +AC_HELP_STRING([--enable-video-x11-xdamage-xfixes], [enable X11 Xdamage and Xfixes extensions [[default=yes]]]),
    1.21 +                            , enable_video_x11_xdamage=yes)
    1.22 +            if test x$enable_video_x11_xdamage = xyes && test x$definitely_enable_video_x11_xrender = xyes ; then
    1.23 +                AC_CHECK_HEADER(X11/extensions/Xdamage.h,
    1.24 +                                have_xdamage_h_hdr=yes,
    1.25 +                                have_xdamage_h_hdr=no,
    1.26 +                                [#include <X11/Xlib.h>
    1.27 +                                ])
    1.28 +                AC_CHECK_HEADER(X11/extensions/Xfixes.h,
    1.29 +                                have_xfixes_h_hdr=yes,
    1.30 +                                have_xfixes_h_hdr=no,
    1.31 +                                [#include <X11/Xlib.h>
    1.32 +                                ])
    1.33 +                if test x$have_xdamage_h_hdr = xyes && test x$have_xfixes_h_hdr = xyes ; then
    1.34 +                    if test x$enable_x11_shared = xyes && test x$xdamage_lib != x && test x$xfixes_lib != x ; then
    1.35 +                        echo "-- dynamic libXdamage -> $xdamage_lib"
    1.36 +                        echo "-- dynamic libXfixes -> $xfixes_lib"
    1.37 +                        AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XDAMAGE, "$xdamage_lib")
    1.38 +                        AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XFIXES, "$xfixes_lib")
    1.39 +                        definitely_enable_video_x11_xdamage=yes
    1.40 +                        definitely_enable_video_x11_xfixes=yes
    1.41 +                    else
    1.42 +                        AC_CHECK_LIB(Xdamage, XDamageQueryExtension, have_xdamage_lib=yes)
    1.43 +                        AC_CHECK_LIB(Xfixes, XFixesQueryExtension, have_xfixes_lib=yes)
    1.44 +                        if test x$have_xdamage_lib = xyes && test x$have_xfixes_lib = xyes ; then
    1.45 +                            EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lXdamage -lXfixes"
    1.46 +                            definitely_enable_video_x11_xdamage=yes
    1.47 +                            definitely_enable_video_x11_xfixes=yes
    1.48 +                        fi
    1.49 +                    fi
    1.50 +                fi
    1.51 +            fi
    1.52 +            if test x$definitely_enable_video_x11_xdamage = xyes && test x$definitely_enable_video_x11_xfixes = xyes ; then
    1.53 +                AC_DEFINE(SDL_VIDEO_DRIVER_X11_XDAMAGE)
    1.54 +                AC_DEFINE(SDL_VIDEO_DRIVER_X11_XFIXES)
    1.55 +            fi
    1.56              AC_ARG_ENABLE(render-x11,
    1.57  AC_HELP_STRING([--enable-render-x11], [enable the X11 render driver [[default=yes]]]),
    1.58                                  , enable_render_x11=yes)
    1.59              if test x$enable_render_x11 = xyes; then
    1.60                  AC_DEFINE(SDL_VIDEO_RENDER_X11)
    1.61              fi
    1.62 -        fi
    1.63 +       fi
    1.64      fi
    1.65  }
    1.66