Fix Savannah bug #25480. * builds/unix/freetype-config.in: For --ftversion, don't use $prefix but $includedir.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
diff --git a/ChangeLog b/ChangeLog
index 8a9dbb4..dc5e308 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-02-04 Werner Lemberg <wl@gnu.org>
+
+ Fix Savannah bug #25480.
+
+ * builds/unix/freetype-config.in: For --ftversion, don't use $prefix
+ but $includedir.
+
2009-01-31 Werner Lemberg <wl@gnu.org>
Minor docmaker improvements.
diff --git a/builds/unix/freetype-config.in b/builds/unix/freetype-config.in
index a343522..9606d31 100644
--- a/builds/unix/freetype-config.in
+++ b/builds/unix/freetype-config.in
@@ -1,6 +1,6 @@
#! /bin/sh
#
-# Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2008 by
+# Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -76,17 +76,7 @@ while test $# -gt 0 ; do
exit 0
;;
--ftversion)
- major=`grep define @prefix@/include/freetype2/freetype/freetype.h \
- | grep FREETYPE_MAJOR \
- | sed 's/.*[ ]\([0-9][0-9]*\).*/\1/'`
- minor=`grep define @prefix@/include/freetype2/freetype/freetype.h \
- | grep FREETYPE_MINOR \
- | sed 's/.*[ ]\([0-9][0-9]*\).*/\1/'`
- patch=`grep define @prefix@/include/freetype2/freetype/freetype.h \
- | grep FREETYPE_PATCH \
- | sed 's/.*[ ]\([0-9][0-9]*\).*/\1/'`
- echo $major.$minor.$patch
- exit 0
+ echo_ft_version=yes
;;
--cflags)
echo_cflags=yes
@@ -127,6 +117,19 @@ else
fi
fi
+if test "$echo_ft_version" = "yes" ; then
+ major=`grep define $includedir/freetype2/freetype/freetype.h \
+ | grep FREETYPE_MAJOR \
+ | sed 's/.*[ ]\([0-9][0-9]*\).*/\1/'`
+ minor=`grep define $includedir/freetype2/freetype/freetype.h \
+ | grep FREETYPE_MINOR \
+ | sed 's/.*[ ]\([0-9][0-9]*\).*/\1/'`
+ patch=`grep define $includedir/freetype2/freetype/freetype.h \
+ | grep FREETYPE_PATCH \
+ | sed 's/.*[ ]\([0-9][0-9]*\).*/\1/'`
+ echo $major.$minor.$patch
+fi
+
if test "$echo_cflags" = "yes" ; then
cflags="-I$includedir/freetype2"
if test "$includedir" != "/usr/include" ; then