From: Akim Demaille Date: Tue, 23 May 2000 09:52:05 +0000 (+0000) Subject: Load the additions *before* running AC_INIT. X-Git-Tag: autoconf-2.50~884 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bbd3b7f40cc56c18c5cef04db456f5e5fb737d43;p=thirdparty%2Fautoconf.git Load the additions *before* running AC_INIT. This is important if you want to redefine AC_INIT or some of its sub macros (eeerk!), or if you want to use user defined macros before AC_INIT. Suggested by Didier Verna. * acgeneral.m4 (_AC_INIT): Don't include `acsite.m4' and `aclocal.m4'. * autoconf.sh (run_m4, run_m4f): Do it. --- diff --git a/ChangeLog b/ChangeLog index 1fa262d3a..75c7f0b2b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2000-05-22 Akim Demaille + + Load the additions *before* running AC_INIT. + This is important if you want to redefine AC_INIT or some of its + sub macros (eeerk!), or if you want to use user defined macros + before AC_INIT. + Suggested by Didier Verna. + + * acgeneral.m4 (_AC_INIT): Don't include `acsite.m4' and + `aclocal.m4'. + * autoconf.sh (run_m4, run_m4f): Do it. + 2000-05-22 Akim Demaille Reading the ChangeLog revealed that the recent update of diff --git a/THANKS b/THANKS index 1593cb9c5..5c13db352 100644 --- a/THANKS +++ b/THANKS @@ -24,7 +24,7 @@ Cort Dougan cort@cs.nmt.edu Dave Adams adams@hpesdwa.fc.hp.com Dave Love fx@gnu.org Didier Desseaux didess@infonie.fr -Didier Verna verna@inf.enst.fr +Didier Verna didier@xemacs.org Dietmar P. Schindler schd@mra.man.de Doug Evans dje@canuck.cygnus.com Eli Zaretskii eliz@gnu.org diff --git a/acgeneral.m4 b/acgeneral.m4 index 0221d8b38..7618cfb41 100644 --- a/acgeneral.m4 +++ b/acgeneral.m4 @@ -1577,9 +1577,7 @@ AC_DIVERT_POP()dnl # Include the user macro files, prepare the diversions, and output the # preamble of the `configure' script. define([_AC_INIT], -[m4_sinclude(acsite.m4)dnl -m4_sinclude(./aclocal.m4)dnl -AC_DIVERT([BINSH], [@%:@! /bin/sh]) +[AC_DIVERT([BINSH], [@%:@! /bin/sh]) _AC_INIT_DEFAULTS()dnl AC_DIVERT_POP()dnl to NORMAL _AC_INIT_PARSE_ARGS diff --git a/autoconf.in b/autoconf.in index 31d7cfccd..46e2472e1 100644 --- a/autoconf.in +++ b/autoconf.in @@ -105,7 +105,7 @@ esac debug=false # Trace Autoconf's initialization? initialization=false -localdir= +localdir=. outfile= # Exit status. status=0 @@ -231,9 +231,11 @@ $debug || } # Running m4. -test -n "$localdir" && use_localdir="-I$localdir" -run_m4="$M4 $use_localdir -I $AC_MACRODIR autoconf.m4" -run_m4f="$M4 $use_localdir --reload $AC_MACRODIR/autoconf.m4f" +test -f "$AC_MACRODIR/acsite.m4" && acsite_m4="$AC_MACRODIR/acsite.m4" +test -f "$localdir/aclocal.m4" && aclocal_m4="$localdir/aclocal.m4" +m4_common="$acsite_m4 $aclocal_m4 -I $AC_MACRODIR -I $localdir" +run_m4="$M4 $AC_MACRODIR/autoconf.m4 $m4_common" +run_m4f="$M4 --reload $AC_MACRODIR/autoconf.m4f $m4_common" # Find the input file. case $# in diff --git a/autoconf.sh b/autoconf.sh index 31d7cfccd..46e2472e1 100644 --- a/autoconf.sh +++ b/autoconf.sh @@ -105,7 +105,7 @@ esac debug=false # Trace Autoconf's initialization? initialization=false -localdir= +localdir=. outfile= # Exit status. status=0 @@ -231,9 +231,11 @@ $debug || } # Running m4. -test -n "$localdir" && use_localdir="-I$localdir" -run_m4="$M4 $use_localdir -I $AC_MACRODIR autoconf.m4" -run_m4f="$M4 $use_localdir --reload $AC_MACRODIR/autoconf.m4f" +test -f "$AC_MACRODIR/acsite.m4" && acsite_m4="$AC_MACRODIR/acsite.m4" +test -f "$localdir/aclocal.m4" && aclocal_m4="$localdir/aclocal.m4" +m4_common="$acsite_m4 $aclocal_m4 -I $AC_MACRODIR -I $localdir" +run_m4="$M4 $AC_MACRODIR/autoconf.m4 $m4_common" +run_m4f="$M4 --reload $AC_MACRODIR/autoconf.m4f $m4_common" # Find the input file. case $# in diff --git a/bin/autoconf.in b/bin/autoconf.in index 31d7cfccd..46e2472e1 100644 --- a/bin/autoconf.in +++ b/bin/autoconf.in @@ -105,7 +105,7 @@ esac debug=false # Trace Autoconf's initialization? initialization=false -localdir= +localdir=. outfile= # Exit status. status=0 @@ -231,9 +231,11 @@ $debug || } # Running m4. -test -n "$localdir" && use_localdir="-I$localdir" -run_m4="$M4 $use_localdir -I $AC_MACRODIR autoconf.m4" -run_m4f="$M4 $use_localdir --reload $AC_MACRODIR/autoconf.m4f" +test -f "$AC_MACRODIR/acsite.m4" && acsite_m4="$AC_MACRODIR/acsite.m4" +test -f "$localdir/aclocal.m4" && aclocal_m4="$localdir/aclocal.m4" +m4_common="$acsite_m4 $aclocal_m4 -I $AC_MACRODIR -I $localdir" +run_m4="$M4 $AC_MACRODIR/autoconf.m4 $m4_common" +run_m4f="$M4 --reload $AC_MACRODIR/autoconf.m4f $m4_common" # Find the input file. case $# in diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index 0221d8b38..7618cfb41 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -1577,9 +1577,7 @@ AC_DIVERT_POP()dnl # Include the user macro files, prepare the diversions, and output the # preamble of the `configure' script. define([_AC_INIT], -[m4_sinclude(acsite.m4)dnl -m4_sinclude(./aclocal.m4)dnl -AC_DIVERT([BINSH], [@%:@! /bin/sh]) +[AC_DIVERT([BINSH], [@%:@! /bin/sh]) _AC_INIT_DEFAULTS()dnl AC_DIVERT_POP()dnl to NORMAL _AC_INIT_PARSE_ARGS