* doc/autoconf.texi (Writing Testsuites) <AT_BANNER>: Update
description.
* lib/autotest/general.m4 (AT_INIT) <at_fn_banner>: Set banner
to single space, not empty line, once printed. For empty
banners, print a single empty line to separate them from a
previous test group category.
* tests/autotest.at (Banners): Insert another test group; adjust
tests accordingly. Extend test to cover semantic change.
* NEWS: Update.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* doc/autoconf.texi (Fortran Compiler, Language Choice): Add
index entries for AC_FC_DUMMY_MAIN, AC_LANG; reformat entry for
AC_LANG_ASSERT.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* doc/autoconf.texi (Generating Sources): Don't mix gcc '-E' and
'-o -', since the former already implies stdout, while the latter
creates -.exe on cygwin.
* tests/compile.at (AC_LANG_SOURCE example)
(AC_LANG_PROGRAM example): Likewise. Also prevent any config.site
interference.
Signed-off-by: Eric Blake <eblake@redhat.com>
* doc/autoconf.texi (File Descriptors): Clarify limitations.
* lib/autotest/general.m4 (AT_CLEANUP): Avoid leaking job control
fifo fd to user tests.
(AT_INIT): Delete comment, now that close is done elsewhere.
Suggested by Ralf Wildenhues.
Signed-off-by: Eric Blake <eblake@redhat.com>
* lib/autoconf/general.m4 (_AC_INIT_LITERAL): Reject a couple more
problematic characters.
* tests/base.at (AC_INIT with unusual version strings): Enhance
test.
* doc/autoconf.texi (Initializing configure) <AC_INIT>: Further
clarifications, and clean up wording about use of m4_esyscmd.
* NEWS: Update previous news entry.
Suggested by Paolo Bonzini.
Signed-off-by: Eric Blake <eblake@redhat.com>
* doc/autoconf.texi (Initializing configure): Improve
documentation on argument restrictions.
* NEWS: Tweak information.
* lib/autoconf/general.m4 (_AC_INIT_GENERAL): New macro, that also
rejects literal ".
(_AC_INIT_PACKAGE): Use it to plug hole in last patch.
* tests/base.at (AC_INIT with unusual version strings): Enhance
test.
Signed-off-by: Eric Blake <eblake@redhat.com>
* lib/autoconf/general.m4 (_AC_PREPROC_IFELSE_BODY): Redirect
preprocessor output to conftest.i rather than /dev/null.
(_AC_PREPROC_IFELSE): Remove conftest.i in the postprocessing.
* tests/compile.at (Order of user actions and cleanup): Extend
test in the ACTION-IF-TRUE branch.
* doc/autoconf.texi (Running the Preprocessor): Document new
feature.
* NEWS: Update.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* doc/autoconf.texi (Preset Output Variables): Remove space
between -D and -L flags and their arguments, traditional cpp
implementations like Solaris 10, IRIX 6.5, OSF Tru64 5.1D,
AIX 5.3 do not accept it.
Signed-off-by: Eric Blake <eblake@redhat.com>
* doc/autoconf.texi (Generic Compiler Characteristics): Refer
to the right test in the example marker comment.
Spotted by Eric Blake.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* doc/autoconf.texi (Subdirectories): We warn, not error, about
nonexistent config subdirs, but only at configure run time.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* lib/autoconf/types.m4 (AC_CHECK_SIZEOF): Translate `*' to `p'
when checking literal-ness of the type, for pointer types.
* lib/m4sugar/m4sh.m4 (_AS_TR_SH): Also consider `*' as literal.
(_AS_TR_CPP): Likewise.
* tests/semantics.at (AC_CHECK_ALIGNOF struct): When checking
for numeric answer, be sure to not allow variable references.
(AC_CHECK_SIZEOF struct): Likewise. Also, test the
`AC_CHECK_SIZEOF([int *])' example from the manual.
* doc/autoconf.texi (Generic Compiler Characteristics): Add
example marker.
* NEWS: Update.
Reports by Nishio Futoshi and Roberto Bagnara.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* lib/autoconf/status.m4 (AC_CONFIG_SUBDIRS): Do not assume the
argument is a single word.
* tests/torture.at (Deep Package): Extend test to cover this.
(Non-literal AC_CONFIG_SUBDIRS): New test.
* doc/autoconf.texi (Subdirectories): Add example marker.
* NEWS: Update.
Report by Bruno Haible.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* 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_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>
* 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>
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>
* 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>