Skip to content

Commit e200ec8

Browse files
author
g_j_m
committed
Fix for ticket #217 - autogen.sh didn't correctly detect older
versions of automake and hence didn't warn the user git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@5657 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 2352771 commit e200ec8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

autogen.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ if [ "`uname`" = "Darwin" ]; then
2222
fi
2323

2424
# Check automake version
25-
AM_VERSION=`automake --version | sed -n -e 's#[^0-9]* \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*$#\1 \2 \3#p'`
25+
AM_VERSION=`automake --version | sed -n -e 's#[^0-9]* \([0-9]*\)\.\([0-9]*\)*\.*\(\([0-9]*\)\).*$#\1 \2 \3#p'`
2626
AM_V1=`echo $AM_VERSION | awk '{print $1}'`
2727
AM_V2=`echo $AM_VERSION | awk '{print $2}'`
28-
AM_V3=`echo $AM_VERSION | awk '{print $3}'`
28+
AM_V3=`echo $AM_VERSION | awk '{if ($NF > 2) print $3; else print "0";}'`
2929

3030
if [ $AM_1 -gt $AM_V1 ]; then
3131
AM_ERROR=1
@@ -45,7 +45,7 @@ fi
4545

4646
if [ "$AM_ERROR" = "1" ]; then
4747
echo -e '\E[31;m'
48-
echo -n "Your automake version `automake --version | sed -n -e 's#[^0-9]* \([0-9]*\.[0-9]*\.[0-9]*\).*#\1#p'`"
48+
echo -n "Your automake version `automake --version | sed -n -e 's#[^0-9]* \([0-9]*\.[0-9]*\.*[0-9]*\).*#\1#p'`"
4949
echo " is older than the suggested one, $AM_1.$AM_2.$AM_3"
5050
echo "Go on at your own risk. :-)"
5151
echo

0 commit comments

Comments
 (0)