* tests/torture.at (Torturing config.status)
(Substitute a 2000-byte string)
(Substitute and define special characters)
(Substitute a newline): Quote first argument in for list so
that it does not look like an assignment.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* lib/m4sugar/m4sh.m4 (_AS_TR_CPP_LITERAL): Avoid underquoting.
(_AS_TR_CPP_INDIR): Handle all polymorphic variables.
* tests/m4sh.at (AS@&t@_TR_SH and AS@&t@_TR_CPP): New test.
* NEWS: Document the fix.
Reported by Bruno Haible.
Signed-off-by: Eric Blake <eblake@redhat.com>
* lib/autotest/general.m4 (_AT_FINISH) <banners>: Rather than
doing a recursive find, limit ourselves to top ChangeLog only.
Reported by Ralf Wildenhues.
Signed-off-by: Eric Blake <eblake@redhat.com>
* lib/autoconf/fortran.m4 (_AC_FC_DIALECT_YEAR): Fix typo in
comment.
(AC_FC_FREEFORM): Update list of known options for Sun, HP,
Lahey/Fujitsu Fortran compilers. Use M4 quoting consistently.
(AC_FC_FIXEDFORM): New macro.
* tests/fortran.at (AC_FC_DUMMY_MAIN usage, AC_FC_MAIN usage):
Use AC_FC_FIXEDFORM, to avoid testsuite failure with FC=xlf95.
(AC_FC_FREEFORM with AC_FC_SRCEXT, AC_FC_FIXEDFORM)
(AC_FC_FIXEDFORM with AC_FC_SRCEXT): New tests.
* tests/mktests.sh: No need to exclude AC_FC_FREEFORM, it uses
AC_LANG_PUSH/AC_LANG_POP.
* doc/autoconf.texi (Fortran Compiler): Document it.
* NEWS: Update.
Signed-off-by: Eric Blake <eblake@redhat.com>
* lib/m4sugar/m4sh.m4 (AS_BOX): Use less m4 time.
(_AS_BOX_LITERAL): Use fewer forks in the common case.
* doc/autoconf.texi (Common Shell Constructs) <AS_BOX>: Document
the macro.
* NEWS: Mention it.
Signed-off-by: Eric Blake <eblake@redhat.com>
* lib/m4sugar/m4sh.m4 (AS_VAR_SET): Reduce m4 overhead.
(AS_VAR_IF, AS_VAR_TEST_SET): Provide shorter variant for simple
references.
Suggested by Bruno Haible.
Signed-off-by: Eric Blake <eblake@redhat.com>
* lib/m4sugar/m4sh.m4 (_AS_LITERAL_IF): Also reject shell quoting
characters as non-literal, and provide way to reject space.
(AS_LITERAL_WORD_IF): New macro.
* doc/autoconf.texi (Polymorphic Variables) <AS_LITERAL_IF>:
Document new macro. Fix example to match reality.
* NEWS: Document change and new macro.
* tests/m4sh.at (AS@&t@_LITERAL_IF): Update test.
Signed-off-by: Eric Blake <eblake@redhat.com>
Fix the commit (forgot to 'git add .').
* doc/autoconf.texi (Limitations of Shell Builtins) <for>:
Document a bug of the 'for' builtin in Solaris /bin/sh, w.r.t.
tokens seeming variable assignment in the list of arguments.
Signed-off-by: Eric Blake <eblake@redhat.com>
* doc/autoconf.texi (Limitations of Shell Builtins) <for>:
Document a bug of the 'for' builtin in Solaris /bin/sh, w.r.t.
tokens seeming variable assignment in the list of arguments.
Signed-off-by: Eric Blake <eblake@redhat.com>
* lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE): Be sure not
to remove references to a subdir of srcdir. Fix treatment of
multiple colon-separated VPATH entries.
* tests/torture.at (VPATH): New test.
Report by Keith Marshall.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* doc/autoconf.texi (Shellology): Remove anchor for pdksh.
Move quoting bug example to ...
(Shell Substitutions): ... here. Document which behavior is
specified by Posix.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* tests/fortran.at (AC_OPENMP and Fortran 77)
(AC_OPENMP and Fortran): Simplify, using AT_CHECK_CONFIGURE.
(AC_F77_DUMMY_MAIN usage, AC_FC_DUMMY_MAIN usage)
(AC_F77_MAIN usage, AC_FC_MAIN usage, AC_F77_FUNC usage)
(AC_FC_FUNC usage, AC_FC_SRCEXT usage, AC_FC_FREEFORM): New
tests.
* doc/autoconf.texi (Fortran Compiler): Use GNU coding style
on C code snippets. Add markers for tested examples.
Suggest AC_FC_FREEFORM for source file extensions which the
compiler might not natively support but which are accepted
with help from AC_FC_SRCEXT. Suggest AC_CONFIG_HEADERS for
setups using one of the AC_*MAIN macros.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* tests/torture.at (AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS):
Normalize nonzero status to 1 for writing to /dev/full, for HP-UX
11.31 cat which exits 2.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* tests/compile.at (Order of user actions and cleanup): Add
incomplete comment to provoke failure with Tru64/OSF 5.1 cc
preprocessor.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
On bug-gnulib, archived at
http://permalink.gmane.org/gmane.comp.lib.gnulib.bugs/22132
Ralf Wildenhues taught me a bit about how Automake propagates
variables to submakes. I thought that it would good to document
this in the Autoconf manual, which currently has no detail at
all.
* doc/autoconf.texi: Describe technique used by Automake to
propagate variables to submakes in more detail.
Signed-off-by: Eric Blake <eblake@redhat.com>
* doc/autoconf.texi (Configuration Actions, Help Formatting)
(External Software): Use @r{} for brackets denoting optional
arguments, where @ovar is not safe to use.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* doc/autoconf.texi (Shellology): New anchor for pdksh.
(Shell Substitutions): Link to it for escaped double-quotes
within double-quoted backquotes; add ksh example for unescaped
inner double-quotes problem.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* doc/autoconf.texi (Installation Directory Variables):
Replace some uses of @var with @code.
(Special Shell Variables): Fix misordered paragraph about IFS.
(Writing Testsuites): Include paragraph following AT_TESTED in
the macro definition.
(testsuite Invocation): Failed tests are not rerun.
(testsuite Scripts, Autotest Logs, testsuite Invocation)
(Making testsuite Scripts): Minor edits for consistency and
language.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* doc/autoconf.texi (Limitations of Usual Tools): Mention portability
problem of sed -e option with script fragments.
Signed-off-by: Eric Blake <eblake@redhat.com>
* lib/autotest/general.m4 (_AT_ARG_OPTION): Fix translation of
hyphens to underscores when turning option names to variables.
Avoid macro name concatenation garbage with trailing `dnl'.
(AT_ARG_OPTION, AT_ARG_OPTION_ARG): Overhaul macro description.
The OPTIONS are space-separated, not comma-separated. The
negative form of AT_ARG_OPTION is prefixed with `--no-'.
* tests/autotest.at (AT@&t@_ARG_OPTION, AT@&t@_ARG_OPTION_ARG):
New tests.
* NEWS: Update.
* doc/autoconf.texi (Writing Testsuites): Document AT_ARG_OPTION
and AT_ARG_OPTION_ARG.
(testsuite Invocation): Call the thingies passed to the
testsuite options, not arguments. Note that the testsuite
author may add further package-specific options.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* lib/autotest/general.m4 (HELP_TUNING_BEGIN): New diversion.
(HELP_TUNING, HELP_OTHER, HELP_END): Bump diversion numbers.
(AT_INIT): Accept
--color and --color=never|auto|always. If desired, colorize
test results and testsuite summary on standard output.
[HELP_TUNING]: Divert content instead to ...
[HELP_TUNING_BEGIN]: ... this diversion, m4_wrapped until the
end, when we know whether AT_COLOR_TESTS has been specified.
(AT_COLOR_TESTS): New macro, set the default for color to auto.
* doc/autoconf.texi (Writing Testsuites): Document it.
(testsuite Invocation): Document --color* options.
* tests/local.at: Call AT_COLOR_TESTS for Autoconf's testsuite.
* tests/autotest.at (color test results): New test, mirroring
color.test from Automake.
* NEWS: Update.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* lib/autoconf/general.m4 (AC_SITE_LOAD): Avoid leading - and path
search, and check for failure to load.
* tests/base.at (AC_CACHE_CHECK): Enhance test.
* doc/autoconf.texi (Site Defaults): Mention that CONFIG_SITE
works best as an absolute path.
* NEWS: Document the semantic change.
Signed-off-by: Eric Blake <eblake@redhat.com>
* doc/autoconf.texi (External Software): Mention that AC_ARG_WITH
accepts packages with a + sign in it.
(Package Options): Likewise for AC_ARG_ENABLE.
* lib/autoconf/general.m4 (_AC_ENABLE_IF): Also replace '+' with '_'.
* tests/base.at (AC_ARG_ENABLE and AC_ARG_WITH): New test.
* NEWS: Update.
Signed-off-by: Eric Blake <eblake@redhat.com>
* lib/autotest/general.m4 (AT_INIT): New variable $at_recheck.
Escape hyphen in $at_dir early. Accept command line switch
--recheck. Set $at_suite_log early, based on --directory
switch; with --recheck, include the list of FAILed and XPASSed
tests from old testsuite.log file in $at_groups. Document
--recheck in --help output.
* tests/autotest.at (recheck): New test.
* doc/autoconf.texi (testsuite Invocation): Document --recheck.
* NEWS: Update.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* lib/autoconf/general.m4 (_AC_INIT_DEFAULTS): Prefer GNU/Linux,
and note that bug has long since been fixed.
Signed-off-by: Eric Blake <eblake@redhat.com>
* tests/compile.at (AC_LANG_SOURCE, AC_LANG_SOURCE(C++))
(AC_LANG_SOURCE example, AC_LANG_PROGRAM example): New tests.
* doc/autoconf.texi (Generating Sources): Add markers for tested
examples; update quoting, and update AC_INIT usage to also set
optional URL arguments. Mention that the examples require gcc.
Prompted by report from Brian J. Murrell.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* lib/m4sugar/m4sh.m4 (AS_SET_CATFILE): Use AS_VAR_SET to set
the variable.
* tests/m4sh.at (AS@&t@_SET_CATFILE): New test.
* doc/autoconf.texi (Common Shell Constructs): Document that
AS_SET_CATFILE is polymorphic in its VAR argument now.
* NEWS: Update.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* tests/base.at (AC_CACHE_CHECK): Extend test.
(AC_CACHE_LOAD): New test.
* tests/torture.at (Configuring subdirectories): Also test
--config-cache with AC_CONFIG_SUBDIRS.
* doc/autoconf.texi (Caching Results): Annotate code snippets
which are tested in the test suite.
(Cache Files): Documented cache variables may be used on the
configure command line to override individual entries in the
cache file.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* doc/autoconf.texi (Limitations of Builtins): Only the last
command in a compound list is problematic.
Tested on OpenBSD 4.4.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>