[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 13/21] Improve reliability of freetype library (esp. wrt cross-bu
From: |
John Darrington |
Subject: |
[PATCH 13/21] Improve reliability of freetype library (esp. wrt cross-building) |
Date: |
Sun, 12 Jan 2014 12:00:26 +0100 |
* configure.ac: Use PKG_CHECK_MODULE instead of ad hoc code
---
configure.ac | 70 ++++------------------------------------------------------
1 file changed, 4 insertions(+), 66 deletions(-)
diff --git a/configure.ac b/configure.ac
index e22b86a..2c1435a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -537,76 +537,14 @@ AC_SUBST(UFST_ROOT)
AC_SUBST(UFST_CFLAGS)
AC_SUBST(UFST_LIB_EXT)
-
+AFS=1
+FT_BRIDGE=0
AC_ARG_ENABLE([freetype], AC_HELP_STRING([--disable-freetype],
[Disable freetype for font rasterization]))
-FT_BRIDGE=0
-SHARE_FT=0
-FTSRCDIR=
-FT_CFLAGS=
-FT_LIBS=
if test x"$enable_freetype" != xno; then
- AC_MSG_CHECKING([for local freetype library source])
- dnl We prefer freetype2 over freetype, so it is easy to override
- dnl the included freetype source with a checkout from upstream.
-
- for dir in freetype2 freetype; do
- if test -f $dir/src/base/ftbbox.c; then
- AC_MSG_RESULT(yes)
- SHARE_FT=0
- FTSRCDIR="$dir"
- FT_CFLAGS="-I$dir/include"
- FT_BRIDGE=1
- break;
- fi
- done
- if test -z $FTSRCDIR; then
- AC_MSG_RESULT([no])
- if test "x$PKGCONFIG" != x; then
- AC_MSG_CHECKING(for system freetype2 >= 2.4.2 with pkg-config)
- # pkg-config needs the libtool version, which != the freetype2
version <sigh!>
- # There is a table of corresponding ft2<->libtool numbers in
freetype/docs/VERSION.DLL
- if $PKGCONFIG --atleast-version=12.0.6 freetype2; then
- AC_MSG_RESULT(yes)
- FT_CFLAGS="$CFLAGS `$PKGCONFIG --cflags freetype2`"
- FT_LIBS="`$PKGCONFIG --libs freetype2`"
- FT_BRIDGE=1
- SHARE_FT=1
- else
- AC_MSG_RESULT(no)
- AC_MSG_WARN([freetype library source not found...using native
rasterizer])
- AFS=1
- fi
- else
- AC_CHECK_HEADER([ft2build.h], [FT_BRIDGE=1], [AFS=1])
-
- if test "x$FT_BRIDGE" = x1; then
- AC_CHECK_LIB(freetype, FT_Init_FreeType,
- [FT_BRIDGE=1], [FT_BRIDGE=0; AFS=1])
-
- if test "x$FT_BRIDGE" = x1; then
- AC_MSG_CHECKING(for system freetype2 library >= 2.4.2)
- AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([#include "ft2build.h"
- #include FT_FREETYPE_H], [
- #if FREETYPE_MAJOR < 2
- FAIL
- #endif
- #if FREETYPE_MINOR < 4
- FAIL
- #endif
- #if FREETYPE_PATCH < 2
- FAIL
- #endif
- return(0);
- ])],
- [FT_BRIDGE=1;AC_MSG_RESULT(yes)], [FT_BRIDGE=0;
AFS=1;AC_MSG_RESULT(no)])
- fi
- fi
-
- fi
- fi
+ PKG_CHECK_MODULES([FT], [freetype2 >= 2.4.2],
+ [FT_BRIDGE=1; SHARE_FT=1; AFS=0], [true])
fi
AC_SUBST(FT_BRIDGE)
AC_SUBST(SHARE_FT)
--
1.7.10.4
- Re: Cross-compilation fails for Ghostscript 09.05, (continued)
- 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, 2014/01/12
- [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 <=
- [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
- [PATCH 21/21] Do install contrib drivers if the --disable-contrib option was chosen., John Darrington, 2014/01/12
- [PATCH 14/21] Remove broken test for OpenJpeg library., John Darrington, 2014/01/12
- [PATCH 12/21] Minor re-ordering of configure.ac, John Darrington, 2014/01/12
- [PATCH 03/21] doc/gs-vms.htp: Gnu policy is not to acknowledge trademarks., John Darrington, 2014/01/12