2005-06-29 Stepan Kasal
* lib/autoconf/general.m4 (AC_SUBST_TRACE): New macro, to be traced instead of AC_SUBST; proposed by Alexandre Duret-Lutz. (AC_SUBST): Call it. * lib/autoconf/status.m4 (_AC_OUTPUT_FILES): Call AC_SUBST_TRACE for the directory specific variables; but don't call it for configure_input. Index: lib/autoconf/general.m4 =================================================================== RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/general.m4,v retrieving revision 1.869 diff -u -r1.869 general.m4 --- lib/autoconf/general.m4 29 Jun 2005 06:37:48 -0000 1.869 +++ lib/autoconf/general.m4 29 Jun 2005 08:13:12 -0000 @@ -1960,6 +1960,12 @@ ## -------------------------- ## +# AC_SUBST_TRACE(VARIABLE) +# ------------------------ +# This macro is used with --trace to collect the list of substituted variables. +m4_define([AC_SUBST_TRACE]) + + # AC_SUBST(VARIABLE, [VALUE]) # --------------------------- # Create an output variable from a shell VARIABLE. If VALUE is given @@ -1969,7 +1975,8 @@ # Beware that if you change this macro, you also have to change the # sed script at the top of _AC_OUTPUT_FILES. m4_define([AC_SUBST], -[m4_pattern_allow([^$1$])dnl +[AC_SUBST_TRACE([$1])dnl +m4_pattern_allow([^$1$])dnl m4_ifvaln([$2], [$1=$2])[]dnl m4_append_uniq([_AC_SUBST_VARS], [$1], [ ])dnl Index: lib/autoconf/status.m4 =================================================================== RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/status.m4,v retrieving revision 1.63 diff -u -r1.63 status.m4 --- lib/autoconf/status.m4 21 Jun 2005 16:03:59 -0000 1.63 +++ lib/autoconf/status.m4 29 Jun 2005 08:13:12 -0000 @@ -1044,16 +1044,14 @@ cat >>$CONFIG_STATUS <<\_ACEOF :t [/@[a-zA-Z_][a-zA-Z_0-9]*@/!b] +dnl configure_input is a somewhat special, so we don't call AC_SUBST_TRACE. s|@configure_input@|$configure_input|;t t -s|@srcdir@|$ac_srcdir|;t t -s|@abs_srcdir@|$ac_abs_srcdir|;t t -s|@top_srcdir@|$ac_top_srcdir|;t t -s|@abs_top_srcdir@|$ac_abs_top_srcdir|;t t -s|@builddir@|$ac_builddir|;t t -s|@abs_builddir@|$ac_abs_builddir|;t t -s|@top_builddir@|$ac_top_builddir_sub|;t t -s|@abs_top_builddir@|$ac_abs_top_builddir|;t t -AC_PROVIDE_IFELSE([AC_PROG_INSTALL], [s,@INSTALL@,$ac_INSTALL,;t t +dnl During the transition period, this is a special case: +s|@top_builddir@|$ac_top_builddir_sub|;t t[]AC_SUBST_TRACE([top_builddir]) +m4_foreach([_AC_Var], [srcdir, abs_srcdir, top_srcdir, abs_top_srcdir, + builddir, abs_builddir, + abs_top_builddir]AC_PROVIDE_IFELSE([AC_PROG_INSTALL], [[, INSTALL]]), + [s|@_AC_Var@|$ac_[]_AC_Var|;t t[]AC_SUBST_TRACE(_AC_Var) ])dnl " $ac_file_inputs m4_defn([_AC_SED_CMDS])>$tmp/out m4_popdef([_AC_SED_CMDS])dnl