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 | } |
Gabor Greif | f70414f | 2007-07-13 09:48:29 +0000 | [diff] [blame^] | 6 | |
| 7 | ### NOTE: ############################################################" |
| 8 | ### The below two variables specify the auto* versions |
| 9 | ### periods should be escaped with backslash, for use by grep |
| 10 | want_autoconf_version='2\.60' |
| 11 | want_autoheader_version=$want_autoconf_version |
| 12 | ### END NOTE #########################################################" |
| 13 | |
| 14 | |
Reid Spencer | d00b82e | 2004-12-22 05:56:41 +0000 | [diff] [blame] | 15 | outfile=configure |
| 16 | configfile=configure.ac |
Gabor Greif | f70414f | 2007-07-13 09:48:29 +0000 | [diff] [blame^] | 17 | |
| 18 | want_autoconf_version_clean=`echo $want_autoconf_version | sed -e 's/\\\\//g'` |
| 19 | want_autoheader_version_clean=`echo $want_autoheader_version | sed -e 's/\\\\//g'` |
| 20 | |
Reid Spencer | 6843e38 | 2004-10-08 05:33:35 +0000 | [diff] [blame] | 21 | test -d autoconf && test -f autoconf/$configfile && cd autoconf |
| 22 | test -f $configfile || die "Can't find 'autoconf' dir; please cd into it first" |
Gabor Greif | f70414f | 2007-07-13 09:48:29 +0000 | [diff] [blame^] | 23 | autoconf --version | grep $want_autoconf_version > /dev/null |
| 24 | test $? -eq 0 || die "Your autoconf was not detected as being $want_autoconf_version_clean" |
Reid Spencer | a773bd5 | 2006-08-04 18:18:08 +0000 | [diff] [blame] | 25 | aclocal --version | grep '^aclocal.*1\.9\.6' > /dev/null |
| 26 | test $? -eq 0 || die "Your aclocal was not detected as being 1.9.6" |
Gabor Greif | f70414f | 2007-07-13 09:48:29 +0000 | [diff] [blame^] | 27 | autoheader --version | grep '^autoheader.*'$want_autoheader_version > /dev/null |
| 28 | test $? -eq 0 || die "Your autoheader was not detected as being $want_autoheader_version_clean" |
Reid Spencer | a773bd5 | 2006-08-04 18:18:08 +0000 | [diff] [blame] | 29 | libtool --version | grep '1\.5\.22' > /dev/null |
| 30 | test $? -eq 0 || die "Your libtool was not detected as being 1.5.22" |
Reid Spencer | 8eacb0c | 2004-09-19 22:30:53 +0000 | [diff] [blame] | 31 | echo "" |
| 32 | echo "### NOTE: ############################################################" |
Reid Spencer | 5d6c4a5 | 2004-09-21 17:13:23 +0000 | [diff] [blame] | 33 | echo "### If you get *any* warnings from autoconf below you MUST fix the" |
| 34 | echo "### scripts in the m4 directory because there are future forward" |
Reid Spencer | 8eacb0c | 2004-09-19 22:30:53 +0000 | [diff] [blame] | 35 | echo "### compatibility or platform support issues at risk. Please do NOT" |
Reid Spencer | 6843e38 | 2004-10-08 05:33:35 +0000 | [diff] [blame] | 36 | echo "### commit any configure script that was generated with warnings" |
| 37 | echo "### present. You should get just three 'Regenerating..' lines." |
Reid Spencer | 8eacb0c | 2004-09-19 22:30:53 +0000 | [diff] [blame] | 38 | echo "######################################################################" |
| 39 | echo "" |
Reid Spencer | a773bd5 | 2006-08-04 18:18:08 +0000 | [diff] [blame] | 40 | echo "Regenerating aclocal.m4 with aclocal 1.9.6" |
Reid Spencer | dcd3875 | 2004-09-07 16:00:48 +0000 | [diff] [blame] | 41 | cwd=`pwd` |
Reid Spencer | b03adb8 | 2004-09-19 22:14:24 +0000 | [diff] [blame] | 42 | aclocal --force -I $cwd/m4 || die "aclocal failed" |
Gabor Greif | f70414f | 2007-07-13 09:48:29 +0000 | [diff] [blame^] | 43 | echo "Regenerating configure with autoconf $want_autoconf_version_clean" |
Reid Spencer | 6843e38 | 2004-10-08 05:33:35 +0000 | [diff] [blame] | 44 | autoconf --force --warnings=all -o ../$outfile $configfile || die "autoconf failed" |
Brian Gaeke | 4940c57 | 2004-02-08 07:44:48 +0000 | [diff] [blame] | 45 | cd .. |
Gabor Greif | f70414f | 2007-07-13 09:48:29 +0000 | [diff] [blame^] | 46 | echo "Regenerating config.h.in with autoheader $want_autoheader_version_clean" |
Reid Spencer | abec8f9 | 2004-10-27 23:03:44 +0000 | [diff] [blame] | 47 | 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] | 48 | exit 0 |