From: Dana Jansens Date: Tue, 3 Dec 2002 19:49:52 +0000 (+0000) Subject: more verbose, and better checks for Xft version 2/1 X-Git-Tag: openbox-2_2_2^2~9 X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=0daf1152d918689f6ee961a1e7bf13bbf67695f6;p=dana%2Fopenbox.git more verbose, and better checks for Xft version 2/1 --- diff --git a/configure.in b/configure.in index 0eda8258..0daeb7c5 100644 --- a/configure.in +++ b/configure.in @@ -143,7 +143,6 @@ fi dnl Check for Xft extension support and proper library files. XFT="" XFT2="" -dnl 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@:>@]) @@ -153,36 +152,73 @@ if test "$enableval" = "yes"; then if pkg-config xft; then XFT2="yes" AC_MSG_RESULT([version 2]) - CXXFLAGS="`pkg-config --cflags xft` ${CXXFLAGS}" - LIBS="${LIBS} `pkg-config --libs xft`" + S_CXXFLAGS=${CXXFLAGS} + S_LIBS=${LIBS} + XFT_CFLAGS="`pkg-config --cflags xft`" + XFT_LIBS="`pkg-config --libs xft`" + CXXFLAGS="${XFT_CFLAGS} ${CXXFLAGS}" + LIBS="${LIBS} ${XFT_LIBS}" + AC_CHECK_LIB(Xft, XftFontOpenXlfd, + AC_MSG_CHECKING([for X11/Xft/Xft.h for Xft2]) + AC_TRY_LINK( + [ + #include + #include + ], + [ + int i = XFT_MAJOR; + XftFont foo; + ], + [ + AC_MSG_RESULT([yes]) + XFT="yes" + ], + [ + AC_MSG_RESULT([no]) + XFT2="" + AC_MSG_RESULT() + AC_MSG_RESULT([** WARNING: Xft support is disabled! **]) + AC_MSG_RESULT() + ] + ) + ) else AC_MSG_RESULT([version 1]) - fi - - AC_CHECK_LIB(Xft, XftFontOpenXlfd, - AC_MSG_CHECKING([for X11/Xft/Xft.h]) - AC_TRY_LINK( -#include -#include -, XftFont foo, - AC_MSG_RESULT([yes]) - XFT="yes" - test "$XFT2" = "yes" || LIBS="$LIBS -lXft" - - dnl Check for utf8 support in the Xft library - dnl AC_CHECK_LIB(Xft, XftDrawStringUtf8, - dnl XFT_UTF8="yes", - dnl), - , - - AC_MSG_RESULT([no]) + AC_CHECK_LIB(Xft, XftFontOpenXlfd, + AC_MSG_CHECKING([for X11/Xft/Xft.h for Xft1]) + AC_TRY_LINK( + [ + #include + #include + ], + [ + XftFont foo; + ], + [ + AC_MSG_RESULT([yes]) + XFT="yes" + XFT_LIBS="$LIBS -lXft" + + dnl Check for utf8 support in the Xft library + dnl AC_CHECK_LIB(Xft, XftDrawStringUtf8, + dnl XFT_UTF8="yes", + dnl), + ], + [ + AC_MSG_RESULT([no]) + AC_MSG_RESULT() + AC_MSG_RESULT([** WARNING: Xft support is disabled! **]) + AC_MSG_RESULT() + ] + ) ) - ) - + fi else AC_MSG_RESULT([no]) fi if test "$XFT" = "yes"; then + AC_SUBST([XFT_CFLAGS]) + AC_SUBST([XFT_LIBS]) AC_DEFINE(XFT,1,[Enable support of the Xft extension]) dnl if test "$XFT_UTF8" = "yes"; then dnl AC_DEFINE(XFT_UTF8,1,[Support for Utf8 text in the Xft extension])