summaryrefslogtreecommitdiff
path: root/autogen.sh
diff options
context:
space:
mode:
authorRalph Giles <giles@xiph.org>2003-11-10 16:46:21 +0000
committerRalph Giles <giles@xiph.org>2003-11-10 16:46:21 +0000
commit946808aef8ccbb50f76c8fad0a8678f777412318 (patch)
tree9180404f2854b862fe8f1ac89c8b0246ccb1c735 /autogen.sh
parentb9e5376a23b77a85d6f8956371eeb0b2a0db08e9 (diff)
downloadogg-946808aef8ccbb50f76c8fad0a8678f777412318.tar.gz
Implement the 'or later...' part of the automake version checking. This
is kind of hacky, just concatentating the major and minor version numbers and doing a numerical compare, but it should work for people who just have 1.7 installed when we ask for 1.6. Patch from Moritz Grimm <gtgbr@gmx.net>. git-svn-id: http://svn.xiph.org/trunk/ogg@5552 0101bb08-14d6-0310-b084-bc0e0c8e3800
Diffstat (limited to 'autogen.sh')
-rwxr-xr-xautogen.sh11
1 files changed, 7 insertions, 4 deletions
diff --git a/autogen.sh b/autogen.sh
index a2d3731..04a26d9 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