[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FYI: AC_SUBST in config.log!
From: |
Akim Demaille |
Subject: |
FYI: AC_SUBST in config.log! |
Date: |
25 Apr 2002 10:51:37 +0200 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Common Lisp) |
>>>>> "Akim" == Akim Demaille <address@hidden> writes:
Akim> This is a proposal, I have to go, but I'll write a ChangeLog.
Akim> The point is showing AC_SUBST in config.log. There *might* be a
Akim> portability issue: we are making a longer trap code in
Akim> configure.
Since anyway this patch was naive (only the AC_SUBST that are
performed before the creation of the trap are output, i.e., a couple
of handfull of them :), I had to output the list in a shell variable,
therefore there is now constant size code in the trap section.
Here is the result on Autoconf itself:
| This file contains any messages produced by compilers while
| running configure, to aid debugging if configure makes a mistake.
|
| It was created by GNU Autoconf configure 2.53b, which was
| generated by GNU Autoconf 2.53b. Invocation command line was
|
| $ ./configure
|
| ## --------- ##
| ## Platform. ##
| ## --------- ##
|
| hostname = nostromo
| uname -m = i686
| uname -r = 2.4.17
| uname -s = Linux
| uname -v = #9 Wed Jan 2 19:07:31 CET 2002
|
| /usr/bin/uname -p = unknown
| /bin/uname -X = unknown
|
| /bin/arch = i686
| /usr/bin/arch -k = unknown
| /usr/convex/getsysinfo = unknown
| hostinfo = unknown
| /bin/machine = unknown
| /usr/bin/oslevel = unknown
| /bin/universe = unknown
|
| PATH: /home/lrde/prof/akim/bin
| PATH: /home/lrde/prof/akim/bin
| PATH: /home/lrde/prof/akim/bin
| PATH: /usr/local/bin
| PATH: /usr/bin
| PATH: /bin
| PATH: /usr/bin/X11
| PATH: /usr/games
| PATH: /usr/X11R6/bin
| PATH: /usr/local/kde/bin
| PATH: /usr/local/jdk/bin
| PATH: /usr/local/jdk/bin
|
|
| ## ----------- ##
| ## Core tests. ##
| ## ----------- ##
|
| configure:1213: checking for a BSD-compatible install
| configure:1267: result: /usr/bin/install -c
| configure:1278: checking whether build environment is sane
| configure:1321: result: yes
| configure:1354: checking for gawk
| configure:1370: found /usr/bin/gawk
| configure:1380: result: gawk
| configure:1390: checking whether make sets ${MAKE}
| configure:1410: result: yes
| configure:1578: checking for expr
| configure:1596: found /usr/bin/expr
| configure:1608: result: /usr/bin/expr
| configure:1625: checking for gm4
| configure:1658: result: no
| configure:1625: checking for gnum4
| configure:1658: result: no
| configure:1625: checking for m4
| configure:1643: found /usr/local/bin/m4
| configure:1655: result: /usr/local/bin/m4
| configure:1666: checking whether m4 supports frozen files
| configure:1678: result: yes
| configure:1696: checking for perl
| configure:1714: found /usr/bin/perl
| configure:1727: result: /usr/bin/perl
| configure:1753: checking for emacs
| configure:1769: found /usr/bin/emacs
| configure:1779: result: emacs
| configure:1808: checking for emacs
| configure:1834: result: emacs
| configure:1847: checking where .elc files should go
| configure:1857: $EMACS -batch -q -eval '(while load-path (princ (concat (car
load-path) "\n")) (setq load-path (cdr load-path)))' </dev/null >conftest.out
| Loading 00debian-vars...
| Loading 35elib-startup (source)...
| Loading 42hyperlatex...
| Loading 50ada-mode (source)...
| Loading 50asn1-mode (source)...
| Loading 50bbdb (source)...
| Loading 50calc (source)...
| Loading 50dpkg-dev (source)...
| Loading 50erlang-mode (source)...
| Loading 50ftnchek (source)...
| Loading fortran...
| ftnchek.el Version 0.6 bugs to <address@hidden>
| Loading 50gcl (source)...
| Loading 50gettext (source)...
| Loading 50gnuserv (source)...
| Loading 50iportuguese (source)...
| Loading 50ispanish (source)...
| Loading 50mozart (source)...
| Loading 50nowebm (source)...
| Loading 50ocaml (source)...
| Loading 50octave (source)...
| Loading 50oo-browser (source)...
| Loading 50pcl-cvs-startup (source)...
| Loading 50prcs-el (source)...
| Loading 50psgml-init (source)...
| Loading 50python-mode (source)...
| Loading 50remembrance-agent (source)...
| Loading 50sather (source)...
| Loading 50speedbar (source)...
| Loading 50tdtd (source)...
| Loading 50whizzytex (source)...
| Loading 50yorick-auto (source)...
| Loading 51ada-mode (source)...
| configure:1860: $? = 0
| configure:1873: result: ${datadir}/emacs/site-lisp
| configure:1997: creating ./config.status
|
| ## ---------------------- ##
| ## Running config.status. ##
| ## ---------------------- ##
|
| This file was extended by GNU Autoconf config.status 2.53b, which was
| generated by GNU Autoconf 2.53b. Invocation command line was
|
| CONFIG_FILES =
| CONFIG_HEADERS =
| CONFIG_LINKS =
| CONFIG_COMMANDS =
| $ ./config.status
|
| on nostromo
|
| config.status:629: creating config/Makefile
| config.status:629: creating tests/Makefile
| config.status:629: creating tests/atlocal
| config.status:629: creating tests/autoconf
| config.status:629: creating tests/autoheader
| config.status:629: creating tests/autom4te
| config.status:629: creating tests/autoreconf
| config.status:629: creating tests/autoscan
| config.status:629: creating tests/autoupdate
| config.status:629: creating tests/ifnames
| config.status:629: creating man/Makefile
| config.status:629: creating lib/emacs/Makefile
| config.status:629: creating Makefile
| config.status:629: creating doc/Makefile
| config.status:629: creating lib/Makefile
| config.status:629: creating lib/Autom4te/Makefile
| config.status:629: creating lib/autoscan/Makefile
| config.status:629: creating lib/m4sugar/Makefile
| config.status:629: creating lib/autoconf/Makefile
| config.status:629: creating lib/autotest/Makefile
| config.status:629: creating bin/Makefile
| config.status:764: executing tests/atconfig commands
|
| ## ---------------- ##
| ## Cache variables. ##
| ## ---------------- ##
|
| ac_cv_env_build_alias_set=
| ac_cv_env_build_alias_value=
| ac_cv_env_host_alias_set=
| ac_cv_env_host_alias_value=
| ac_cv_env_target_alias_set=
| ac_cv_env_target_alias_value=
| ac_cv_path_EXPR=/usr/bin/expr
| ac_cv_path_M4=/usr/local/bin/m4
| ac_cv_path_PERL=/usr/bin/perl
| ac_cv_path_install='/usr/bin/install -c'
| ac_cv_prog_AWK=gawk
| ac_cv_prog_EMACS=emacs
| ac_cv_prog_gnu_m4=yes
| ac_cv_prog_make_make_set=yes
| am_cv_lispdir='${datadir}/emacs/site-lisp'
|
| ## ----------------- ##
| ## Output variables. ##
| ## ----------------- ##
| ACLOCAL='${SHELL} /home/lrde/prof/akim/src/ace/config/missing --run
aclocal-1.6a'
| AMTAR='${SHELL} /home/lrde/prof/akim/src/ace/config/missing --run tar'
| AUTOCONF='${SHELL} /home/lrde/prof/akim/src/ace/config/missing --run autoconf'
| AUTOHEADER='${SHELL} /home/lrde/prof/akim/src/ace/config/missing --run
autoheader'
| AUTOMAKE='${SHELL} /home/lrde/prof/akim/src/ace/config/missing --run
automake-1.6a'
| AWK='gawk'
| DEFS='-DPACKAGE_NAME=\"GNU\ Autoconf\" -DPACKAGE_TARNAME=\"autoconf\"
-DPACKAGE_VERSION=\"2.53b\" -DPACKAGE_STRING=\"GNU\ Autoconf\ 2.53b\"
-DPACKAGE_BUGREPORT=\"address@hidden" -DPACKAGE=\"autoconf\"
-DVERSION=\"2.53b\" '
| ECHO_C=''
| ECHO_N='-n'
| ECHO_T=''
| EMACS='emacs'
| EXPR='/usr/bin/expr'
| HELP2MAN='${SHELL} /home/lrde/prof/akim/src/ace/config/missing --run help2man'
| INSTALL_DATA='${INSTALL} -m 644'
| INSTALL_PROGRAM='${INSTALL}'
| INSTALL_SCRIPT='${INSTALL}'
| INSTALL_STRIP_PROGRAM='${SHELL} $(install_sh) -c -s'
| LIBS=''
| M4='/usr/local/bin/m4'
| MAKEINFO='${SHELL} /home/lrde/prof/akim/src/ace/config/missing --run makeinfo'
| PACKAGE='autoconf'
| PACKAGE_BUGREPORT='address@hidden'
| PACKAGE_NAME='GNU Autoconf'
| PACKAGE_STRING='GNU Autoconf 2.53b'
| PACKAGE_TARNAME='autoconf'
| PACKAGE_VERSION='2.53b'
| PATH_SEPARATOR=':'
| PERL='/usr/bin/perl'
| SET_MAKE=''
| SHELL='/bin/sh'
| STRIP=''
| VERSION='2.53b'
| ac_ct_STRIP=''
| bindir='${exec_prefix}/bin'
| build_alias=''
| datadir='${prefix}/share'
| exec_prefix='${prefix}'
| host_alias=''
| includedir='${prefix}/include'
| infodir='${prefix}/info'
| install_sh='/home/lrde/prof/akim/src/ace/config/install-sh'
| libdir='${exec_prefix}/lib'
| libexecdir='${exec_prefix}/libexec'
| lispdir='${datadir}/emacs/site-lisp'
| localstatedir='${prefix}/var'
| mandir='${prefix}/man'
| oldincludedir='/usr/include'
| prefix='/usr/local'
| program_transform_name='s,x,x,'
| sbindir='${exec_prefix}/sbin'
| sharedstatedir='${prefix}/com'
| sysconfdir='${prefix}/etc'
| target_alias=''
|
| ## ----------- ##
| ## confdefs.h. ##
| ## ----------- ##
|
| #define PACKAGE "autoconf"
| #define PACKAGE_BUGREPORT "address@hidden"
| #define PACKAGE_NAME "GNU Autoconf"
| #define PACKAGE_STRING "GNU Autoconf 2.53b"
| #define PACKAGE_TARNAME "autoconf"
| #define PACKAGE_VERSION "2.53b"
| #define VERSION "2.53b"
|
| configure: exit 0
Here is the patch itself.
Index: ChangeLog
from Akim Demaille <address@hidden>
* 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.
Index: lib/autoconf/general.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/general.m4,v
retrieving revision 1.796
diff -u -u -r1.796 general.m4
--- lib/autoconf/general.m4 22 Apr 2002 17:05:22 -0000 1.796
+++ lib/autoconf/general.m4 25 Apr 2002 08:50:18 -0000
@@ -468,6 +468,9 @@
[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 @@
# 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,30 @@
], [],
['], ['"'"'])
echo
+
+ AS_BOX([Output variables.])
+ 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 +1849,6 @@
## -------------------------- ##
-# _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 +1859,7 @@
# 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 +1867,7 @@
# -----------------------
# 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], [ ])])
Index: lib/autoconf/status.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/status.m4,v
retrieving revision 1.24
diff -u -u -r1.24 status.m4
--- lib/autoconf/status.m4 21 Apr 2002 07:25:21 -0000 1.24
+++ lib/autoconf/status.m4 25 Apr 2002 08:50:18 -0000
@@ -862,7 +862,15 @@
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
And here is the diff on Autoconf's configure.
Index: configure
===================================================================
RCS file: /cvsroot/autoconf/autoconf/configure,v
retrieving revision 1.210
diff -u -u -r1.210 configure
--- configure 23 Apr 2002 16:58:42 -0000 1.210
+++ configure 25 Apr 2002 08:50:18 -0000
@@ -279,6 +279,8 @@
PACKAGE_BUGREPORT='address@hidden'
ac_unique_file="ChangeLog"
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME
PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix
program_transform_name bindir sbindir libexecdir datadir sysconfdir
sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir
build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS
INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA PACKAGE VERSION ACLOCAL AUTOCONF
AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP
INSTALL_STRIP_PROGRAM AWK SET_MAKE EXPR M4 HELP2MAN PERL EMACS lispdir'
+ac_subst_files=''
# Initialize some variables set by options.
ac_init_help=
@@ -956,6 +958,7 @@
# Save into config.log some information that might help in debugging.
{
echo
+
cat <<\_ASBOX
## ---------------- ##
## Cache variables. ##
@@ -978,6 +981,19 @@
esac;
}
echo
+
+ cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=$`echo $ac_var`
+ echo "$ac_var='"'"'$ac_val'"'"'"
+ done | sort
+ echo
+
if test -s confdefs.h; then
cat <<\_ASBOX
## ----------- ##
@@ -985,7 +1001,7 @@
## ----------- ##
_ASBOX
echo
- sed "/^$/d" confdefs.h
+ sed "/^$/d" confdefs.h | sort
echo
fi
test "$ac_signal" != 0 &&
@@ -2853,4 +2869,3 @@
EOF
sed -n '/^\* Status/,$p' $srcdir/BUGS
-