summaryrefslogtreecommitdiff
path: root/autogen.sh
diff options
context:
space:
mode:
authorsuzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>2010-02-13 02:25:04 +0900
committersuzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>2010-02-13 02:25:04 +0900
commitad6954a0cbc0c1d5980cb7c04c8844186a021f48 (patch)
treefca7aadfb6cc6f0e89d24e9fe68cab146fcb31b6 /autogen.sh
parent93eaf50aaeab5255eb9e28b6184b8f9774ecb5be (diff)
downloadfreetype2-ad6954a0cbc0c1d5980cb7c04c8844186a021f48.tar.gz
Improve autotool version checking to work with beta releases.
Diffstat (limited to 'autogen.sh')
-rw-r--r--autogen.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/autogen.sh b/autogen.sh
index 16c335fd5..60ed3ba69 100644
--- a/autogen.sh
+++ b/autogen.sh
@@ -95,10 +95,11 @@ compare_to_minimum_version ()
check_tool_version ()
{
field=$5
+ # assume the output of "[TOOL] --version" is "toolname (GNU toolname foo bar) version"
if test "$field"x = x; then
- field=4 # default to 4 for all GNU autotools
+ field=3 # default to 3 for all GNU autotools, after filtering enclosed string
fi
- version=`$1 --version | head -1 | cut -d ' ' -f $field`
+ version=`$1 --version | head -1 | sed 's/([^)]*)/()/g' | cut -d ' ' -f $field`
version_check=`compare_to_minimum_version $version $4`
if test "$version_check"x = 0x; then
echo "ERROR: Your version of the \`$2' tool is too old."