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