AC_CHECK_FT2
AC_PATH_PROGS([XFT_CONFIG], [xft-config], [none])
PKG_CHECK_MODULES(XFT, xft)
if test "x$XFT_CONFIG" = "xnone"; then
AC_MSG_ERROR([You need to have libXft.])
fi
XFT_LIBS=`$XFT_CONFIG --libs`
AC_CHECK_LIB([Xft], [XftFontOpenName],,
AC_MSG_ERROR([You need to have libXft.]))