summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2009-01-02 15:36:39 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2009-01-02 15:44:52 +0000
commit333158ec85cf3c610cc8965fc3f99d72b534cc2e (patch)
tree5efc619726b9d3dca87b5c1163bfce9d06431745 /configure.ac
parentdc33ae24619f4602c23716e9e407f8dd4f1b4a1d (diff)
[configure] Replace awk comparator with an aclocal version
As reported in https://bugs.freedesktop.org/show_bug.cgi?id=19283, the fallback freetype version compare is broken inside the configure script as the $1-$3 arguments are interpreted as the script is constructed. To avoid making that awk comparison any more complicated, we import a version compare from the autoconf archives - such that we have a reusable macro for the furture.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac18
1 files changed, 6 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac
index ab2d37653..d3ed70314 100644
--- a/configure.ac
+++ b/configure.ac
@@ -293,18 +293,12 @@ CAIRO_ENABLE_FONT_BACKEND(ft, FreeType, auto, [
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_RESULT($FREETYPE_VERSION - Too old)
- use_ft="no ($FREETYPE_VERSION found; version $FREETYPE_MIN_VERSION from release $FREETYPE_MIN_RELEASE required)"
- else
- AC_MSG_RESULT($FREETYPE_VERSION - OK)
-
- ft_NONPKGCONFIG_CFLAGS=`$FREETYPE_CONFIG --cflags`
- ft_NONPKGCONFIG_LIBS=`$FREETYPE_CONFIG --libs`
- fi
+ AX_COMPARE_VERSION([$FREETYPE_VERSION], [gt], [$FREETYPE_MIN_VERSION],
+ [AC_MSG_RESULT($FREETYPE_VERSION - OK)
+ ft_NONPKGCONFIG_CFLAGS=`$FREETYPE_CONFIG --cflags`
+ ft_NONPKGCONFIG_LIBS=`$FREETYPE_CONFIG --libs`],
+ [AC_MSG_RESULT($FREETYPE_VERSION - Too old)
+ use_ft="no ($FREETYPE_VERSION found; version $FREETYPE_MIN_VERSION from release $FREETYPE_MIN_RELEASE required)"])
fi
fi
fi