Make the "Warning" notice a LOT more prominent.
[oota-llvm.git] / autoconf / AutoRegen.sh
1 #!/bin/sh
2 die () {
3         echo "$@" 1>&2
4         exit 1
5 }
6 test -d autoconf && test -f autoconf/configure.ac && cd autoconf
7 test -f configure.ac || die "Can't find 'autoconf' dir; please cd into it first"
8 autoconf --version | egrep '2\.59' > /dev/null
9 if test $? -ne 0 ; then
10   die "Your autoconf was not detected as being 2.59"
11 fi
12 aclocal --version | egrep '1\.9\.1' > /dev/null
13 if test $? -ne 0 ; then
14   die "Your aclocal was not detected as being 1.9.1"
15 fi
16 autoheader --version | egrep '2\.59' > /dev/null
17 if test $? -ne 0 ; then
18   die "Your autoheader was not detected as being 2.59"
19 fi
20 libtool --version | grep '1.5.10' > /dev/null
21 if test $? -ne 0 ; then
22   die "Your libtool was not detected as being 1.5.10"
23 fi
24 echo ""
25 echo "### NOTE: ############################################################"
26 echo "### If you get *any* warnings from autoconf below other than warnings"
27 echo "### about 'AC_CONFIG_SUBDIRS: you should use literals', you MUST fix"
28 echo "### the scripts in the m4 directory because there are future forward"
29 echo "### compatibility or platform support issues at risk. Please do NOT"
30 echo "### commit any configure.ac or configure script that was generated "
31 echo "### with warnings present."
32 echo "######################################################################"
33 echo ""
34 echo "Regenerating aclocal.m4 with aclocal"
35 cwd=`pwd`
36 aclocal --force -I $cwd/m4 || die "aclocal failed"
37 echo "Regenerating configure with autoconf 2.5x"
38 autoconf --force --warnings=all -o ../configure configure.ac || die "autoconf failed"
39 cd ..
40 echo "Regenerating config.h.in with autoheader 2.5x"
41 autoheader -I autoconf -I autoconf/m4 autoconf/configure.ac || die "autoheader failed"
42 exit 0