From 1d4933a654d120707de1121a06e2927e1870934b Mon Sep 17 00:00:00 2001 From: fluxgen Date: Sun, 8 Dec 2002 13:02:38 +0000 Subject: fixed better xft checking --- configure.in | 45 ++++++++++++++++----------------------------- 1 file changed, 16 insertions(+), 29 deletions(-) diff --git a/configure.in b/configure.in index 72d514f..c754c83 100644 --- a/configure.in +++ b/configure.in @@ -221,39 +221,26 @@ AC_ARG_ENABLE( AM_CONDITIONAL(GNOME, test x$GNOME = xtrue) AC_MSG_CHECKING([whether to have Xft support]) -AC_ARG_ENABLE( - xft, -[ --enable-xft Xft (antialias) support [default=yes]], - if test x$enableval = "xyes"; then - AC_CHECK_LIB(Xft, XftFontOpen, - LIBS="$LIBS -lXft" - XFT=true - AC_DEFINE(USE_XFT, 1, "antialias support"), - AC_MSG_RESULT([no]) - XFT=false - ) - AC_CHECK_LIB(Xft, XftDrawStringUtf8, - LIBS="$LIBS -lXft" - AC_DEFINE(HAVE_XFT_UTF8_STRING, 1, "Xft UTF8 support"), - ) - else - AC_MSG_RESULT([no]) - XFT=false - fi, - AC_CHECK_LIB(Xft, XftFontOpen, - LIBS="$LIBS -lXft" - XFT=true - AC_DEFINE(USE_XFT, 1, "antialias support"), - AC_MSG_RESULT([no]) +AM_PATH_XFT(yes, + XFT=true, XFT=false - ) - AC_CHECK_LIB(Xft, XftDrawStringUtf8, - LIBS="$LIBS -lXft" - AC_DEFINE(HAVE_XFT_UTF8_STRING, 1, "Xft UTF8 support"), - ) ) + +if test "x$XFT" = "xtrue" ; then + AC_DEFINE(USE_XFT, 1, "antialias support") + AC_MSG_CHECKING([Xft UTF-8 support]) + AC_TRY_LINK([ + #include + ], [ XftDrawStringUtf8(0, 0, 0, 0, 0, 0, 0); return 0; ], + AC_DEFINE(HAVE_XFT_UTF8_STRING, 1, "Xft UTF8 support") + AC_MSG_RESULT(yes), + AC_MSG_RESULT(no) + ) +fi + AM_CONDITIONAL(XFT, test x$XFT = xtrue) + AC_MSG_CHECKING([whether to have Xmb (multibyte font, utf-8) support]) AC_ARG_ENABLE( xmb, -- cgit v0.11.2