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
This commit is contained in:
g_j_m 2006-08-02 08:34:14 +00:00
parent 2352771b51
commit e200ec8361

View File

@ -22,10 +22,10 @@ if [ "`uname`" = "Darwin" ]; then
fi
# Check automake version
AM_VERSION=`automake --version | sed -n -e 's#[^0-9]* \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*$#\1 \2 \3#p'`
AM_VERSION=`automake --version | sed -n -e 's#[^0-9]* \([0-9]*\)\.\([0-9]*\)*\.*\(\([0-9]*\)\).*$#\1 \2 \3#p'`
AM_V1=`echo $AM_VERSION | awk '{print $1}'`
AM_V2=`echo $AM_VERSION | awk '{print $2}'`
AM_V3=`echo $AM_VERSION | awk '{print $3}'`
AM_V3=`echo $AM_VERSION | awk '{if ($NF > 2) print $3; else print "0";}'`
if [ $AM_1 -gt $AM_V1 ]; then
AM_ERROR=1
@ -45,7 +45,7 @@ fi
if [ "$AM_ERROR" = "1" ]; then
echo -e '\E[31;m'
echo -n "Your automake version `automake --version | sed -n -e 's#[^0-9]* \([0-9]*\.[0-9]*\.[0-9]*\).*#\1#p'`"
echo -n "Your automake version `automake --version | sed -n -e 's#[^0-9]* \([0-9]*\.[0-9]*\.*[0-9]*\).*#\1#p'`"
echo " is older than the suggested one, $AM_1.$AM_2.$AM_3"
echo "Go on at your own risk. :-)"
echo