[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 07/21] Fix test for fontconfig when cross building
From: |
John Darrington |
Subject: |
[PATCH 07/21] Fix test for fontconfig when cross building |
Date: |
Sun, 12 Jan 2014 12:00:20 +0100 |
* configure.ac: Replace ad hoc test for fontconfig with one using
PKG_CHECK_MODULES
---
configure.ac | 39 +++++++--------------------------------
1 file changed, 7 insertions(+), 32 deletions(-)
diff --git a/configure.ac b/configure.ac
index fe7f6b9..d66f06a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -29,6 +29,9 @@ AC_INIT([gnu-ghostscript], [9.06.0], address@hidden)
AC_CONFIG_SRCDIR(psi/gs.c)
AM_INIT_AUTOMAKE([-Wall])
+PKG_PROG_PKG_CONFIG
+m4_pattern_forbid([PKG_CHECK_MODULES])
+
dnl Inherit compiler flags from the environment...
CFLAGS="${CFLAGS:=}"
CPPFLAGS="${CPPFLAGS:=}"
@@ -493,39 +496,11 @@ if test x$with_libpaper != xno; then
CFLAGS="$CFLAGS -DUSE_LIBPAPER"
fi
-dnl Fontconfig support
-HAVE_FONTCONFIG=""
-FONTCONFIG_CFLAGS=""
-FONTCONFIG_LIBS=""
-AC_ARG_ENABLE([fontconfig], AC_HELP_STRING([--disable-fontconfig],
- [Do not use fontconfig to list system fonts]))
-if test "$enable_fontconfig" != "no"; then
- # We MUST NOT use PKG_CHECK_MODULES since it is a) not a standard
- # autoconf macro and b) requires pkg-config on the system, which is
- # NOT standard on ANY OS, including Linux!
- if test "x$PKGCONFIG" != x; then
- AC_MSG_CHECKING(for fontconfig with pkg-config)
- if $PKGCONFIG --exists fontconfig; then
- AC_MSG_RESULT(yes)
- FONTCONFIG_CFLAGS="$CFLAGS `$PKGCONFIG --cflags
fontconfig`"
- FONTCONFIG_LIBS="`$PKGCONFIG --libs fontconfig`"
- HAVE_FONTCONFIG=-DHAVE_FONTCONFIG
- else
- AC_MSG_RESULT(no)
- fi
- fi
- if test -z "$HAVE_FONTCONFIG"; then
- AC_CHECK_LIB([fontconfig], [FcInitLoadConfigAndFonts], [
- AC_CHECK_HEADER([fontconfig/fontconfig.h], [
- FONTCONFIG_LIBS="-lfontconfig"
- HAVE_FONTCONFIG="-DHAVE_FONTCONFIG"
- ])
- ])
- fi
-fi
+PKG_CHECK_MODULES([FONTCONFIG], [fontconfig],
+ [HAVE_FONTCONFIG="-DHAVE_FONTCONFIG"],
+ [AC_MSG_ERROR([fontconfig must be installed])])
+
AC_SUBST(HAVE_FONTCONFIG)
-AC_SUBST(FONTCONFIG_CFLAGS)
-AC_SUBST(FONTCONFIG_LIBS)
dnl DBus support
HAVE_DBUS=""
--
1.7.10.4
- Cross-compilation fails for Ghostscript 09.05, John Darrington, 2014/01/03
- Re: Cross-compilation fails for Ghostscript 09.05, Didier Link, 2014/01/05
- Re: Cross-compilation fails for Ghostscript 09.05, John Darrington, 2014/01/05
- Re: Cross-compilation fails for Ghostscript 09.05, John Darrington, 2014/01/12
- [no subject], John Darrington, 2014/01/12
- [PATCH 02/21] Makefile.in (top_srcdir): New variable, John Darrington, 2014/01/12
- [PATCH 06/21] configure: Fix endianess test while cross-compiling, John Darrington, 2014/01/12
- [PATCH 07/21] Fix test for fontconfig when cross building,
John Darrington <=
- [PATCH 09/21] Simplify the conditional inclusion of the contrib directory., John Darrington, 2014/01/12
- [PATCH 08/21] configure.ac, Makefile.in: Use CC_FOR_BUILD for native compilation., John Darrington, 2014/01/12
- [PATCH 04/21] Fix crash on startup if the configuration file is missing., John Darrington, 2014/01/12
- [PATCH 13/21] Improve reliability of freetype library (esp. wrt cross-building), John Darrington, 2014/01/12
- [PATCH 05/21] base/lib.mak: Fix broken build dependency, John Darrington, 2014/01/12
- [PATCH 10/21] Fix test for dbus when cross building, John Darrington, 2014/01/12
- [PATCH 11/21] Fix incorrect determination of host/build OS, John Darrington, 2014/01/12
- [PATCH 17/21] Avoid redundancy in package version number/string, John Darrington, 2014/01/12
- [PATCH 16/21] Remove the code running ./configure from autogen.sh - I am of the opinion, that the bootstrap process and the configuration should be kept seperate. It should be possible to bootstrap without configuring., John Darrington, 2014/01/12
- [PATCH 20/21] Remove 'exe' suffix from GS variable., John Darrington, 2014/01/12