--- a/configure.in
+++ b/configure.in
@@ -253,6 +253,18 @@
               [AC_HELP_STRING([--enable-xinerama],
 	                      [support xinerama extension if available [default=yes]])],,
               [enable_xinerama="yes"])
+AC_ARG_ENABLE(xrandr,
+	      [AC_HELP_STRING([--enable-xrandr],
+			      [support XRandR extension if available [default=yes]])])
+AC_ARG_ENABLE(xfixes,
+	      [AC_HELP_STRING([--enable-xfixes],
+			      [support XFixes extension if available [default=yes]])])
+AC_ARG_ENABLE(xcomposite,
+	      [AC_HELP_STRING([--enable-xcomposite],
+			      [support X Composite extension if available [default=yes]])])
+AC_ARG_ENABLE(xdamage,
+	      [AC_HELP_STRING([--enable-xdamage],
+			      [support X Damage extension if available [default=yes]])])
 AC_ARG_ENABLE(rebuilds,
               [AC_HELP_STRING([--disable-rebuilds],
                               [disable all source autogeneration rules])],,
@@ -1590,7 +1602,8 @@
   AM_CONDITIONAL(XINPUT_XFREE, test x$with_xinput = xxfree || test x$with_xinput = xyes)
 
   # Check for the RANDR extension
-  if $PKG_CONFIG --exists "xrandr >= 1.2.99" ; then
+  if test x"$enable_xrandr" != xno && \
+     $PKG_CONFIG --exists "xrandr >= 1.2.99" ; then
      AC_DEFINE(HAVE_RANDR, 1, [Have the Xrandr extension library])
 
      X_PACKAGES="$X_PACKAGES xrandr"
@@ -1606,7 +1619,8 @@
 
   # Checks for XFixes extension
   
-  if $PKG_CONFIG --exists xfixes ; then
+  if test x"$enable_xfixes" != xno && \
+     $PKG_CONFIG --exists xfixes ; then
     AC_DEFINE(HAVE_XFIXES, 1, [Have the XFIXES X extension])
     
     X_PACKAGES="$X_PACKAGES xfixes"
@@ -1615,7 +1629,8 @@
 
   # Checks for Xcomposite extension
 
-  if $PKG_CONFIG --exists xcomposite ; then
+  if test x"$enable_xcomposite" != xno && \
+     $PKG_CONFIG --exists xcomposite ; then
     AC_DEFINE(HAVE_XCOMPOSITE, 1, [Have the XCOMPOSITE X extension])
 
     X_PACKAGES="$X_PACKAGES xcomposite"
@@ -1624,7 +1639,7 @@
 
   # Checks for Xdamage extension
 
-  if $PKG_CONFIG --exists xdamage ; then
+  if test x"$enable_xdamage" != xno && $PKG_CONFIG --exists xdamage ; then
     AC_DEFINE(HAVE_XDAMAGE, 1, [Have the XDAMAGE X extension])
 
     X_PACKAGES="$X_PACKAGES xdamage"
