Require aclocal 1.11.1 or above for autogen.sh
[ganeti-github.git] / autogen.sh
1 #!/bin/bash
2
3 if test ! -f configure.ac ; then
4 echo "You must execute this script from the top level directory."
5 exit 1
6 fi
7
8 set -e
9
10 rm -rf config.cache autom4te.cache
11
12 ACLOCAL_VERSION=$(${ACLOCAL:-aclocal} --version | head -1 | \
13 sed -e 's/^[^0-9]*\([0-9\.]*\)$/\1/')
14
15 if [[ "$ACLOCAL_VERSION" < "1.11.1" ]]; then
16 echo "aclocal version $ACLOCAL_VERSION is too old (< 1.11.1)"
17 exit 1
18 fi
19
20 ${ACLOCAL:-aclocal} -I autotools
21 ${AUTOCONF:-autoconf}
22 ${AUTOMAKE:-automake} --add-missing
23
24 rm -rf autom4te.cache