blob: 3dca38673718189085f0fbd64940f3a91dc30c93 [file] [log] [blame]
Brian Gaeke4940c572004-02-08 07:44:48 +00001#!/bin/sh
2die () {
3 echo "$@" 1>&2
4 exit 1
5}
Gabor Greiff70414f2007-07-13 09:48:29 +00006
7### NOTE: ############################################################"
8### The below two variables specify the auto* versions
9### periods should be escaped with backslash, for use by grep
10want_autoconf_version='2\.60'
11want_autoheader_version=$want_autoconf_version
12### END NOTE #########################################################"
13
14
Reid Spencerd00b82e2004-12-22 05:56:41 +000015outfile=configure
16configfile=configure.ac
Gabor Greiff70414f2007-07-13 09:48:29 +000017
18want_autoconf_version_clean=`echo $want_autoconf_version | sed -e 's/\\\\//g'`
19want_autoheader_version_clean=`echo $want_autoheader_version | sed -e 's/\\\\//g'`
20
Reid Spencer6843e382004-10-08 05:33:35 +000021test -d autoconf && test -f autoconf/$configfile && cd autoconf
22test -f $configfile || die "Can't find 'autoconf' dir; please cd into it first"
Gabor Greiff70414f2007-07-13 09:48:29 +000023autoconf --version | grep $want_autoconf_version > /dev/null
24test $? -eq 0 || die "Your autoconf was not detected as being $want_autoconf_version_clean"
Reid Spencera773bd52006-08-04 18:18:08 +000025aclocal --version | grep '^aclocal.*1\.9\.6' > /dev/null
26test $? -eq 0 || die "Your aclocal was not detected as being 1.9.6"
Gabor Greiff70414f2007-07-13 09:48:29 +000027autoheader --version | grep '^autoheader.*'$want_autoheader_version > /dev/null
28test $? -eq 0 || die "Your autoheader was not detected as being $want_autoheader_version_clean"
Reid Spencera773bd52006-08-04 18:18:08 +000029libtool --version | grep '1\.5\.22' > /dev/null
30test $? -eq 0 || die "Your libtool was not detected as being 1.5.22"
Reid Spencer8eacb0c2004-09-19 22:30:53 +000031echo ""
32echo "### NOTE: ############################################################"
Reid Spencer5d6c4a52004-09-21 17:13:23 +000033echo "### If you get *any* warnings from autoconf below you MUST fix the"
34echo "### scripts in the m4 directory because there are future forward"
Reid Spencer8eacb0c2004-09-19 22:30:53 +000035echo "### compatibility or platform support issues at risk. Please do NOT"
Reid Spencer6843e382004-10-08 05:33:35 +000036echo "### commit any configure script that was generated with warnings"
37echo "### present. You should get just three 'Regenerating..' lines."
Reid Spencer8eacb0c2004-09-19 22:30:53 +000038echo "######################################################################"
39echo ""
Reid Spencera773bd52006-08-04 18:18:08 +000040echo "Regenerating aclocal.m4 with aclocal 1.9.6"
Reid Spencerdcd38752004-09-07 16:00:48 +000041cwd=`pwd`
Reid Spencerb03adb82004-09-19 22:14:24 +000042aclocal --force -I $cwd/m4 || die "aclocal failed"
Gabor Greiff70414f2007-07-13 09:48:29 +000043echo "Regenerating configure with autoconf $want_autoconf_version_clean"
Reid Spencer6843e382004-10-08 05:33:35 +000044autoconf --force --warnings=all -o ../$outfile $configfile || die "autoconf failed"
Brian Gaeke4940c572004-02-08 07:44:48 +000045cd ..
Gabor Greiff70414f2007-07-13 09:48:29 +000046echo "Regenerating config.h.in with autoheader $want_autoheader_version_clean"
Reid Spencerabec8f92004-10-27 23:03:44 +000047autoheader --warnings=all -I autoconf -I autoconf/m4 autoconf/$configfile || die "autoheader failed"
Brian Gaeke4940c572004-02-08 07:44:48 +000048exit 0