+AC_ARG_ENABLE(xcursor,
+ AC_HELP_STRING(
+ [--disable-xcursor],
+ [disable use of the X Cursor library. [[default=enabled]]]
+ ),
+ [enable_xcursor=$enableval],
+ [enable_xcursor=yes]
+)
+
+if test "$enable_xcursor" = yes; then
+PKG_CHECK_MODULES(XCURSOR, [xcursor],
+ [
+ AC_DEFINE(USE_XCURSOR, [1], [Use X Cursor library])
+ AC_SUBST(XCURSOR_CFLAGS)
+ AC_SUBST(XCURSOR_LIBS)
+ xcursor_found=yes
+ ],
+ [
+ xcursor_found=no
+ ]
+)
+else
+ xcursor_found=no
+fi
+
+AC_ARG_ENABLE(xcomposite,
+ AC_HELP_STRING(
+ [--disable-xcomposite],
+ [disable use of the X Composite library. [[default=enabled]]]
+ ),
+ [enable_xcomposite=$enableval],
+ [enable_xcomposite=yes]
+)
+
+if test "$enable_xcomposite" = yes; then
+PKG_CHECK_MODULES(XRENDER, [xrender],
+ [
+ AC_DEFINE(USE_XRENDER, [1], [Use X Render library])
+ AC_SUBST(XRENDER_CFLAGS)
+ AC_SUBST(XRENDER_LIBS)
+ PKG_CHECK_MODULES(XDAMAGE, [xdamage],
+ [
+ AC_DEFINE(USE_XDAMAGE, [1], [Use X Damage library])
+ AC_SUBST(XDAMAGE_CFLAGS)
+ AC_SUBST(XDAMAGE_LIBS)
+ PKG_CHECK_MODULES(XCOMPOSITE, [xcomposite],
+ [
+ AC_DEFINE(USE_XCOMPOSITE, [1], [Use X Composite library])
+ AC_SUBST(XCOMPOSITE_CFLAGS)
+ AC_SUBST(XCOMPOSITE_LIBS)
+ xcomposite_found=yes
+ ],
+ [
+ xcomposite_found=no
+ ]
+ )
+ ],
+ [
+ xcomposite_found=no
+ ]
+ )
+ ],
+ [
+ xcomposite_found=no
+ ]
+)
+else
+ xcomposite_found=no
+fi
+
+dnl Check for session management
+X11_SM
+
+#EFENCE_LIBS=-lefence
+EFENCE_LIBS=""
+AC_SUBST(EFENCE_LIBS)
+
+dnl Check for X11 extensions