diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2009-05-25 08:58:23 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2009-05-25 08:58:23 +0000 |
commit | b50e8d78f4b4b86177863a60bc85f5cd393ba04b (patch) | |
tree | 0819fc02385b631cb47eaa46cc3613613e64ceef /Build/source/m4/cho-libs.m4 | |
parent | 622523bd36859ef50591a5e4696bf803ca30a87d (diff) |
better handling of fontconfig, using pkg-config
git-svn-id: svn://tug.org/texlive/trunk@13457 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/m4/cho-libs.m4')
-rw-r--r-- | Build/source/m4/cho-libs.m4 | 30 |
1 files changed, 10 insertions, 20 deletions
diff --git a/Build/source/m4/cho-libs.m4 b/Build/source/m4/cho-libs.m4 index a6de533f8d1..f6addf6862d 100644 --- a/Build/source/m4/cho-libs.m4 +++ b/Build/source/m4/cho-libs.m4 @@ -70,26 +70,16 @@ AC_DEFUN([CHO_CHECK_LIBPAPER], # ----------------------- # Check for libfontconfig AC_DEFUN([CHO_CHECK_LIBFONTCONFIG], -[_cppflags=$CPPFLAGS _ldflags=$LDFLAGS - have_libfontconfig=no - AC_ARG_WITH([fontconfig], - [AS_HELP_STRING([--with-fontconfig=DIR],[use fontconfig include/library files from DIR])], - [if test -d "$withval"; then - CPPFLAGS="$CPPFLAGS -I$withval/include" - LDFLAGS="$LDFLAGS -L$withval/lib" - FONTCONFIGLDFLAGS="-L$withval/lib" - fi]) - AC_MSG_CHECKING([for fontconfig header files]) - AC_TRY_COMPILE( - [#include <fontconfig/fontconfig.h>], - [FcObjectSet *os;], - [AC_MSG_RESULT(yes) - AC_SEARCH_LIBS([FcInit], [fontconfig], - [AC_DEFINE([HAVE_LIBFONTCONFIG], 1, [Define if you have libfontconfig]) - have_libfontconfig=yes])], - [CPPFLAGS=$_cppflags - LDDFLAGS=$_ldflags - AC_MSG_RESULT(no)]) +[AC_CACHE_CHECK([for fontconfig header files and library], + [cho_cv_have_fontconfig], + [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <fontconfig/fontconfig.h>]], + [[FcObjectSet *os;]])], + [cho_cv_have_fontconfig=yes], + [cho_cv_have_fontconfig=no])]) +AS_IF([test "x$cho_cv_have_fontconfig" = xyes], + [AC_CHECK_FUNCS([FcInit], + [AC_DEFINE([HAVE_LIBFONTCONFIG], 1, + [Define if you have libfontconfig and its headers.])])]) ])# CHO_CHECK_LIBFONTCONFIG # CHO_CHECK_LIBFREETYPE(PACKAGE-NAME) |