Index: autogen.sh =================================================================== RCS file: /home/freeciv/CVS/freeciv/autogen.sh,v retrieving revision 1.4 diff -u -r1.4 autogen.sh --- autogen.sh 2002/05/14 21:03:08 1.4 +++ autogen.sh 2002/05/16 12:38:14 @@ -8,15 +8,20 @@ # Uncomment the line below to debug this file #DEBUG=defined -USE_NLS=yes +FC_USE_NLS=yes # Leave out NLS checks for NAME in $@ ; do if test "x$NAME" = "x--disable-nls"; then echo "+ nls checks disabled" - USE_NLS=no - break + FC_USE_NLS=no fi + if test "x$NAME" = "x--disable-autoconf2.52"; then + echo "+ forcing old autoconf configuration" + FC_USE_NEWAUTOCONF=no + else + FC_NEWARGLINE="$FC_NEWARGLINE $NAME" + fi done debug () @@ -114,15 +119,23 @@ # x.252 is autoconf 2.52 compatible version of this macro, while x.213 is # the original autoconf 2.13 version; we must suppose 2.52 by default here cp m4/x.252 m4/x.m4 + +if [ "x$FC_USE_NEWAUTOCONF" != "xno" ] && test -f configure.old2; then + mv configure.old2 configure.ac +fi +if [ "x$FC_USE_NEWAUTOCONF" == "xno" ] && test -f configure.ac; then + mv configure.ac configure.old2 +fi -version_check 0 "autoconf" "ftp://ftp.gnu.org/pub/gnu/autoconf/" 2 52 || { +(test -z "$FC_USE_NEWAUTOCONF" \ + && version_check 0 "autoconf" "ftp://ftp.gnu.org/pub/gnu/autoconf/" 2 52) || { mv configure.old configure.in mv acconfig.old acconfig.h cp m4/x.213 m4/x.m4 version_check 1 "autoconf" "ftp://ftp.gnu.org/pub/gnu/autoconf/" 2 13 || DIE=1 } version_check 1 "automake" "ftp://ftp.gnu.org/pub/gnu/automake/" 1 4 || DIE=1 -if [ "$USE_NLS" = "yes" ] ; then +if [ "$FC_USE_NLS" = "yes" ] ; then DIE2=0 version_check 1 "xgettext" "ftp://ftp.gnu.org/pub/gnu/gettext/" 0 10 38 || DIE2=1 version_check 1 "msgfmt" "ftp://ftp.gnu.org/pub/gnu/gettext/" 0 10 38 || DIE2=1 @@ -138,6 +151,10 @@ exit 1 fi +if [ "x$FC_USE_NEWAUTOCONF" != "xno" ] ; then + echo "+ using new autoconf configuration (use --disable-autoconf2.52 to use old)" +fi + echo "+ creating acinclude.m4" cat m4/*.m4 > acinclude.m4 @@ -173,15 +190,15 @@ echo "+ running configure ... " echo -if test -z "$*"; then +if test -z "$FC_NEWARGLINE"; then echo "I am going to run ./configure with no arguments - if you wish " echo "to pass any to it, please specify them on the $0 command line." else - echo "using: $@" + echo "using: $FC_NEWARGLINE" fi echo -./configure "$@" || { +./configure $FC_NEWARGLINE || { echo echo "configure failed" exit 1 @@ -189,3 +206,14 @@ echo echo "Now type 'make' to compile $package." + +# Reverse changes to make tree sane +test -f configure.old && { + mv configure.old configure.in +} +test -f configure.old2 && { + mv configure.old2 configure.ac +} +test -f acconfig.old && { + mv acconfig.old acconfig.h +}