From 75dcc763ef064ce34b6fb2264df449774af11c51 Mon Sep 17 00:00:00 2001
From: Ralph Giles <giles@xiph.org>
Date: Mon, 10 Nov 2003 16:47:00 +0000
Subject: [PATCH] Propagate 'or later...' automake version check.

git-svn-id: http://svn.xiph.org/trunk/ao@5553 0101bb08-14d6-0310-b084-bc0e0c8e3800
---
 autogen.sh | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/autogen.sh b/autogen.sh
index afc53b7..805d11f 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -21,6 +21,7 @@ echo "checking for autoconf... "
 }
 
 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
@@ -39,8 +40,9 @@ if test -r Makefile.am; then
     echo -n "checking for automake $AM_NEEDED or later... "
     for am in automake-$AM_NEEDED automake$AM_NEEDED automake; do
       ($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`
+      verneeded=`echo $AM_NEEDED | $VERSIONMKINT`
+      if test $ver -ge $verneeded; then
         AUTOMAKE=$am
         echo $AUTOMAKE
         break
@@ -50,8 +52,9 @@ if test -r Makefile.am; then
     echo -n "checking for aclocal $AM_NEEDED or later... "
     for ac in aclocal-$AM_NEEDED aclocal$AM_NEEDED aclocal; do
       ($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`
+      verneeded=`echo $AM_NEEDED | $VERSIONMKINT`
+      if test $ver -ge $verneeded; then
         ACLOCAL=$ac
         echo $ACLOCAL
         break
-- 
GitLab