* lib/autotest/autotest.m4: New.
* lib/autotest/general.m4, tests/atspecific.m4: Adjust.
* tests/suite.at : Adjust.
(AT_INIT): Log config.log.
* lib/m4sugar/m4sugar.m4 (m4_text_box): New.
* lib/m4sugar/m4sh.m4 (_AS_BOX_LITERAL): Adjust.
* lib/autoconf/general.m4 (_AC_INIT_CONFIG_LOG): Use them.
(_AC_INIT_PREPARE): Fix the incredibly messy and buggy completion
of config.log on traps.
(_AC_OUTPUT_CONFIG_STATUS): Use AS_BOX.
Use consistently `_ACEOF' for configure's here docs, and `_CSEOF'
for config.status'.
Open the log as soon as possible.
Use the same log introduction as configure's.
+2001-08-27 Akim Demaille <akim@epita.fr>
+
+ testsuite.log should include config.log.
+
+ * lib/autotest/autotest.m4: New.
+ * lib/autotest/general.m4, tests/atspecific.m4: Adjust.
+ * tests/suite.at : Adjust.
+ (AT_INIT): Log config.log.
+ * lib/m4sugar/m4sugar.m4 (m4_text_box): New.
+ * lib/m4sugar/m4sh.m4 (_AS_BOX_LITERAL): Adjust.
+ * lib/autoconf/general.m4 (_AC_INIT_CONFIG_LOG): Use them.
+ (_AC_INIT_PREPARE): Fix the incredibly messy and buggy completion
+ of config.log on traps.
+ (_AC_OUTPUT_CONFIG_STATUS): Use AS_BOX.
+ Use consistently `_ACEOF' for configure's here docs, and `_CSEOF'
+ for config.status'.
+ Open the log as soon as possible.
+ Use the same log introduction as configure's.
+
2001-08-22 Paul Eggert <eggert@twinsun.com>
* doc/autoconf.texi (Indices): New node.
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by m4_ifset([AC_PACKAGE_NAME],
- [AC_PACKAGE_NAME ])dnl
-$as_me[]m4_ifset([AC_PACKAGE_VERSION],
- [ AC_PACKAGE_VERSION]), which was
+It was created by m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])dnl
+$as_me[]m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]), which was
generated by GNU Autoconf AC_ACVERSION. Invocation command line was
$ $[0] $[@]
AS_UNAME >&AS_MESSAGE_LOG_FD
cat >&AS_MESSAGE_LOG_FD <<_ACEOF
-## ------------ ##
-## Core tests. ##
-## ------------ ##
+m4_text_box([Core tests.])
_ACEOF
])])# _AC_INIT_CONFIG_LOG
# would cause problems or look ugly.
trap 'exit_status=$?
# Save into config.log some information that might help in debugging.
- echo >&AS_MESSAGE_LOG_FD
- echo ["## ----------------- ##"] >&AS_MESSAGE_LOG_FD
- echo ["## Cache variables. ##"] >&AS_MESSAGE_LOG_FD
- echo ["## ----------------- ##"] >&AS_MESSAGE_LOG_FD
- echo >&AS_MESSAGE_LOG_FD
- m4_patsubst(m4_patsubst(m4_dquote(m4_defn([_AC_CACHE_DUMP])),
- [^ *\(#.*\)?
+ {
+ echo
+ AS_BOX([Cache variables.])
+ echo
+ m4_patsubst(m4_patsubst(m4_dquote(m4_defn([_AC_CACHE_DUMP])),
+ [^ *\(#.*\)?
]),
- ['], ['"'"']) >&AS_MESSAGE_LOG_FD
- sed "/^$/d" confdefs.h >conftest.log
- if test -s conftest.log; then
- echo >&AS_MESSAGE_LOG_FD
- echo ["## ------------ ##"] >&AS_MESSAGE_LOG_FD
- echo ["## confdefs.h. ##"] >&AS_MESSAGE_LOG_FD
- echo ["## ------------ ##"] >&AS_MESSAGE_LOG_FD
- echo >&AS_MESSAGE_LOG_FD
- cat conftest.log >&AS_MESSAGE_LOG_FD
- fi
- (echo; echo) >&AS_MESSAGE_LOG_FD
- test "$ac_signal" != 0 &&
- echo "$as_me: caught signal $ac_signal" >&AS_MESSAGE_LOG_FD
- echo "$as_me: exit $exit_status" >&AS_MESSAGE_LOG_FD
+ ['], ['"'"'])
+ echo
+ if test -s confdefs.h; then
+ AS_BOX([confdefs.h.])
+ echo
+ sed '/^$/d' confdefs.h
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ echo "$as_me: caught signal $ac_signal"
+ echo "$as_me: exit $exit_status"
+ } >&AS_MESSAGE_LOG_FD
rm -rf conftest* confdefs* core core.* *.core conf$[$]* $ac_clean_files &&
exit $exit_status
' 0
[AC_MSG_NOTICE([creating $CONFIG_STATUS])
cat >$CONFIG_STATUS <<_ACEOF
#! $SHELL
-# Generated automatically by configure.
+# Generated automatically by $as_me.
# Run this file to recreate the current configuration.
# Compiler output produced by configure, useful for debugging
# configure, is in config.log if it exists.
debug=false
SHELL=\${CONFIG_SHELL-$SHELL}
-ac_cs_invocation="\$[0] \$[@]"
-
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF
AS_SHELL_SANITIZE
exec AS_MESSAGE_FD>&1
+# Open the log real soon, to keep \$[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling. Logging --version etc. is OK.
+exec AS_MESSAGE_LOG_FD>>config.log
+cat >&AS_MESSAGE_LOG_FD <<_CSEOF
+
+`AS_BOX([Running \$as_me.])`
+
+This file was extended by m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])dnl
+$as_me[]m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]), which was
+generated by GNU Autoconf AC_ACVERSION. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $[@]
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+
+_CSEOF
_ACEOF
# Files that config.status was made for.
echo "running $SHELL $[0] " $ac_configure_args " --no-create --no-recursion"
exec $SHELL $[0] $ac_configure_args --no-create --no-recursion ;;
_ACEOF
-cat >>$CONFIG_STATUS <<\_CSEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
--version | --vers* | -V )
echo "$ac_cs_version"; exit 0 ;;
--he | --h)
shift
done
-exec AS_MESSAGE_LOG_FD>>config.log
-cat >&AS_MESSAGE_LOG_FD << _ACEOF
-
-## ----------------------- ##
-## Running config.status. ##
-## ----------------------- ##
-
-This file was extended by $as_me m4_ifset([AC_PACKAGE_STRING],
- [(AC_PACKAGE_STRING) ])AC_ACVERSION, executed with
- CONFIG_FILES = $CONFIG_FILES
- CONFIG_HEADERS = $CONFIG_HEADERS
- CONFIG_LINKS = $CONFIG_LINKS
- CONFIG_COMMANDS = $CONFIG_COMMANDS
- > $ac_cs_invocation
-on `(hostname || uname -n) 2>/dev/null | sed 1q`
-
_ACEOF
-_CSEOF
dnl We output the INIT-CMDS first for obvious reasons :)
m4_ifset([_AC_OUTPUT_COMMANDS_INIT],
-[cat >>$CONFIG_STATUS <<_CSEOF
+[cat >>$CONFIG_STATUS <<_ACEOF
#
# INIT-COMMANDS section.
#
_AC_OUTPUT_COMMANDS_INIT()
-_CSEOF])
+_ACEOF])
dnl Issue this section only if there were actually config files.
dnl or AC_LIST_LINKS is set.
m4_ifval(AC_LIST_HEADERS()AC_LIST_LINKS()AC_LIST_FILES()AC_LIST_COMMANDS(),
[
-cat >>$CONFIG_STATUS <<\_CSEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
for ac_config_target in $ac_config_targets
do
case "$ac_config_target" in
AS_TMPDIR(cs)
-_CSEOF
+_ACEOF
])[]dnl m4_ifval
dnl The following four sections are in charge of their own here
m4_ifset([AC_LIST_LINKS], [_AC_OUTPUT_LINKS()])dnl
m4_ifset([AC_LIST_COMMANDS], [_AC_OUTPUT_COMMANDS()])dnl
-cat >>$CONFIG_STATUS <<\_CSEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
AS_EXIT(0)
-_CSEOF
+_ACEOF
chmod +x $CONFIG_STATUS
])# _AC_OUTPUT_CONFIG_STATUS
# It has to send itself into $CONFIG_STATUS (eg, via here documents).
# Upon exit, no here document shall be opened.
m4_define([_AC_OUTPUT_FILES],
-[cat >>$CONFIG_STATUS <<_CSEOF
+[cat >>$CONFIG_STATUS <<_ACEOF
#
# CONFIG_FILES section.
_AC_SUBST_SED_PROGRAM()dnl
CEOF
-_CSEOF
+_ACEOF
- cat >>$CONFIG_STATUS <<\_CSEOF
+ cat >>$CONFIG_STATUS <<\_ACEOF
# Split the substitutions into bite-sized pieces for seds with
# small command number limits, like on Digital OSF/1 and HP-UX.
dnl One cannot portably go further than 100 commands because of HP-UX.
fi
fi # test -n "$CONFIG_FILES"
-_CSEOF
-cat >>$CONFIG_STATUS <<\_CSEOF
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
# Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
case $ac_file in
fi;;
esac
done` || AS_EXIT([1])
-_CSEOF
-cat >>$CONFIG_STATUS <<_CSEOF
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
dnl Neutralize VPATH when `$srcdir' = `.'.
sed "$ac_vpsub
dnl Shell code in configure.ac might set extrasub.
dnl FIXME: do we really want to maintain this feature?
$extrasub
-_CSEOF
-cat >>$CONFIG_STATUS <<\_CSEOF
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
:t
[/@[a-zA-Z_][a-zA-Z_0-9]*@/!b]
s,@configure_input@,$configure_input,;t t
esac
])dnl
done
-_CSEOF
+_ACEOF
])# _AC_OUTPUT_FILES
# The result is about, hm, ... times blah... plus.... Ahem. The
# result is about much faster.
m4_define([_AC_OUTPUT_HEADERS],
-[cat >>$CONFIG_STATUS <<\_CSEOF
+[cat >>$CONFIG_STATUS <<\_ACEOF
#
# CONFIG_HEADER section.
# Remove the trailing spaces.
sed 's/[[ ]]*$//' $ac_file_inputs >$tmp/in
-_CSEOF
+_ACEOF
# Transform confdefs.h into two sed scripts, `conftest.defines' and
# `conftest.undefs', that substitutes the proper values into
rm -f conftest.undefs
dnl Now back to your regularly scheduled config.status.
-cat >>$CONFIG_STATUS <<\_CSEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
# Let's still pretend it is `configure' which instantiates (i.e., don't
# use $as_me), people would be surprised to read:
# /* config.h. Generated automatically by config.status. */
esac
])dnl
done
-_CSEOF
+_ACEOF
])# _AC_OUTPUT_HEADERS
# It has to send itself into $CONFIG_STATUS (eg, via here documents).
# Upon exit, no here document shall be opened.
m4_define([_AC_OUTPUT_LINKS],
-[cat >>$CONFIG_STATUS <<\_CSEOF
+[cat >>$CONFIG_STATUS <<\_ACEOF
#
# CONFIG_LINKS section.
esac
])dnl
done
-_CSEOF
+_ACEOF
])# _AC_OUTPUT_LINKS
# It has to send itself into $CONFIG_STATUS (eg, via here documents).
# Upon exit, no here document shall be opened.
m4_define([_AC_OUTPUT_COMMANDS],
-[cat >>$CONFIG_STATUS <<\_CSEOF
+[cat >>$CONFIG_STATUS <<\_ACEOF
#
# CONFIG_COMMANDS section.
AC_LIST_COMMANDS_COMMANDS()dnl
esac
done
-_CSEOF
+_ACEOF
])# _AC_OUTPUT_COMMANDS
autotestlibdir = $(pkgdatadir)/autotest
-autotestlib_DATA = general.m4
+autotestlib_DATA = autotest.m4 general.m4
EXTRA_DIST = $(autotestlib_DATA)
--- /dev/null
+divert(-1)# -*- Autoconf -*-
+# This file is part of Autoconf.
+# M4 macros used in building test suites.
+# Copyright 2000, 2001 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# As a special exception, the Free Software Foundation gives unlimited
+# permission to copy, distribute and modify the configure scripts that
+# are the output of Autoconf. You need not follow the terms of the GNU
+# General Public License when using or distributing such scripts, even
+# though portions of the text of Autoconf appear in them. The GNU
+# General Public License (GPL) does govern all other use of the material
+# that constitutes the Autoconf program.
+#
+# Certain portions of the Autoconf source text are designed to be copied
+# (in certain cases, depending on the input) into the output of
+# Autoconf. We call these the "data" portions. The rest of the Autoconf
+# source text consists of comments plus executable code that decides which
+# of the data portions to output in any given case. We call these
+# comments and executable code the "non-data" portions. Autoconf never
+# copies any of the non-data portions into its output.
+#
+# This special exception to the GPL applies to versions of Autoconf
+# released by the Free Software Foundation. When you make and
+# distribute a modified version of Autoconf, you may extend this special
+# exception to the GPL to apply to your modified version as well, *unless*
+# your modified version has the potential to copy into its output some
+# of the text that was the non-data portion of the version that you started
+# with. (In other words, unless your change moves or copies text from
+# the non-data portions to the data portions.) If your modification has
+# such potential, you must delete any notice of this special exception
+# to the GPL from your modified version.
+
+changequote()
+changequote([, ])
+include(m4sugar/m4sh.m4)
+m4_include(autotest/general.m4)
-changequote()changequote([, ])include(m4sugar/m4sh.m4)# -*- Autoconf -*-
-# This file is part of Autoconf.
+# This file is part of Autoconf. -*- Autoconf -*-
# M4 macros used in building test suites.
# Copyright 2000, 2001 Free Software Foundation, Inc.
dnl Other vars inserted here (DEFAULT).
m4_divert([OPTIONS])
-while test $[#] -gt 0; do
+while test $[@%:@] -gt 0; do
case $[1] in
--help | -h) at_help=: ;;
--version) echo "$as_me ($at_package) $at_version"; exit 0 ;;
if $1 --version | grep "$at_package.*$at_version" >/dev/null; then
AS_BOX([Test suite for $at_package $at_version])
{
- AS_BOX([Test suite log for $at_package $at_version])
+ AS_BOX([ Test suite log for $at_package $at_version. ])
echo
# Try to find a few ChangeLogs in case it might help determining the
# exact version. Use the relative dir: if the top dir is a symlink,
# find will not follow it (and options to follow the links are not
# portable), which would result in no output here.
+
+ AS_BOX([ChangeLogs.])
+ echo
find "$top_srcdir" -name ChangeLog \
- -exec echo {} : ';' \
+ -exec echo "$as_me: {}:" ';' \
-exec sed 's/^/| /;10q' {} ';' \
-exec echo ';'
AS_UNAME
echo
- # Inform about the contents of the config files.
- echo "$as_me: atconfig:" >&6
- sed 's/^/| /' atconfig >&6
- if test -r ./atlocal; then
- echo "$as_me: atlocal:" >&6
- sed 's/^/| /' atlocal >&6
- fi
+ AS_BOX([Configuration logs.])
+ echo
+ find "$top_srcdir" -name config.log \
+ -exec echo "$as_me: {}:" ';' \
+ -exec sed 's/^/| /' {} ';' \
+ -exec echo ';'
+
+ # Inform about the contents of the config files.
+ echo "$as_me: atconfig:" >&6
+ sed 's/^/| /' atconfig >&6
+ if test -r ./atlocal; then
+ echo "$as_me: atlocal:" >&6
+ sed 's/^/| /' atlocal >&6
+ fi
+ echo
AS_BOX([Running silently the tests])
} >&6
# This section is lexicographically sorted.
-# AS_BOX(MESSAGE, [FRAME-CHARACTER = `='])
+# AS_BOX(MESSAGE, [FRAME-CHARACTER = `-'])
# ----------------------------------------
# Output MESSAGE, a single line text, framed with FRAME-CHARACTER (which
# must not be `/').
[_AS_BOX_LITERAL($@)],
[_AS_BOX_INDIR($@)])])
-# _AS_BOX_LITERAL(MESSAGE, [FRAME-CHARACTER = `='])
+# _AS_BOX_LITERAL(MESSAGE, [FRAME-CHARACTER = `-'])
# -------------------------------------------------
m4_define([_AS_BOX_LITERAL],
[cat <<\_ASBOX
-m4_patsubst([$1], [.], m4_if([$2], [], [[=]], [[$2]]))
-$1
-m4_patsubst([$1], [.], m4_if([$2], [], [[=]], [[$2]]))
+m4_text_box($@)
_ASBOX])
-# _AS_BOX_INDIR(MESSAGE, [FRAME-CHARACTER = `='])
+# _AS_BOX_INDIR(MESSAGE, [FRAME-CHARACTER = `-'])
# -----------------------------------------------
m4_define([_AS_BOX_INDIR],
-[sed 'h;s/./m4_default([$2], [=])/g;p;x;p;x' <<_ASBOX
-$1
+[sed 'h;s/./m4_default([$2], [-])/g;s/^.../@%:@@%:@ /;s/...$/ @%:@@%:@/;p;x;p;x' <<_ASBOX
+@%:@@%:@ $1 @%:@@%:@
_ASBOX])
m4_define([AS_UNAME],
[{
cat <<_ASUNAME
-## ---------- ##
-## Platform. ##
-## ---------- ##
+m4_text_box([Platform.])
hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
uname -m = `(uname -m) 2>/dev/null || echo unknown`
])
+# m4_text_box(MESSAGE, [FRAME-CHARACTER = `-'])
+# ---------------------------------------------
+m4_define([m4_text_box],
+[@%:@@%:@ m4_patsubst([$1], [.], m4_if([$2], [], [[-]], [[$2]])) @%:@@%:@
+@%:@@%:@ $1 @%:@@%:@
+@%:@@%:@ m4_patsubst([$1], [.], m4_if([$2], [], [[-]], [[$2]])) @%:@@%:@[]dnl
+])
+
+
## ----------------------- ##
## 10. Number processing. ##
AUTOM4TE = autom4te_perllibdir='$(top_srcdir)/lib' ../bin/autom4te
testsuite: $(top_srcdir)/lib/m4sugar/m4sugar.m4 \
$(top_srcdir)/lib/m4sugar/m4sh.m4 \
+ $(top_srcdir)/lib/autotest/autotest.m4 \
$(top_srcdir)/lib/autotest/general.m4 \
atspecific.m4 \
$(SUITE)
$(AUTOM4TE) \
-I $(srcdir) -I $(top_srcdir) -I $(top_srcdir)/lib \
- atspecific.m4 suite.at -o $@.tmp
+ autotest/autotest.m4 suite.at -o $@.tmp
chmod +x $@.tmp
mv $@.tmp $@
-changequote()changequote([, ])include(autotest/general.m4)# -*- Autoconf -*-
-# M4 macros used in building Autoconf test suites.
+# M4 macros used in building Autoconf test suites. -*- Autotest -*-
# Copyright 2000, 2001 Free Software Foundation, Inc.
# Copyright 2000, 2001 Free Software Foundation, Inc.
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
+# Macros specialized for Autoconf testing.
+m4_include([atspecific.m4])
+
# Still many parts of `autoconf' are not exercised by the test suite. A few
# FIXME's, below, are used to list tests that we would need. Do you feel
# like contributing new tests? If you do, you may tell your intent to