From: Guido Trotter Date: Tue, 12 Oct 2010 15:30:50 +0000 (+0100) Subject: Require aclocal 1.11.1 or above for autogen.sh X-Git-Tag: v2.2.1rc1~1^2~3 X-Git-Url: http://git.ganeti.org/?p=ganeti-github.git;a=commitdiff_plain;h=dbc4dda7f5b66c9905c3cf6e44414536a5b38177 Require aclocal 1.11.1 or above for autogen.sh 1.11.1 is the version in squeeze and lucid, and we know it works. We also know that 1.10.1 in hardy and lenny doesn't, nor do 1.10 in etch and 1.9.6 in dapper. We haven't tested any other version. With older versions python.m4 is buggy, and results in the package being built not working on python 2.6 (which uses dist-packages rather than site-packages as a module directory). The autogen.sh interpreter is changed to bash, as we need to use the [[ builtin to compare versions with "<". [ doesn't have that functionality, and we can't of course rely on dpkg, which won't be installed on all distributions. Signed-off-by: Guido Trotter Reviewed-by: Iustin Pop --- diff --git a/autogen.sh b/autogen.sh index 286d0fa..0462038 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash if test ! -f configure.ac ; then echo "You must execute this script from the top level directory." @@ -9,6 +9,14 @@ set -e rm -rf config.cache autom4te.cache +ACLOCAL_VERSION=$(${ACLOCAL:-aclocal} --version | head -1 | \ + sed -e 's/^[^0-9]*\([0-9\.]*\)$/\1/') + +if [[ "$ACLOCAL_VERSION" < "1.11.1" ]]; then + echo "aclocal version $ACLOCAL_VERSION is too old (< 1.11.1)" + exit 1 +fi + ${ACLOCAL:-aclocal} -I autotools ${AUTOCONF:-autoconf} ${AUTOMAKE:-automake} --add-missing