ref: 99264987a0799fca10e9ccd0aeff86713878ba67
parent: 18b2ab815f85ec97de3dcdc2088d4986f1676b84
author: giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
date: Fri Aug 6 01:01:36 EDT 2004
Actually implement the 'or later' part of the automake version detection. git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@313 ded80894-8fb9-0310-811b-c03f3676ab4d
--- a/autogen.sh
+++ b/autogen.sh
@@ -21,6 +21,7 @@
}
VERSIONGREP="sed -e s/.*[^0-9\.]\([0-9]\.[0-9]\).*/\1/"
+VERSIONMKINT="sed -e s/[^0-9]//"
# do we need automake?
if test -r Makefile.am; then
@@ -38,9 +39,10 @@
else
echo -n "checking for automake $AM_NEEDED or later... "
for am in automake-$AM_NEEDED automake$AM_NEEDED automake; do
+ verneeded=`echo $AM_NEEDED | $VERSIONMKINT`
($am --version < /dev/null > /dev/null 2>&1) || continue
- ver=`$am --version < /dev/null | head -1 | $VERSIONGREP`
- if test $ver = $AM_NEEDED; then
+ ver=`$am --version < /dev/null | head -1 | $VERSIONGREP | $VERSIONMKINT`
+ if test $ver -ge $verneeded; then
AUTOMAKE=$am
echo $AUTOMAKE
break
@@ -49,9 +51,10 @@
test -z $AUTOMAKE && echo "no"
echo -n "checking for aclocal $AM_NEEDED or later... "
for ac in aclocal-$AM_NEEDED aclocal$AM_NEEDED aclocal; do
+ verneeded=`echo $AM_NEEDED | $VERSIONMKINT`
($ac --version < /dev/null > /dev/null 2>&1) || continue
- ver=`$ac --version < /dev/null | head -1 | $VERSIONGREP`
- if test $ver = $AM_NEEDED; then
+ ver=`$ac --version < /dev/null | head -1 | $VERSIONGREP | $VERSIONMKINT`
+ if test $ver -ge $verneeded; then
ACLOCAL=$ac
echo $ACLOCAL
break