| Brian Gaeke | 4940c57 | 2004-02-08 07:44:48 +0000 | [diff] [blame] | 1 | #!/bin/sh | 
 | 2 | die () { | 
 | 3 | 	echo "$@" 1>&2 | 
 | 4 | 	exit 1 | 
 | 5 | } | 
| Reid Spencer | 6843e38 | 2004-10-08 05:33:35 +0000 | [diff] [blame] | 6 | if test "$1" = --with-automake ; then | 
 | 7 |   outfile=configure_am | 
 | 8 |   configfile=configure.am | 
 | 9 |   with_automake=1 | 
| Reid Spencer | 2b6c038 | 2004-10-10 19:09:33 +0000 | [diff] [blame] | 10 | elif test -z "$1" ; then | 
| Reid Spencer | 6843e38 | 2004-10-08 05:33:35 +0000 | [diff] [blame] | 11 |   outfile=configure | 
 | 12 |   configfile=configure.ac | 
 | 13 |   with_automake=0 | 
| Reid Spencer | 2b6c038 | 2004-10-10 19:09:33 +0000 | [diff] [blame] | 14 | else | 
 | 15 |   die "Invalid option: $1" | 
| Reid Spencer | 6843e38 | 2004-10-08 05:33:35 +0000 | [diff] [blame] | 16 | fi | 
 | 17 | test -d autoconf && test -f autoconf/$configfile && cd autoconf | 
 | 18 | test -f $configfile || die "Can't find 'autoconf' dir; please cd into it first" | 
| Reid Spencer | b03adb8 | 2004-09-19 22:14:24 +0000 | [diff] [blame] | 19 | autoconf --version | egrep '2\.59' > /dev/null | 
 | 20 | if test $? -ne 0 ; then | 
 | 21 |   die "Your autoconf was not detected as being 2.59" | 
 | 22 | fi | 
| Reid Spencer | 6843e38 | 2004-10-08 05:33:35 +0000 | [diff] [blame] | 23 | aclocal --version | egrep '1\.9\.2' > /dev/null | 
| Reid Spencer | b03adb8 | 2004-09-19 22:14:24 +0000 | [diff] [blame] | 24 | if test $? -ne 0 ; then | 
| Reid Spencer | 6bc488b | 2004-10-13 00:18:58 +0000 | [diff] [blame] | 25 |   die "Your aclocal was not detected as being 1.9.2" | 
| Reid Spencer | b03adb8 | 2004-09-19 22:14:24 +0000 | [diff] [blame] | 26 | fi | 
 | 27 | autoheader --version | egrep '2\.59' > /dev/null | 
 | 28 | if test $? -ne 0 ; then | 
 | 29 |   die "Your autoheader was not detected as being 2.59" | 
 | 30 | fi | 
| Reid Spencer | 6bc488b | 2004-10-13 00:18:58 +0000 | [diff] [blame] | 31 | libtool --version | grep '1\.5\.10' > /dev/null | 
| Reid Spencer | b03adb8 | 2004-09-19 22:14:24 +0000 | [diff] [blame] | 32 | if test $? -ne 0 ; then | 
 | 33 |   die "Your libtool was not detected as being 1.5.10" | 
| Brian Gaeke | 4940c57 | 2004-02-08 07:44:48 +0000 | [diff] [blame] | 34 | fi | 
| Reid Spencer | 8eacb0c | 2004-09-19 22:30:53 +0000 | [diff] [blame] | 35 | echo "" | 
 | 36 | echo "### NOTE: ############################################################" | 
| Reid Spencer | 5d6c4a5 | 2004-09-21 17:13:23 +0000 | [diff] [blame] | 37 | echo "### If you get *any* warnings from autoconf below you MUST fix the" | 
 | 38 | echo "### scripts in the m4 directory because there are future forward" | 
| Reid Spencer | 8eacb0c | 2004-09-19 22:30:53 +0000 | [diff] [blame] | 39 | echo "### compatibility or platform support issues at risk. Please do NOT" | 
| Reid Spencer | 6843e38 | 2004-10-08 05:33:35 +0000 | [diff] [blame] | 40 | echo "### commit any configure script that was generated with warnings" | 
 | 41 | echo "### present. You should get just three 'Regenerating..' lines." | 
| Reid Spencer | 8eacb0c | 2004-09-19 22:30:53 +0000 | [diff] [blame] | 42 | echo "######################################################################" | 
 | 43 | echo "" | 
| Reid Spencer | 6bc488b | 2004-10-13 00:18:58 +0000 | [diff] [blame] | 44 | echo "Regenerating aclocal.m4 with aclocal 1.9.2" | 
| Reid Spencer | dcd3875 | 2004-09-07 16:00:48 +0000 | [diff] [blame] | 45 | cwd=`pwd` | 
| Reid Spencer | b03adb8 | 2004-09-19 22:14:24 +0000 | [diff] [blame] | 46 | aclocal --force -I $cwd/m4 || die "aclocal failed" | 
| Reid Spencer | 6843e38 | 2004-10-08 05:33:35 +0000 | [diff] [blame] | 47 | echo "Regenerating configure with autoconf 2.59" | 
 | 48 | autoconf --force --warnings=all -o ../$outfile $configfile || die "autoconf failed" | 
| Brian Gaeke | 4940c57 | 2004-02-08 07:44:48 +0000 | [diff] [blame] | 49 | cd .. | 
| Reid Spencer | 6843e38 | 2004-10-08 05:33:35 +0000 | [diff] [blame] | 50 | echo "Regenerating config.h.in with autoheader 2.59" | 
| Reid Spencer | abec8f9 | 2004-10-27 23:03:44 +0000 | [diff] [blame] | 51 | autoheader --warnings=all -I autoconf -I autoconf/m4 autoconf/$configfile || die "autoheader failed" | 
| Brian Gaeke | 4940c57 | 2004-02-08 07:44:48 +0000 | [diff] [blame] | 52 | exit 0 |