* doc/autoconf.texi (Default Includes, Particular Functions)
(Header Portability):
* lib/autoconf/c.m4 (AC_LANG_FUNC_LINK_TRY(C)):
* lib/autoconf/headers.m4 (AC_HEADER_STDC):
* lib/autoconf/types.m4 (_AC_CHECK_ALIGNOF):
* lib/m4sugar/m4sugar.m4 (m4_require) [comment only]:
Assume the existence of the C89 freestanding headers <float.h>,
<limits.h>, <stdarg.h>, <stddef.h>, as that's safe nowadays.
This is less likely to run into gotchas, and should fix a
cross-compilation bug with newer GCC reported by Myke Frysinger in
<http://lists.gnu.org/archive/html/bug-autoconf/2012-09/msg00001.html>.
* NEWS:
* doc/autoconf.texi (C Compiler): Document this.
(Gnulib, Function Portability, Particular Functions)
(Header Portability, Particular Headers, Defining Symbols)
(Printing Messages, Limitations of Usual Tools)
(Preprocessor Arithmetic, Volatile Objects, Exiting Portably):
Modernize wording for C11.
* lib/autoconf/c.m4 (_AC_C_C99_TEST_HEADER, _AC_C_C99_TEST_BODY):
New macros, taken from _AC_PROG_CC_C99. These are so that we can
also include the C99 tests in the C11 test program.
(_AC_PROG_CC_C99): Use them.
(_AC_PROG_CC_C11, AC_PROG_CC_C11): New macros.
(AC_PROG_CC_STDC): Prefer C11 to C99 or C89.
Test that: invalid variable names are detected, that the variable
name does not get macro expanded, that assignment to the variable
works whether as part of AC_SUBST or independently, that the last
assignment wins.
* doc/autoconf.texi (Setting Output Variables) <AC_SUBST>: Mention
that variable does not overlap with macros.
* tests/base.at (AC_SUBST): New test.
Signed-off-by: Eric Blake <eblake@redhat.com>
The texinfo manual recommends avoiding the use of a trailing @c in
any macro designed to be used inline (as is the case with our ovar
and dvar macros). Furthermore, passing '@\n' in the middle of a
macro call is much different than passing '@\n' between arguments
of a @defmac for line continuation.
* doc/autoconf.texi (ovar, dvar): Don't end macro with @c, since
these macros are designed to be embedded in one-line usage.
(Fortran Compiler): Don't split @dvar.
* THANKS: Update.
Reported by Stefano Lattarini.
Signed-off-by: Eric Blake <eblake@redhat.com>
Copyright-paperwork-exempt: Yes
Otherwise, newer texinfo parses this line as a line directive, and
any error later in the file will claim to be from "conftest.c" instead
of "autoconf.texi".
* doc/autoconf.texi (Generating Sources): Avoid confusing newer
texinfo into thinking we had a line directive.
Reported by Stefano Lattarini, fix suggested by Patrice Dumas.
Now that automake documents AM_MISSING_PROG, and given that automake
has reserved the right to change the calling conventions of 'missing',
we should not recommend a hard-coded use of 'missing --run'.
* doc/autoconf.texi (Making testsuite Scripts): Recommend
AM_MISSING_PROG when using automake, and avoid hard-coding use of
'missing' otherwise.
It has been years since that has been deprecated in the documentation,
in favour of 'configure.ac':
Previous versions of Autoconf promoted the name configure.in, which
is somewhat ambiguous (the tool needed to process this file is not
described by its extension), and introduces a slight confusion with
config.h.in and so on (for which '.in' means "to be processed by
configure"). Using configure.ac is now preferred.
It's now time to start giving runtime warning about the use of
'configure.in', so that support for it can be removed in future
versions of autoconf/automake.
* lib/Autom4te/Configure_ac.pm: Issue a warning in the 'obsolete'
category if 'configure.in' is detected. Since this module is synced
from Automake, this change is to be backported there (and will be
soon).
* doc/autoconf.texi: Update.
* tests/tools.at: Adjust to avoid spurious failures.
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Obviously, I didn't fully test commit f35498d.
* doc/autoconf.texi (Limitations of Builtins): Add a comma.
Signed-off-by: Eric Blake <eblake@redhat.com>
The files in lib/Autom4te/ are intentionally not synced at this
point, since this recent Automake patch:
https://lists.gnu.org/archive/html/automake-patches/2012-03/msg00111.html
was buggy regarding '-' as stdout, and also exposes some latent
bugs in autoconf where we use raw 'open' instead of XFile::open.
* build-aux/announce-gen: Resync via 'make fetch'.
* build-aux/config.sub: Likewise.
* build-aux/git-version-gen: Likewise.
* build-aux/gnupload: Likewise.
* build-aux/move-if-change: Likewise.
* build-aux/texinfo.tex: Likewise.
* doc/standards.texi: Likewise.
* maint.mk: Likewise.
Upstream gnulib maint.mk improvements caught a few issues we
should fix, as well as a few issues in files we copy from
other sources that we will just ignore here.
* doc/autoconf.texi (Generic Programs, Special Shell Variables)
(Limitations of Builtins): Use references correctly.
* cfg.mk
(exclude_file_name_regexp--sc_prohibit_undesirable_word_seq)
(exclude_file_name_regexp--sc_useless_cpp_parens): Add exemptions.
* doc/autoconf.texi (Runtime): Mention the effect of the cross-
compilation mode on AC_RUN_IFELSE.
(Specifying Target Triplets): Fix description of --host's effects.
(Hosts and Cross-Compilation): Remove incorrect statement about
--host's effects.
Signed-off-by: Eric Blake <eblake@redhat.com>
In the process of making it public, factor it into a reusable
function. This makes constructs like AC_CHECK_PROGRAM smaller,
as well as making libtool's naughty use of $as_executable_p safer.
* lib/m4sugar/m4sh.m4 (_AS_TEST_PREPARE): Add a shell function.
(AS_EXECUTABLE_P): Forward to shell function.
* doc/autoconf.texi (Common Shell Constructs): Document it.
* NEWS: Mention this.
Signed-off-by: Eric Blake <eblake@redhat.com>
4.3BSD is museum-ware now, so we can assume that test -x exists;
however, we still can't assume that it always does what we want.
* doc/autoconf.texi (Limitations of Builtins) <test (files)>:
Treat 'test -x' as mostly portable, but mention problems with
root user, ACLs, and TOCTTOU races.
Signed-off-by: Eric Blake <eblake@redhat.com>
Many of the .x-sc_* exemptions were no long necessary. Remove those
files and instead, provide exemptions via variable definitions in
cfg.mk to address the few remaining exceptions.
* .x-sc_prohibit_atoi_atof: Remove file.
* .x-sc_space_tab: Likewise.
* .x-sc_sun_os_names: Likewise.
* .x-sc_trailing_blank: Likewise.
* .x-sc_two_space_separator_in_usage: Likewise.
* .x-sc_useless_cpp_parens: Likewise.
* cfg.mk: Add minimal exemptions.
* cfg.mk: Add minimal exemptions.
* doc/standards.texi (Standard C): Address the sole useless-cpp-parens
violation in this file:
-#if defined (__STDC__) || defined (WINDOWSNT)
+#if defined __STDC__ || defined WINDOWSNT
With that, the only remaining offender is config.guess, whose name
is now listed in cfg.mk.
Suggested by Eric Blake.
* cfg.mk (local-checks-to-skip): List failing tests, so we skip
them, for now.
(old_NEWS_hash): Update.
* doc/autoconf.texi: Per suggestion from Eric Blake, obfuscate
the first word of "Filesystem Hierarchy Standard" as File@/system
so it continues to render as one word, yet doesn't trigger the
syntax-check prohibition.
* cfg.mk (gnulib-update): Add them to the list.
* maint.mk: Update from gnulib.
* build-aux/gitlog-to-changelog: Likewise.
* build-aux/useless-if-before-free: New file, from gnulib.
* doc/gnu-oids.texi: Update.
* doc/autoconf.texi (Invoking the Shell): New section.
(Backslash-Newline-Empty): Rename from Backslash-Newline-Newline.
Mention problem with Bash 2.03.
* lib/m4sugar/general.m4 (_AS_DETECT_BETTER_SHELL): Define the macro
`_AS_FORCE_REEXEC_WITH_CONFIG_SHELL' to `yes', so that the code in
`_AS_DETECT_BETTER_SHELL' will cause autoconf-generated configure
scripts to always re-execute themselves with $CONFIG_SHELL, if it's
set in the environment.
* doc/autoconf.texi (config.status Invocation): Update.
* doc/install.texi (Defining Variables): Likewise.
* NEWS: Likewise.
* tests/m4sh.at: Add tests for the new semantics in ...
(Configure re-execs self with CONFIG_SHELL): ... this new
test group.
This works better for symlinks to directories.
Problem reported by Eli Zaretskii via Werner Lemberg in
<http://lists.gnu.org/archive/html/bug-autoconf/2011-12/msg00006.html>.
* NEWS:
* doc/autoconf.texi (Particular Programs): Document this.
* lib/m4sugar/m4sh.m4 (_AS_LN_S_PREPARE): Implement this.
* doc/autoconf.texi (Limitations of Builtins) <export>: Give
concrete example of offender, and drop redundant text.
Reported by Stefano Lattarini.
Signed-off-by: Eric Blake <eblake@redhat.com>
* doc/autoconf.texi (Limitations of Builtins) <export>: Document
export limitation.
Suggested by Bruno Haible.
Signed-off-by: Eric Blake <eblake@redhat.com>
* lib/autoconf/fortran.m4 (AC_PROG_FC): Define `$GFC' to "yes" if
the detected fortran compiler is a GNU compiler, define it to the
empty string otherwise.
This is mostly for consistency for what is done for the C, C++
and Fortran 77 compilers.
* doc/automake.texi: Update.
* doc/autoconf.texi (Signal handling): Rename ...
(Signal Handling): ... to this, for consistency with other node
names. Fix some typos and grammaros. Add more URL references
in comments.
Some Korn shells, when a child process dies due to signal number
n, can leave in $? an exit status of 256+n, instead of the more
common 128+n. See also Austin Group issue 0000051:
<http://www.austingroupbugs.net/view.php?id=51>
* doc/autoconf.texi (Signal handling): Document the described Korn
Shell behaviour, and some of its possible shortcomings.
Suggestion by Eric Blake.
See https://lists.gnu.org/archive/html/bug-diffutils/2011-08/msg00022.html
for precedence in diffutils. The autoconf manual, as of this commit,
was still barely below 400 pages.
* doc/autoconf.texi (copying): Drop front- and back-cover texts.
* NEWS: Document this.
Reported by Brian Gough.
Signed-off-by: Eric Blake <eblake@redhat.com>
The docs referred to @var{program}, which did not exist.
* doc/autoconf.texi (Runtime) <AC_RUN_IFELSE>: Fix wording.
Reported by Reuben Thomas.
Signed-off-by: Eric Blake <eblake@redhat.com>
* doc/autoconf.texi (Automatic Rule Rewriting): Solaris make
VPATH rewriting applies to any whitespace-separated word in a
rule, so it might apply also to shell variables, functions
and keywords (and automake has already tripped on this once);
document this, with an example. Since we are at it, do some
minor reformatting of existing text.