+ )
+
+ LIBS=$OLDLIBS
+ CPPFLAGS=$OLDCPPFLAGS
+ fi
+
+ AC_MSG_CHECKING([for the Shape extension])
+ if test "$SHAPE" = "yes"; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ fi
+])
+
+
+# X11_EXT_XINERAMA()
+#
+# Check for the presence of the "Xinerama" X Window System extension.
+# Defines "XINERAMA", sets the $(XINERAMA) variable to "yes", and sets the
+# $(LIBS) appropriately if the extension is present.
+AC_DEFUN([X11_EXT_XINERAMA],
+[
+ AC_REQUIRE([X11_DEVEL])
+
+ AC_ARG_ENABLE([xinerama],
+ AC_HELP_STRING(
+ [--disable-xinerama],
+ [build without support for xinerama [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"
+
+ AC_CHECK_LIB([Xinerama], [XineramaQueryExtension],
+ [
+ AC_MSG_CHECKING([for X11/extensions/Xinerama.h])
+ AC_TRY_LINK(