From 498ab4c231748a977fdc4a71ff91b3929ae131b4 Mon Sep 17 00:00:00 2001 From: handa Date: Thu, 27 May 2004 10:56:55 +0000 Subject: [PATCH] Check fontconfig even if Xft is available. Check gd library. --- configure.ac | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/configure.ac b/configure.ac index 9916774..e7b63c0 100644 --- a/configure.ac +++ b/configure.ac @@ -169,21 +169,17 @@ AC_SUBST(XFT2_LD_FLAGS) # Check for fontconfig usability. save_CPPFLAGS="$CPPFLAGS" save_LIBS="$LIBS" -if test "x$HAVE_XFT2" = "xyes"; then - HAVE_FONTCONFIG=yes -else - AC_CHECK_PROG(HAVE_PKG_CONFIG, pkg-config, yes) - FONTCONFIG_LD_FLAGS=-lfontconfig - if test "x$HAVE_PKG_CONFIG" = "xyes"; then - if pkg-config --exists fontconfig; then - CPPFLAGS="$CPPFLAGS `pkg-config --cflags fontconfig`" - FONTCONFIG_LD_FLAGS="`pkg-config --libs fontconfig`" - LIBS="$LIBS $FONTCONFIG_LD_FLAGS" - fi +FONTCONFIG_LD_FLAGS=-lfontconfig +AC_CHECK_PROG(HAVE_PKG_CONFIG, pkg-config, yes) +if test "x$HAVE_PKG_CONFIG" = "xyes"; then + if pkg-config --exists fontconfig; then + CPPFLAGS="$CPPFLAGS `pkg-config --cflags fontconfig`" + FONTCONFIG_LD_FLAGS="`pkg-config --libs fontconfig`" + LIBS="$LIBS $FONTCONFIG_LD_FLAGS" fi - AC_CHECK_LIB(fontconfig, FcInit, HAVE_FONTCONFIG=yes, HAVE_FONTCONFIG=no) - AC_CHECK_HEADER(fontconfig/fontconfig.h, , HAVE_FONTCONFIG=no) fi +AC_CHECK_LIB(fontconfig, FcInit, HAVE_FONTCONFIG=yes, HAVE_FONTCONFIG=no) +AC_CHECK_HEADER(fontconfig/fontconfig.h, , HAVE_FONTCONFIG=no) if test "x$HAVE_FONTCONFIG" = "xyes"; then AC_DEFINE(HAVE_FONTCONFIG, 1, [Define to 1 if you have fontconfig library and header file.]) @@ -194,6 +190,19 @@ fi LIBS="$save_LIBS" AC_SUBST(FONTCONFIG_LD_FLAGS) +# Check for gdlib usability. +save_LIBS="$LIBS" +AC_CHECK_LIB(gd, gdImageCreate, HAVE_GD=yes, HAVE_GD=no) +AC_CHECK_HEADER(gd.h, , HAVE_GD=no) +if test "x$HAVE_GD" = "xyes"; then + AC_CHECK_LIB(gd, gdImageCreateTrueColor, HAVE_GD=2, HAVE_GD=1) + AC_DEFINE_UNQUOTED(HAVE_GD, $HAVE_GD, + [Define to 1 if you have gd library and header file.]) + GD_LD_FLAGS=-lgd +fi +LIBS="$save_LIBS" +AC_SUBST(GD_LD_FLAGS) + # Check for libxml2 usability. save_CPPFLAGS="$CPPFLAGS" save_LIBS="$LIBS" -- 1.7.10.4