diff --git a/ChangeLog b/ChangeLog index b0ae7447..3c38e99e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2002-04-25 Akim Demaille + + * lib/autoconf/general.m4 (_AC_INIT_DEFAULTS): Let ac_subst_files + and ac_subst_vars be sh variables containing the list of + AC_SUBST_FILES'ed and AC_SUBST'ed identifiers. Output them in the + DEFAULT diversion. + (_AC_INIT_PREPARE): Use them to log them. + (_AC_SUBST, _AC_SUBST_SED_PROGRAM): Remove. + (AC_SUBST, AC_SUBST_FILE): Instead of buliding the + _AC_SUBST_SED_PROGRAM, store the list of output files/variables in + _AC_SUBST_FILES and _AC_SUBST_VARS. + * lib/autoconf/status.m4 (_AC_OUTPUT_FILES): Adjust. + 2002-04-24 Akim Demaille * bin/autoreconf.in (autoreconf): Run automake after autoconf and diff --git a/NEWS b/NEWS index 7012f2b4..6c44c329 100644 --- a/NEWS +++ b/NEWS @@ -31,6 +31,13 @@ - GNATS The GNATS base has moved to http://bugs.gnu.org/cgi-bin/gnatsweb.pl?database=autoconf + +** Misc. + +- config.log + Now contains the list of ouput variables and files (AC_SUBST, + AC_SUBST_FILES). + * Major changes in Autoconf 2.53 diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index 1e59ea9f..72433dfa 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -468,6 +468,9 @@ AC_SUBST([PACKAGE_BUGREPORT], [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])])dnl m4_divert_pop([DEFAULTS])dnl +m4_wrap([m4_divert_text([DEFAULTS], +[ac_subst_vars='m4_ifdef([_AC_SUBST_VARS], [m4_defn([_AC_SUBST_VARS])])' +ac_subst_files='m4_ifdef([_AC_SUBST_FILES], [m4_defn([_AC_SUBST_FILES])])'])])dnl ])# _AC_INIT_DEFAULTS @@ -1161,6 +1164,7 @@ trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo + AS_BOX([Cache variables.]) echo m4_bpatsubsts(m4_defn([_AC_CACHE_DUMP]), @@ -1168,10 +1172,31 @@ trap 'exit_status=$? ], [], ['], ['"'"']) echo + + AS_BOX([Output variables.]) + echo + for ac_var in $ac_subst_vars + do + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" + done | sort + echo + + if test -n "$ac_subst_files"; then + AS_BOX([Output files.]) + echo + for ac_var in $ac_subst_files + do + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" + done | sort + echo + fi + if test -s confdefs.h; then AS_BOX([confdefs.h.]) echo - sed "/^$/d" confdefs.h + sed "/^$/d" confdefs.h | sort echo fi test "$ac_signal" != 0 && @@ -1825,20 +1850,6 @@ _ACEOF ## -------------------------- ## -# _AC_SUBST(VARIABLE, PROGRAM) -# ---------------------------- -# If VARIABLE has not already been AC_SUBST'ed, append the sed PROGRAM -# to `_AC_SUBST_SED_PROGRAM'. -m4_define([_AC_SUBST], -[m4_expand_once([m4_append([_AC_SUBST_SED_PROGRAM], -[$2 -])])dnl -]) - -# Initialize. -m4_define([_AC_SUBST_SED_PROGRAM]) - - # AC_SUBST(VARIABLE, [VALUE]) # --------------------------- # Create an output variable from a shell VARIABLE. If VALUE is given @@ -1849,7 +1860,7 @@ m4_define([_AC_SUBST_SED_PROGRAM]) # sed script at the top of _AC_OUTPUT_FILES. m4_define([AC_SUBST], [m4_ifvaln([$2], [$1=$2])[]dnl -_AC_SUBST([$1], [s,@$1@,[$]$1,;t t])dnl +m4_append_uniq([_AC_SUBST_VARS], [$1], [ ])dnl ])# AC_SUBST @@ -1857,8 +1868,7 @@ _AC_SUBST([$1], [s,@$1@,[$]$1,;t t])dnl # ----------------------- # Read the comments of the preceding macro. m4_define([AC_SUBST_FILE], -[_AC_SUBST([$1], [/@$1@/r [$]$1 -s,@$1@,,;t t])]) +[m4_append_uniq([_AC_SUBST_FILES], [$1], [ ])]) diff --git a/lib/autoconf/status.m4 b/lib/autoconf/status.m4 index 5260fb73..dd59671a 100644 --- a/lib/autoconf/status.m4 +++ b/lib/autoconf/status.m4 @@ -862,7 +862,15 @@ dnl the other too. dnl These here document variables are unquoted when configure runs dnl but quoted when config.status runs, so variables are expanded once. dnl Insert the sed substitutions of variables. -_AC_SUBST_SED_PROGRAM()dnl +m4_ifdef([_AC_SUBST_VARS], + [AC_FOREACH([AC_Var], m4_defn([_AC_SUBST_VARS]), +[s,@AC_Var@,$AC_Var,;t t +])])dnl +m4_ifdef([_AC_SUBST_FILES], + [AC_FOREACH([AC_Var], m4_defn([_AC_SUBST_FILES]), +[/@AC_Var@/r $AC_Var +s,@AC_Var@,,;t t +])])dnl CEOF _ACEOF