[cairo-commit] cairo ChangeLog, 1.898, 1.899 cairo.pc.in, 1.21,
1.22 configure.in, 1.126, 1.127
Kristian Hogsberg
commit at pdx.freedesktop.org
Wed Aug 17 15:57:48 PDT 2005
Committed by: krh
Update of /cvs/cairo/cairo
In directory gabe:/tmp/cvs-serv4381
Modified Files:
ChangeLog cairo.pc.in configure.in
Log Message:
2005-08-17 Kristian Høgsberg <krh at redhat.com>
* configure.in: Try to use pkg-config to detect freetype2, then
fall back to the existing freetype-config based check.
Index: ChangeLog
===================================================================
RCS file: /cvs/cairo/cairo/ChangeLog,v
retrieving revision 1.898
retrieving revision 1.899
diff -u -d -r1.898 -r1.899
--- ChangeLog 17 Aug 2005 16:51:09 -0000 1.898
+++ ChangeLog 17 Aug 2005 22:57:45 -0000 1.899
@@ -1,3 +1,8 @@
+2005-08-17 Kristian Høgsberg <krh at redhat.com>
+
+ * configure.in: Try to use pkg-config to detect freetype2, then
+ fall back to the existing freetype-config based check.
+
2005-08-17 Carl Worth <cworth at cworth.org>
Fixes for bug #4110:
Index: cairo.pc.in
===================================================================
RCS file: /cvs/cairo/cairo/cairo.pc.in,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- cairo.pc.in 10 Aug 2005 19:36:51 -0000 1.21
+++ cairo.pc.in 17 Aug 2005 22:57:45 -0000 1.22
@@ -8,5 +8,5 @@
Version: @VERSION@
@PKGCONFIG_REQUIRES@: @FREETYPE_REQUIRES@ @XRENDER_REQUIRES@ @PNG_REQUIRES@ @GLITZ_REQUIRES@
-Libs: @FREETYPE_LIBS@ -L${libdir} -lcairo
-Cflags: @FREETYPE_CFLAGS@ -I${includedir}/cairo
+Libs: @FREETYPE_CONFIG_LIBS@ -L${libdir} -lcairo
+Cflags: @FREETYPE_CONFIG_CFLAGS@ -I${includedir}/cairo
Index: configure.in
===================================================================
RCS file: /cvs/cairo/cairo/configure.in,v
retrieving revision 1.126
retrieving revision 1.127
diff -u -d -r1.126 -r1.127
--- configure.in 16 Aug 2005 23:52:35 -0000 1.126
+++ configure.in 17 Aug 2005 22:57:45 -0000 1.127
@@ -260,12 +260,15 @@
CAIRO_CFLAGS="$CAIRO_CFLAGS $FONTCONFIG_CFLAGS"
CAIRO_LIBS="$CAIRO_LIBS $FONTCONFIG_LIBS"
-# Test for freetype2 separate from pkg-config since at least up to
-# 2003-06-07, there was no freetype2.pc in the release.
+# We use pkg-config to look for freetype2, but fall back to
+# freetype-config if it fails. We prefer pkg-config, since we can
+# then just put freetype2 >= $FREETYPE_MIN_VERSION in
+# Requires.private, but at least up to 2003-06-07, there was no
+# freetype2.pc in the release.
#
# Freetype versions come in three forms:
# release (such as 2.1.5)
-# libtool (such as 9.4.3) (returned by freetype-config)
+# libtool (such as 9.4.3) (returned by freetype-config and pkg-config)
# platform-specific/soname (such as 6.3.4)
# and they recommend you never use the platform-specific version
# (see docs/VERSION.DLL in freetype2 sources)
@@ -279,29 +282,44 @@
if test "x$use_freetype" = "xyes"; then
- if test -z "$FREETYPE_CONFIG"; then
- AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, no)
- fi
- if test "$FREETYPE_CONFIG" = "no" ; then
- AC_MSG_ERROR(No freetype-config script found in path or FREETYPE_CONFIG)
- fi
+ PKG_CHECK_MODULES(FREETYPE, freetype2 >= $FREETYPE_MIN_VERSION,
+ [freetype_pkgconfig=yes], [freetype_pkgconfig=no])
- AC_MSG_CHECKING(freetype2 libtool version)
+ if test "x$freetype_pkgconfig" = "xyes"; then
- FREETYPE_VERSION=`$FREETYPE_CONFIG --version`
+ FREETYPE_REQUIRES="freetype2 >= $FREETYPE_MIN_VERSION fontconfig"
- VERSION_DEC=`echo $FREETYPE_VERSION | awk -F. '{printf("%d\n", 10000*$1 + 100*$2 + $3)};'`
- MIN_VERSION_DEC=`echo $FREETYPE_MIN_VERSION | awk -F. '{printf("%d\n", 10000*$1 + 100*$2 + $3)};'`
- if test $VERSION_DEC -lt $MIN_VERSION_DEC; then
- AC_MSG_ERROR($FREETYPE_VERSION - version $FREETYPE_MIN_VERSION from release $FREETYPE_MIN_RELEASE required)
+ else
+
+ if test -z "$FREETYPE_CONFIG"; then
+ AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, no)
+ fi
+ if test "$FREETYPE_CONFIG" = "no" ; then
+ AC_MSG_ERROR(No freetype-config script found in path or FREETYPE_CONFIG)
+ fi
+
+ AC_MSG_CHECKING(freetype2 libtool version)
+
+ FREETYPE_VERSION=`$FREETYPE_CONFIG --version`
+
+ VERSION_DEC=`echo $FREETYPE_VERSION | awk -F. '{printf("%d\n", 10000*$1 + 100*$2 + $3)};'`
+ MIN_VERSION_DEC=`echo $FREETYPE_MIN_VERSION | awk -F. '{printf("%d\n", 10000*$1 + 100*$2 + $3)};'`
+ if test $VERSION_DEC -lt $MIN_VERSION_DEC; then
+ AC_MSG_ERROR($FREETYPE_VERSION - version $FREETYPE_MIN_VERSION from release $FREETYPE_MIN_RELEASE required)
+ fi
+ AC_MSG_RESULT($FREETYPE_VERSION - OK)
+
+ FREETYPE_CONFIG_CFLAGS=`$FREETYPE_CONFIG --cflags`
+ FREETYPE_CONFIG_LIBS=`$FREETYPE_CONFIG --libs`
+ FREETYPE_CFLAGS=$FREETYPE_CONFIG_FLAGS
+ FREETYPE_LIBS=$FREETYPE_CONFIG_LIBS
+ FREETYPE_REQUIRES=fontconfig
fi
- AC_MSG_RESULT($FREETYPE_VERSION - OK)
- FREETYPE_CFLAGS=`$FREETYPE_CONFIG --cflags`
- FREETYPE_LIBS=`$FREETYPE_CONFIG --libs`
- FREETYPE_REQUIRES=fontconfig
AC_SUBST(FREETYPE_CFLAGS)
AC_SUBST(FREETYPE_LIBS)
+ AC_SUBST(FREETYPE_CONFIG_CFLAGS)
+ AC_SUBST(FREETYPE_CONFIG_LIBS)
AC_SUBST(FREETYPE_REQUIRES)
temp_save_libs="$LIBS"
More information about the cairo-commit
mailing list