+ )
+
+ LIBS=$OLDLIBS
+ CPPFLAGS=$OLDCPPFLAGS
+ fi
+
+ AC_MSG_CHECKING([for the Xkb extension])
+ if test "$XKB" = "yes"; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ fi
+])
+
+# X11_EXT_XRANDR()
+#
+# Check for the presence of the "XRandR" X Window System extension.
+# Defines "XRANDR" and sets the $(XRANDR) variable to "yes" if the extension is
+# present.
+AC_DEFUN([X11_EXT_XRANDR],
+[
+ AC_REQUIRE([X11_DEVEL])
+
+ AC_ARG_ENABLE([xrandr],
+ AC_HELP_STRING(
+ [--disable-xrandr],
+ [build without support for xrandr extension [default=enabled]]),
+ [USE=$enableval], [USE="yes"])
+
+ if test "$USE" = "yes"; then
+ # Store these
+ OLDLIBS=$LIBS
+ OLDCPPFLAGS=$CPPFLAGS
+
+ CPPFLAGS="$CPPFLAGS $X_CFLAGS"
+ LIBS="$LIBS $X_LIBS -lXext -lXrender -lXrandr"
+
+ AC_CHECK_LIB([Xrandr], [XRRSelectInput],
+ AC_MSG_CHECKING([for X11/extensions/Xrandr.h])
+ AC_TRY_LINK(