From 3d5c352290a88330b07a0698b53fa48a19d3b0db Mon Sep 17 00:00:00 2001 From: rocky Date: Mon, 29 Nov 2004 02:50:21 +0000 Subject: [PATCH] Make sure we have automake version 1.6 or greater. Problem reported by C.Y.M --- autogen.sh | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/autogen.sh b/autogen.sh index f15f332e..ac3760c5 100755 --- a/autogen.sh +++ b/autogen.sh @@ -37,22 +37,20 @@ grep "^AM_GNU_GETTEXT" $srcdir/configure.ac >/dev/null && { (automake --version) < /dev/null > /dev/null 2>&1 || { echo - echo "**Error**: You must have \`automake' installed." - echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz" - echo "(or a newer version if it is available)" - DIE=1 - NO_AUTOMAKE=yes } -# if no automake, don't bother testing for aclocal -test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || { - echo - echo "**Error**: Missing \`aclocal'. The version of \`automake'" - echo "installed doesn't appear recent enough." - echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz" - echo "(or a newer version if it is available)" - DIE=1 -} +if automake --version > /dev/null 2>&1; then + case "`automake --version | sed -e '1s/[^0-9]*//' -e q`" in + 1.[6789]|1.[6789][-.]*) + ;; + 0|0.*|1|1.[012345]|1.[012345][-.]*|*) + echo "**Error**: You must have \`automake' 1.6 or greater installed." + echo "Get it from ftp://ftp.gnu.org/pub/gnu/automake" + DIE=1 + NO_AUTOMAKE=yes + ;; + esac +fi if test "$DIE" -eq 1; then exit 1