-if test x$SLIT = "xyes"; then
- AC_DEFINE(SLIT,1,Enable the Slit)
+if test "$XINERAMA" = "yes"; then
+ AC_DEFINE(XINERAMA,1,Enable support of the Xinerama extension)
+fi
+
+dnl Check for Xft extension support and proper library files.
+XFT=""
+XFT_UTF8=""
+AC_MSG_CHECKING([whether to build support for the Xft extension])
+AC_ARG_ENABLE(
+ xft, [ --enable-xft enable support of the Xft extension [default=yes]])
+: ${enableval="yes"}
+if test "$enableval" = "yes"; then
+ AC_MSG_RESULT([yes])
+
+ AC_CHECK_LIB(Xft, XftFontOpenXlfd,
+ AC_MSG_CHECKING([for X11/Xft/Xft.h])
+ AC_TRY_LINK(
+#include <X11/Xlib.h>
+#include <X11/Xft/Xft.h>
+, XftFont foo,
+ AC_MSG_RESULT([yes])
+ XFT="yes"
+ LIBS="$LIBS -lXft"
+
+ dnl Check for utf8 support in the Xft library
+ AC_CHECK_LIB(Xft, XftDrawStringUtf8,
+ XFT_UTF8="yes",
+ ),
+
+ AC_MSG_RESULT([no])
+ )
+ )
+
+else
+ AC_MSG_RESULT([no])
+fi
+if test "$XFT" = "yes"; then
+ AC_DEFINE(XFT,1,[Enable support of the Xft extension])
+ if test "$XFT_UTF8" = "yes"; then
+ AC_DEFINE(XFT_UTF8,1,[Support for Utf8 text in the Xft extension])
+ fi