* lib/autoconf/specific.m4 (AC_USE_SYSTEM_EXTENSIONS):
Also define __STDC_WANT_IEC_60559_BFP_EXT__,
__STDC_WANT_IEC_60559_FUNCS_EXT__, and __STDC_WANT_LIB_EXT2__.
* NEWS, doc/autoconf.texi (Posix Variants):
Document this. Also, document other changes in this area
that were not properly documented before.
* lib/autoconf/general.m4 (_AC_UNDECLARED_WARNING): New macro.
(_AC_CHECK_DECL_BODY): Call it once per language; treat warnings as
errors when its verdict indicates that.
* tests/semantics.at (AC_CHECK_DECLS): Add a macro call that relies on
the new semantics. Avoid -Wmissing-variable-declarations warnings.
* doc/autoconf.texi (Generic Declarations): Document the implications.
* NEWS: Mention this change.
* lib/autoconf/c.m4 (AC_C_VARARRAYS): Define __STDC_NO_VLA__ if
VLAs are not supported, as this is what C11 does. The old macro
HAVE_C_VARARRAYS is still defined if they are supported, but is
now obsolescent. Also, check for VLA bug in GCC 3.4.3.
* doc/autoconf.texi (C Compiler), NEWS: Document the above.
Done via 'make update-copyright', since all files are effectively
modified and distributed this year via public version control.
* all files: Update copyright year.
* lib/autoconf/headers.m4 (_AC_INCLUDES_DEFAULT_REQUIREMENTS):
Include stddef.h, stdlib.h, and string.h unconditionally.
Don't include memory.h at all.
Don't use AC_HEADER_STDC.
Don't check for stddef.h, stdlib.h, string.h, or memory.h.
For compatibility, unconditionally define STDC_HEADERS,
HAVE_STDLIB_H, and HAVE_STRING_H.
(AN_HEADER list): Remove C89 headers, and memory.h from list.
(AC_HEADER_STDC, AC_UNISTD_H): AU_DEFUN to trigger
_AC_INCLUDES_DEFAULT_REQUIREMENTS if it hasn't already happened,
and do nothing else.
(AC_HEADER_TIME): AU_DEFUN, and define TIME_WITH_SYS_TIME unconditionally
as long as sys/time.h is present.
(AC_USG, AC_MEMORY_H): Assume existence of string.h.
* lib/autoconf/functions.m4 (_AC_FUNC_MALLOC_IF, _AC_FUNC_REALLOC_IF):
Don't use AC_HEADER_STDC. Assume stdlib.h exists.
(AC_FUNC_MKTIME): Don't use AC_HEADER_TIME. Assume time.h exists.
(AC_FUNC_ALLOCA): Assume stdlib.h exists.
(_AC_LIBOBJ_FNMATCH): Assume wchar.h and wctype.h exist.
(_AC_LIBOBJ_GETLOADAVG): Assume locale.h exists.
(AC_FUNC_MMAP): Assume stdlib.h exists.
* tests/tools.at: Use AC_WORDS_BIGENDIAN instead of AC_STDC_HEADERS in
autoupdate test.
* NEWS, doc/autoconf.texi: Document changes. Remove obsolete advice.
* lib/autoconf/headers.m4 (AC_CHECK_HEADER): Use _AC_CHECK_HEADER_COMPILE
by default. Continue to use _AC_CHECK_HEADER_PREPROC if fourth arg is '-'.
(_AC_CHECK_HEADER_PREPROC): Issue a deprecation warning.
(_AC_CHECK_HEADER_MONGREL, _AC_CHECK_HEADER_MONGREL_BODY): Remove.
* tests/c.at, tests/semantics.at: Update uses of AC_CHECK_HEADER(S).
* doc/autoconf.texi, NEWS: Document change.
http://lwn.net/Articles/436012/ documents that many distros
are now preferring to use /run rather than /var/run for
storage of pid files and other per-process temporary files
that must not be cleaned out during arbitrary TMPDIR sweeps.
As such, the GNU Coding Standards were recently changed to
recommend a new configure option to make it easy to choose
this directory at configure time. This patch adds support
for the option to all configure scripts built by autoconf.
* general.m4 (_AC_INIT_PARSE_ARGS): Add new directory option.
(_AC_INIT_HELP): Document it.
* doc/autoconf.texi (Installation Directory Variables): Document
new option.
(Site Defaults): Mention typical use within a distro.
* NEWS: Mention the addition.
Signed-off-by: Eric Blake <eblake@redhat.com>
When invoked with -y/--yacc, Bison warns when its extensions over
POSIX Yacc are used. Yet many packages requiring GNU Bison use
Autoconf/Automake's Yacc support, which passes -y to Bison. It
turns out that passing '-o y.tab.c' has exactly the desired
effect: generating not only y.tab.c but also y.tab.h with -d and
y.output with -v. See:
http://lists.gnu.org/archive/html/bison-patches/2013-02/msg00100.html
* lib/autoconf/programs.m4 (AC_PROG_YACC): Use bison -o y.tab.c.
* NEWS, doc/autoconf.texi: Document this change.
* NEWS: Mention this.
* lib/autoconf/specific.m4 (AC_USE_SYSTEM_EXTENSIONS):
Define _NETBSD_HOST on MINUX, for MINUX 3.
Define _DARWIN_C_SOURCE, for OS X.
On HP-UX, define _XOPEN_SOURCE.
AS_VAR_GET expands AS_ECHO inside en evaled single quoted string,
which causes the single quotes in "printf '%s\n'" to expose the
%s\n to the shell which expands "\n" to simply "n" before passing
it to printf.
* lib/m4sugar/m4sh.m4 (AS_ECHO): Use double quotes around the
format string.
* doc/autoconf.texi (Limitations of Shell Builtins): Show double
quotes to match AS_ECHO expansion.
* NEWS: Likewise.
"printf '%s\n' ..." has been a fine replacement for plain "echo"
for at least 5 years (probably more like 10), even with most
museum-piece shells.
* lib/m4sugar/m4sh.m4 (_AS_ECHO_PREPARE): Remove.
(_AS_SHELL_SANITIZE): Keep as_nl setting originally from
_AS_ECHO_PREPARE here where it more properly belongs.
(AS_ECHO, AS_ECHO_N): Use printf unconditionally.
* doc/autoconf.texi (Limitations of Shell Builtins): Document
preference for 'printf' over working around 'echo' bugs.
* NEWS: Updated.
Reported by Jim Meyering.
Done via 'make update-copyright', since all files are effectively
modified and distributed this year via public version control.
* all files: Update copyright year.
Together with Linux's binfmt-misc feature, Wine can be used to test
cross-compiled programs as if they were native. However, the shell
will not perform the "magic" addition of the .exe extension after a
program name when searching for an executable. These simple patches
let the user work around this by specifying $EXEEXT in the AT_CHECK
and AT_TESTED argument. (More care is needed because of carriage
returns, but this is beyond the scope of this series).
* tests/autotest.at (AT_INIT): Expand contents of $at_tested.
(AT_TESTED): Quote each program that is passed to the function.
* lib/autotest/general.m4 (C unit tests): Add AT_TESTED invocation
and keyword.
* doc/autoconf.texi (Writing testsuites): Document usage of variables
in AT_TESTED.
* NEWS: Document change.
Signed-off-by: Paolo Bonzini <bonzini@gnu.org>
* lib/autotest/general.m4 (AT_DATA_UNQUOTED): New macro, paralleling
AT_DATA but not quoting the contents.
* doc/autoconf.texi (Writing Testsuites): Document it.
* tests/autotest.at (AT_DATA_UNQUOTED): Test it.
Signed-off-by: Paolo Bonzini <bonzini@gnu.org>
Similar to AC_CONFIG_MACRO_DIR, but accepts more than one argument.
This will allow projects to use several m4 macro local dirs. This is
especially important for projects that are used as nested subpackages
of larger projects.
See also:
<http://lists.gnu.org/archive/html/autoconf/2011-12/msg00037.html>
<http://lists.gnu.org/archive/html/automake-patches/2012-07/msg00010.html>
* lib/autoconf/general.m4 (AC_CONFIG_MACRO_DIRS): New. Expands to the
empty anyway, since it is only meant to be traced by tools like aclocal
and autoreconf.
(AC_CONFIG_MACRO_DIR): Updated comments.
* doc/autoconf.texi (@node "Input"): Document AC_CONFIG_MACRO_DIRS as
preferred over AC_CONFIG_MACRO_DIR.
* NEWS: Update.
Suggested-by: Eric Blake <eblake@redhat.com>
Helped-by: Nick Bowler <nbowler@elliptictech.com>
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
* NEWS:
* doc/autoconf.texi (C Compiler, Running the Preprocessor)
(Limitations of Usual Tools, Present But Cannot Be Compiled)
(Obsolete Macros):
Document the changes described below.
* lib/autoconf/c.m4 (_AC_PROG_CC_FORCE_VERSION): Remove.
(AC_PROG_CC_C89, AC_PROG_CC_C99, AC_PROG_CC_STDC):
Just do AC_PROG_CC, but mark as obsolete. This replaces my recent
ill-advised attempt to let AC_PROG_CC_C89 and AC_PROG_CC_C99 downgrade
the version of C supported.
* doc/autoconf.texi (Limitations of Usual Tools, Volatile Objects):
Document C11 more accurately. In some cases this involves removing
some details about 'volatile', alas, since C11 changed this stuff.
Again.
According to Automake's NEWS file, it is since at least Automake 1.8,
and in autoreconf we are already assuming aclocal >= 1.8 anyway.
* bin/autoreconf.in (parse_args): Simplify a little by just assuming
the automake option '--force-missing' is supported.
($automake_supports_force_missing): Delete, no longer needed.
* NEWS: Update.
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
The minimal automake and aclocal version required by the "most"
conservative important real world-projects (like Gnulib and Libvirt)
is 1.9 anyway (which is the version installed on old but still
supported installations of stable Distros like RHEL 5), so this
change should be safe and justified by now.
* bin/autoreconf.in (parse_args): Simplify by just assuming the aclocal
options '--force' and '--no-force' are supported and works correctly.
($aclocal_supports_force): Delete, no longer needed.
(run_aclocal): Heavily simplify by assuming that aclocal properly creates
'aclocal.m4' as lazily as possible.
* NEWS: Update.
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* NEWS:
* doc/autoconf.texi (C Compiler): Document the following.
* lib/autoconf/c.m4 (AC_PROG_CC): Check for the latest C version
supported, not just C89.
(_AC_C_STD_TRY): Keep track of the options we add to bring
the C compiler up to standard, so that we can undo it if the
user later requests some other C standard.
(_AC_PROG_CC_FORCE_VERSION): New macro.
(AC_PROG_CC_C89, AC_PROG_CC_C99): Use it. These macros now
have a documented side effect of changing the C version requested.
(AC_PROG_CC_C11): Remove. It wasn't useful.
(AC_PROG_CC_STDC): Now an obsolescent alias for AC_PROG_CC.
(AC_C_PROTOTYPES): Allow any standard C version, not just c89.
Don't chatter, since we don't actually run any checking code.
* lib/autoconf/types.m4 (AC_TYPE_LONG_LONG_INT)
(AC_TYPE_UNSIGNED_LONG_LONG_INT): Treat C11 like C99.
* TODO: Remove the TODO item corresponding to the above.
* 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.
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>
This reduces the implicit requirement from 5.6.2 back to 5.6,
while raising the explicit requirement to match the actual code.
* configure.ac (PERL): Fail up front if perl is too old.
* NEWS: Document this.
* README: Likewise.
* README-hacking: Likewise.
* lib/Autom4te/ChannelDefs.pm: Bump requirement.
* lib/Autom4te/General.pm: Relax requirement.
It's been more than a year since 2.68; time for a beta release
to shake out any last minute bugs, before a release of 2.69
in the near future.
* NEWS: Mention the release.
* HACKING: Update some instructions.
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>
* 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.
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>
* lib/autoconf/fortran.m4 (AC_FC_PP_DEFINE): New macro.
* lib/autom4te.in (Automake-preselections): Preselect it.
* doc/autoconf.texi (Fortran Compiler): Document it.
* tests/local.at (_AT_CHECK_ENV): Do not complain about
FCFLAGS_F nor FC_DEFINE.
* NEWS: Update.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* lib/autoconf/fortran.m4 (AC_FC_PP_SRCEXT): New macro.
* lib/autom4te.in (Automake-preselections): Preselect it.
* doc/autoconf.texi (Fortran Compiler): Document it, rewriting
the documentation for AC_FC_SRCEXT along the way.
* tests/fortran.at (AC_FC_PP_SRCEXT usage): New test.
* tests/mktests.sh: Exclude the macro from default testing.
* NEWS: Update.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* lib/autoconf/fortran.m4 (AC_FC_MODULE_FLAG): New macro,
adjusted and rewritten from the AX_F90_MODULE_FLAG macro from
the Autoconf Macro Archive by Luc Maisonobe, Julian C. Cummings,
and Alexander Pletzer.
* doc/autoconf.texi (Fortran Compiler): Document it.
* tests/fortran.at (AC_FC_MODULE_FLAG): New test.
* tests/local.at (AT_CHECK_ENV): Do not complain about FC_MODINC
setting.
* NEWS, THANKS: Update.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* lib/autoconf/fortran.m4 (AC_FC_MODULE_EXTENSION): New macro,
rewritten from the AX_F90_MODULE_EXTENSION macro from the
Autoconf Macro Archive by Luc Maisonobe and Alexander Pletzer.
* doc/autoconf.texi (Fortran Compiler): Document it.
* tests/local.at (_AT_CHECK_ENV): Do not complain about
FC_MODEXT setting.
* NEWS, THANKS: Update.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* NEWS: Document this.
* doc/autoconf.texi (Particular Headers): Likewise.
In example, don't assume a 'system.h' exists.
* lib/autoconf/headers.m4 (AC_CHECK_HEADER_STDBOOL): New macro.
Use it with AN_IDENTIFIER, since it's less heavyweight.
Reindent to match gnulib, since that's a bit nicer.
(AC_HEADER_STDBOOL): Reimplement in terms of it.