]> git.ipfire.org Git - thirdparty/autoconf.git/log
thirdparty/autoconf.git
12 years agobuild: no more recursion for 'lib/m4sugar' subdir
Stefano Lattarini [Sun, 5 May 2013 17:37:01 +0000 (19:37 +0200)] 
build: no more recursion for 'lib/m4sugar' subdir

* lib/m4sugar/Makefile.am: Delete, its contents merged ...
* lib/Makefile.am: ... in here, with proper adjustments.
(SUBDIRS): Drop 'lib/m4sugar'.
Other related adjustments and re-organizations.
* configure.ac (AC_CONFIG_FILES): Drop 'lib/m4sugar/Makefile'.
* lib/freeze.mk ($(build_libdir)/m4sugar/version.m4): Adjust
recipe.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agobuild: no more recursion for 'lib/autotest' subdir
Stefano Lattarini [Sun, 5 May 2013 16:10:15 +0000 (18:10 +0200)] 
build: no more recursion for 'lib/autotest' subdir

* lib/autotest/Makefile.am: Delete, its contents merged ...
* lib/Makefile.am: ... in here, with proper adjustments.
(SUBDIRS): Drop 'autotest'.
Other minor related modifications.
* configure.ac (AC_CONFIG_FILES): Drop 'lib/autotest/Makefile'.
* lib/freeze.mk (MY_AUTOM4TE): Small required adjustments.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agobuild: no more recursion for 'lib/autoscan' subdir
Stefano Lattarini [Sun, 5 May 2013 15:35:51 +0000 (17:35 +0200)] 
build: no more recursion for 'lib/autoscan' subdir

* lib/autoscan/Makefile.am: Delete, its contents merged ...
* lib/Makefile.am: ... in here, with proper adjustments.
(SUBDIRS): Drop 'autoscan'.
* configure.ac (AC_CONFIG_FILES): Drop 'lib/autoscan/Makefile'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agobuild: no more recursion for 'lib/emacs' subdir
Stefano Lattarini [Sun, 5 May 2013 14:53:54 +0000 (16:53 +0200)] 
build: no more recursion for 'lib/emacs' subdir

* lib/emacs/Makefile.am: Delete, its contents merged ...
* lib/Makefile.am: ... in here, with proper adjustments.
(SUBDIRS): Drop 'emacs'.
* configure.ac (AC_CONFIG_FILES): Drop 'lib/emacs/Makefile'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agobuild: no more make recursion for 'bin' subdir
Stefano Lattarini [Sun, 5 May 2013 14:40:10 +0000 (16:40 +0200)] 
build: no more make recursion for 'bin' subdir

* Makefile.am (MOSTLYCLEANFILES): New, to be extended later by
included files.
($(srcdir)/doc/local.mk): New include.
(SUBDIRS): Drop 'bin'.  Adjust comments.
* bin/Makefile.am: Rename ...
* bin/local.mk: ... like this, and adjust.
* configure.ac (AC_CONFIG_FILES): Drop 'bin/Makefile'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agobuild: no more make recursion for 'doc' subdir
Stefano Lattarini [Sun, 5 May 2013 14:14:06 +0000 (16:14 +0200)] 
build: no more make recursion for 'doc' subdir

* .gitignore: Adjust.
* Makefile.am ($(srcdir)/doc/local.mk): New include.
(SUBDIRS): Drop 'doc'.
(AM_MAKEINFOFLAGS): Rename ...
(custom_MAKEINFOFLAGS): ... like this, to avoid conflicting with
the AM_MAKEINFOFLAGS defined in the included 'doc/local.mk'
($(srcdir)/INSTALL): Adjust recipe.
* doc/Makefile.am: Rename ...
* doc/local.mk: ... like this, and adjust.
* configure.ac (AC_CONFIG_FILES): Drop 'doc/Makefile'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agobuild: don't distribute lib/freeze.mk explicitly
Stefano Lattarini [Sun, 5 May 2013 15:18:00 +0000 (17:18 +0200)] 
build: don't distribute lib/freeze.mk explicitly

It is automatically distributed by Automake, being included by
other Makefile.am files.

* lib/Makefile.am (EXTRA_DIST): Drop 'freeze.mk'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agosync: some files from upstream
Stefano Lattarini [Sun, 5 May 2013 14:13:10 +0000 (16:13 +0200)] 
sync: some files from upstream

* build-aux/config.guess: This.
* build-aux/config.sub: And this.
* build-aux/gendocs.sh: And this.
* build-aux/gnupload: And this.
* build-aux/texinfo.tex: And this.
* doc/standards.texi: And this.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agodoc: add missing semicolons to make rules
Paul Eggert [Wed, 24 Apr 2013 04:42:41 +0000 (21:42 -0700)] 
doc: add missing semicolons to make rules

Problem reported by Peter Eisentraut in
<http://lists.gnu.org/archive/html/bug-autoconf/2013-04/msg00007.html>.
* doc/autoconf.texi (Automatic Remaking): Append semicolons
to rules that need empty commands.

12 years agoAC_PROG_CC etc: avoid warnings when removing conftest* on OS X
Paul Eggert [Tue, 19 Mar 2013 18:22:16 +0000 (11:22 -0700)] 
AC_PROG_CC etc: avoid warnings when removing conftest* on OS X

I forgot one of the fixes Mr. Nakada reported for the 2013-03-08 fix.
* lib/autoconf/general.m4 (AC_EGREP_CPP):
Use rm -rf, not just rm -f, when removing conftest*.

12 years agoAC_PROG_YACC: don't force Bison to warn against its own features
Akim Demaille [Tue, 19 Mar 2013 18:19:17 +0000 (11:19 -0700)] 
AC_PROG_YACC: don't force Bison to warn against its own features

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.

12 years agodoc: explain why single-quoting is better
Paul Eggert [Fri, 8 Mar 2013 17:22:48 +0000 (09:22 -0800)] 
doc: explain why single-quoting is better

* doc/autoconf.texi (Build Directories): Explain single-quoting.
Reported by Markus Elfring in
<http://savannah.gnu.org/support/?108262>.

12 years agoAC_PROG_CC etc: avoid warnings when removing conftest* on OS X
Paul Eggert [Fri, 8 Mar 2013 16:56:18 +0000 (08:56 -0800)] 
AC_PROG_CC etc: avoid warnings when removing conftest* on OS X

Reported by Nobuyoshi Nakada in:
http://lists.gnu.org/archive/html/autoconf-patches/2013-03/msg00003.html
* lib/autoconf/c.m4 (AC_PROG_CC, AC_PROG_CC_C_O, AC_PROG_CXX_C_O):
* lib/autoconf/fortran.m4 (_AC_PROG_FC_C_O):
* lib/autoconf/functions.m4 (AC_FUNC_SELECT_ARGTYPES):
Use rm -rf, not just rm -f, when removing conftest*.

12 years agodocs: configure.in still mentioned in manpages
Pavel Raiskup [Tue, 5 Mar 2013 07:09:41 +0000 (08:09 +0100)] 
docs: configure.in still mentioned in manpages

* man/autoupdate.x: Mention configure.ac as preferred name.
* man/autoscan.x: Likewise.

Signed-off-by: Eric Blake <eblake@redhat.com>
12 years agoAC_FUNC_GETLOADAVG: doc fix
Paul Eggert [Sat, 23 Feb 2013 19:14:49 +0000 (11:14 -0800)] 
AC_FUNC_GETLOADAVG: doc fix

* doc/autoconf.texi (Particular Functions):
Omit incorrect mention of @var{dir} before getloadavg.c.
Problem reported by Patricke Welche in:
http://lists.gnu.org/archive/html/autoconf-patches/2013-02/msg00006.html

12 years agoAC_FUNC_SETPGRP: work even when cross-compiling
Paul Eggert [Thu, 14 Feb 2013 07:28:21 +0000 (23:28 -0800)] 
AC_FUNC_SETPGRP: work even when cross-compiling

* lib/autoconf/functions.m4 (AC_FUNC_SETPGRP):
Use AC_COMPILE_IFELSE rather than AC_RUN_IFELSE.
Problem reported by Alvaro Soliverez in
<http://lists.gnu.org/archive/html/bug-autoconf/2013-02/msg00002.html>.

12 years agoAC_USE_SYSTEM_EXTENSIONS: improve port to HP-UX
Paul Eggert [Fri, 8 Feb 2013 21:01:15 +0000 (13:01 -0800)] 
AC_USE_SYSTEM_EXTENSIONS: improve port to HP-UX

* lib/autoconf/specific.m4 (AC_USE_SYSTEM_EXTENSIONS):
On hosts that need _XOPEN_SOURCE, define it when configuring, too,
so that it's compatible with the value used when compiling.

12 years agoAC_USE_SYSTEM_EXTENSIONS: port to HP-UX, MINUX 3, OS X.
Paul Eggert [Thu, 7 Feb 2013 06:46:49 +0000 (22:46 -0800)] 
AC_USE_SYSTEM_EXTENSIONS: port to HP-UX, MINUX 3, OS X.

* 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.

12 years agoautoscan: port to perl 5.17
Paul Eggert [Tue, 29 Jan 2013 21:46:48 +0000 (13:46 -0800)] 
autoscan: port to perl 5.17

* bin/autoscan.in (scan_sh_file): Escape '{'.  This avoids a
feature that is deprecated in Perl 5.17.  Reported by Ray Lauff in
<http://lists.gnu.org/archive/html/bug-autoconf/2013-01/msg00059.html>.

12 years agom4sugar: fix AS_VAR_GET regression.
Gary V. Vaughan [Tue, 29 Jan 2013 12:17:04 +0000 (19:17 +0700)] 
m4sugar: fix AS_VAR_GET regression.

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.

12 years agom4sugar: factor away _AS_ECHO_PREPARE.
Gary V. Vaughan [Mon, 28 Jan 2013 03:44:45 +0000 (10:44 +0700)] 
m4sugar: factor away _AS_ECHO_PREPARE.

"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.

12 years agoAC_PROG_CXX: document change
Paul Eggert [Tue, 29 Jan 2013 06:57:51 +0000 (22:57 -0800)] 
AC_PROG_CXX: document change

* NEWS: Document recent change to AC_PROG_CXX.

12 years agoAC_PROG_CXX: Add checks for C++11, C++98TR1 and C++98
Roger Leigh [Sun, 20 Jan 2013 18:50:49 +0000 (18:50 +0000)] 
AC_PROG_CXX: Add checks for C++11, C++98TR1 and C++98

These checks are the C++ equivalent of the existing C
standards checks.
* doc/autoconf.texi (C++ Compiler): Document new behavior.
* lib/autoconf/c.m4 (AC_PROG_CXX): Try for C++11,
falling back to C++98.
(_AC_CXX_STD_TRY, _AC_CXX_CXX98_TEST_HEADER, _AC_CXX_CXX98_TEST_BODY)
(_AC_CXX_CXX11_TEST_HEADER, _AC_CXX_CXX11_TEST_BODY)
(_AC_PROG_CXX_CXX98, _AC_PROG_CXX_CXX11):
New macros.

12 years agoAT_TESTED: fix regression in word splitting
Eric Blake [Thu, 3 Jan 2013 23:56:59 +0000 (16:56 -0700)] 
AT_TESTED: fix regression in word splitting

Regression introduced in commit 851ef51.

* lib/autotest/general.m4 (AT_TESTED): Rework loop to quote each
element, not the entire argument.

12 years agoAC_SYS_LARGEFILE: port better to Mac OS X 10.5.
Paul Eggert [Wed, 16 Jan 2013 17:27:15 +0000 (09:27 -0800)] 
AC_SYS_LARGEFILE: port better to Mac OS X 10.5.

* lib/autoconf/specific.m4 (AC_SYS_LARGEFILE): Use AC_DEFINE, not
AH_VERBATIM, to define _DARWIN_USE_64_BIT_INODE, to avoid problems
with ino_t size being different for configuration time versus
build/run time.  Problem reported by PHO in
<http://lists.gnu.org/archive/html/bug-autoconf/2013-01/msg00040.html>.

12 years agoAC_PROG_CC: also check whether $CC supports "-c -o" together
Stefano Lattarini [Thu, 10 Jan 2013 14:14:24 +0000 (15:14 +0100)] 
AC_PROG_CC: also check whether $CC supports "-c -o" together

This is for Automake and its 'subdir-object' mode (see automake bug#13378,
in particular <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13378#73>), so
we make the new behavior available only if the special witness macro
'_AM_PROG_CC_C_O_HELPME' is defined (future Automake versions will define
it).  We might decide, at a later date, to make this behaviour public;
but then we'll have to discuss its usefulness and design more in depth,
and if they are agreed upon, adjust the documentation to match, and also
decide what to do with the macro AC_PROG_CC_C_O, with its similar (but
slightly incompatible) semantics; since doing so right now would bring us
off-track (and Automake needs this change *today*, or better, yesterday),
we proceed with this simpler hack.

* lib/autoconf/c.m4 (AC_PROG_CC): Adjust.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agomaint: resync files from upstream
Eric Blake [Thu, 3 Jan 2013 22:13:04 +0000 (15:13 -0700)] 
maint: resync files from upstream

'make syntax-check' complained about something that was already
fixed upstream in doc/standards.texi, so I ran 'make update', and
omitted lib/Autom4te as that still has some issues to be sorted out.

* GNUmakefile: Resync from upstream.
* build-aux/announce-gen: Likewise.
* build-aux/config.guess: Likewise.
* build-aux/config.sub: Likewise.
* build-aux/git-version-gen: Likewise.
* build-aux/gitlog-to-changelog: Likewise.
* build-aux/gnupload: Likewise.
* build-aux/move-if-change: Likewise.
* build-aux/texinfo.tex: Likewise.
* build-aux/update-copyright: Likewise.
* build-aux/useless-if-before-free: Likewise.
* build-aux/vc-list-files: Likewise.
* doc/gendocs_template: Likewise.
* doc/standards.texi: Likewise.
* m4/autobuild.m4: Likewise.
* maint.mk: Likewise.

12 years agomaint: bump copyright to 2013
Eric Blake [Thu, 3 Jan 2013 21:58:52 +0000 (14:58 -0700)] 
maint: bump copyright to 2013

Done via 'make update-copyright', since all files are effectively
modified and distributed this year via public version control.

* all files: Update copyright year.

12 years agogo: fix checks for about I/O functions
Stefano Lattarini [Wed, 2 Jan 2013 16:01:05 +0000 (17:01 +0100)] 
go: fix checks for about I/O functions

Reference:
<http://lists.gnu.org/archive/html/bug-autoconf/2013-01/msg00000.html>

* lib/autoconf/go.m4 (_AC_LANG_IO_PROGRAM(Go), AC_LANG_INT_SAVE): Here,
correctly use 'os.OpenFile()' <http://golang.org/pkg/os/#OpenFile>
rather than 'os.Open()' <http://golang.org/pkg/os/#Open> (which has
more restricted semantics and incompatible signature).

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agopreselections: update for Automake 1.13.
Stefano Lattarini [Sat, 29 Dec 2012 10:01:40 +0000 (11:01 +0100)] 
preselections: update for Automake 1.13.

Issue revealed by a failure in test "36: autom4te preselections".

* autoconf/lib/autom4te.in (Automake-preselections): Add
'AM_EXTRA_RECURSIVE_TARGETS', remove '_AM_EXTRA_RECURSIVE_TARGETS';
this latter is not, and will not be, present in any *released*
Automake version.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agomaint: sync some files from gnulib
Stefano Lattarini [Sat, 29 Dec 2012 09:32:24 +0000 (10:32 +0100)] 
maint: sync some files from gnulib

* build-aux/config.guess: Synced by "make gnulib-update".
* build-aux/config.sub: Likewise.
* build-aux/gendocs.sh: Likewise.
* build-aux/gnupload: Likewise.
* build-aux/texinfo.tex: Likewise.
* doc/gendocs_template: Likewise.
* doc/standards.texi: Likewise.
* maint.mk: Likewise.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agomaint: don't sync the 'Autom4te::Configure_ac' module from Automake
Stefano Lattarini [Sat, 29 Dec 2012 09:26:47 +0000 (10:26 +0100)] 
maint: don't sync the 'Autom4te::Configure_ac' module from Automake

That file has been removed in the master branch of Automake, since
Automake 1.14 will remove support for 'configure.in' as a name for
Autoconf input files.  See commits 'v1.13-17-gbff57c8' and
'v1.13-21-g7626e63' in the Automake repository.

* cfg.mk (autom4te_files): Remove 'Autom4te/Configure_ac.pm'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agoAC_C__GENERIC: New macro.
Paul Eggert [Thu, 27 Dec 2012 22:34:07 +0000 (14:34 -0800)] 
AC_C__GENERIC: New macro.

* NEWS, doc/autoconf.texi (C Compiler): Document it.
* lib/autoconf/c.m4 (AC_C__GENERIC): Implement it.

12 years agoautotest: enable usage of EXEEXT in AT_TESTED
Paolo Bonzini [Fri, 7 Dec 2012 13:00:19 +0000 (14:00 +0100)] 
autotest: enable usage of EXEEXT in AT_TESTED

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>
12 years agoautotest: add a simple test suite that runs a C program
Paolo Bonzini [Fri, 7 Dec 2012 12:47:06 +0000 (13:47 +0100)] 
autotest: add a simple test suite that runs a C program

* tests/autotest.at (C unit tests): New testcase.
* NEWS: Document change.

Signed-off-by: Paolo Bonzini <bonzini@gnu.org>
12 years agoautotest: annotate tests that use AC_CONFIG_TESTDIR
Paolo Bonzini [Fri, 7 Dec 2012 12:56:12 +0000 (13:56 +0100)] 
autotest: annotate tests that use AC_CONFIG_TESTDIR

* tests/autotest.at (srcdir propagation, Erlang Eunit unit tests):
Add a keyword for AC_CONFIG_TESTDIR.

Signed-off-by: Paolo Bonzini <bonzini@gnu.org>
12 years agoAC_FUNC_ALLOCA: port to recent BSDs and remove obsolete AIX
Paul Eggert [Fri, 21 Dec 2012 05:21:04 +0000 (21:21 -0800)] 
AC_FUNC_ALLOCA: port to recent BSDs and remove obsolete AIX

* doc/autoconf.texi (Particular Functions): Remove the AIX case
from the recommended code, as the most recent version of the AIX
compiler that IBM still supports (V10.1 as of this writing) has
<alloca.h> and thus longer needs this, and the old suggestion
wasn't completely working anyway.  Remove obsolete discussion of
SVR3 libPW alloca and of SVR4 libucb alloca.
* lib/autoconf/functions.m4 (AC_FUNC_ALLOCA):
Rework to match documentation, including abovementioned AIX change.
Inconsistency with documentation reported by Steven G. Johnson in
<http://lists.gnu.org/archive/html/autoconf/2003-03/msg00179.html>.
As this adds stdlib.h, it should also fix the problems on recent
BSD platforms noted by Patrick Welche in
http://lists.gnu.org/archive/html/autoconf-patches/2012-12/msg00009.html
though the fix differs from NetBSD's current workaround.
Also, don't bother checking for alloca if <alloca.h> works,
as the latter implies the former.

12 years agoAC_PROG_CC_C99: avoid unused-var warning
Paul Eggert [Mon, 10 Dec 2012 18:06:10 +0000 (10:06 -0800)] 
AC_PROG_CC_C99: avoid unused-var warning

* lib/autoconf/c.m4 (_AC_C_C99_TEST_HEADER): Rewrite to use vars.
Problem reported by ChangZhuo Chen in
<http://lists.gnu.org/archive/html/bug-autoconf/2012-12/msg00000.html>.

12 years agoautotest: define AT_DATA_UNQUOTED
Paolo Bonzini [Fri, 7 Dec 2012 12:21:59 +0000 (13:21 +0100)] 
autotest: define AT_DATA_UNQUOTED

* 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>
12 years agoAC_CHECK_FILES: improve documentation
Paul Eggert [Sat, 17 Nov 2012 19:06:05 +0000 (11:06 -0800)] 
AC_CHECK_FILES: improve documentation

* doc/autoconf.texi (Files): Document AC_CHECK_FILES better.
Reported by Christophe Curis in
<http://savannah.gnu.org/support/?108182>.

12 years agosyntax-check: remove SPACE-TAB sequence
Stefano Lattarini [Fri, 16 Nov 2012 10:36:10 +0000 (11:36 +0100)] 
syntax-check: remove SPACE-TAB sequence

* lib/autoconf/c.m4 (_AC_PROG_CC_C99): Here.  Was causing a
failure in the 'space_tab' syntax check.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agobuild: fix unneeded workaround for AC_CONFIG_LINKS old bud
Stefano Lattarini [Fri, 16 Nov 2012 10:27:55 +0000 (11:27 +0100)] 
build: fix unneeded workaround for AC_CONFIG_LINKS old bud

* configure.ac: The Automake NEWS entry for version 1.11 states that

    For AC_CONFIG_LINKS, if source and destination are equal, do
    not remove the file in a non-VPATH build.  Such setups work
    with Autoconf 2.62 or newer.

Since our build system requires autoconf >= 2.62 and automake >= 1.11
already, we can get rid of the workaround for that long-fixed bug.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agobuild: require autoconf >= 2.62, and related simplifications
Stefano Lattarini [Fri, 16 Nov 2012 10:22:21 +0000 (11:22 +0100)] 
build: require autoconf >= 2.62, and related simplifications

* configure.ac: Require 2.62, and remove obsolescent comments.
We are not imposing an new restriction in doing so, since we already
require Automake 1.11 or later, and that requires Autoconf 2.62.
Simplify code for symlinking of GNUmakefile in VPATH builds, in
accordance with the existing "TODO" comments.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agoAC_CONFIG_MACRO_DIRS: improve tracing and add sanity checks
Eric Blake [Fri, 9 Nov 2012 22:41:18 +0000 (15:41 -0700)] 
AC_CONFIG_MACRO_DIRS: improve tracing and add sanity checks

Too many legacy tools exist for us to unilaterally quit supporting
AC_CONFIG_MACRO_DIR - it is feasible for someone to want their
package to bootstrap with both automake 1.13 and libtool 2.4.2,
where the newer automake will only trace the new style of multiple
directory listings, but the older libtool does a sed and settles
on the one use of the old name.  So, we let both macros forward
to a new tracing macro, which also has the benefit of sanitizing
calls into one directory per trace; we also ensure that the old
macro is always traced, and appears at most once and before any
use of the new macro.

* doc/autoconf.texi (Input) <AC_CONFIG_MACRO_DIRS>: Document how
to trace this macro.
* lib/autom4te.in (Autoreconf-preselections)
(Automake-preselections): Preselect this trace.
* lib/autoconf/general.m4 (AC_CONFIG_MACRO_DIR_TRACE): New trace.
(_AC_CONFIG_MACRO_DIRS_USED, _AC_CONFIG_MACRO_DIRS): New internal
macros.
(AC_CONFIG_MACRO_DIRS, AC_CONFIG_MACRO_DIR): Use them.
* tests/tools.at (autoconf --trace: AC_CONFIG_MACRO_DIRS): New
test.

12 years agowarn: allow aclocal to silence m4_require warnings
Stefano Lattarini [Sat, 3 Nov 2012 12:05:09 +0000 (13:05 +0100)] 
warn: allow aclocal to silence m4_require warnings

We introduce a new witness macro, m4_require_silent_probe, for use by
aclocal during the Autoconf-without-aclocal-m4 language.  This will let
aclocal process AC_CONFIG_MACRO_DIRS without emitting spurious warnings.
In fact, if aclocal doesn't suppress require warnings, then, when some macro
expanded in configure.ac calls AC_REQUIRE on another macro that is defined
in one of the local m4 macro dirs specified with AC_CONFIG_MACRO_DIRS, the
*first* autom4te invocation issued by aclocal, not yet being able to "see"
the m4 macro definitions in the local m4 dirs, will print spurious
warnings like:

    configure.ac:4: warning: MY_BAR is m4_require'd but not m4_defun'd
    configure.ac:3: MY_FOO is expanded from...

Expose the use of this macro in our testsuite.

Originally reported by Nick Bowler; see point (4) of:
<http://lists.gnu.org/archive/html/autoconf-patches/2012-11/msg00000.html>

* lib/m4sugar/m4sugar.m4 (_m4_require_call): Make warnings in the
-Wsyntax category depend on the witness macro.
* tests/m4sugar.at (m4@&t@_require: warning message): New test.
* doc/autoconf.texi (Prerequisite Macros): Document how aclocal
can silence AC_REQUIRE (m4_require) warnings.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
12 years agodocs: ACLOCAL_AMFLAGS will become obsolescent in Automake 1.13
Stefano Lattarini [Sat, 3 Nov 2012 12:05:08 +0000 (13:05 +0100)] 
docs: ACLOCAL_AMFLAGS will become obsolescent in Automake 1.13

See commit 'v1.12.1-165-gcd1a9cc' "aclocal: deprecate ACLOCAL_AMFLAGS,
trace AC_CONFIG_MACRO_DIR instead" in the Automake git repository.

See also follow-up discussion at:
<http://lists.gnu.org/archive/html/automake-patches/2012-07/msg00010.html>

* doc/autoconf.texi (@node Input @defmac AC_CONFIG_MACRO_DIRS): Adjust.
(autoreconf Invocation): Warn about the possible future removal of
ACLOCAL_AMFLAGS support from Automake.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
12 years agoAC_CONFIG_MACRO_DIRS: new macro, mostly for aclocal
Stefano Lattarini [Wed, 17 Oct 2012 10:15:56 +0000 (12:15 +0200)] 
AC_CONFIG_MACRO_DIRS: new macro, mostly for aclocal

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>
12 years agocosmetics: slightly improve a comment
Stefano Lattarini [Sat, 22 Sep 2012 07:48:30 +0000 (09:48 +0200)] 
cosmetics: slightly improve a comment

* lib/autom4te.in: Here, the comment about 'AM_PROG_MKDIR_P'.

Suggested-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agoautom4te: update Automake preselections to reflect upcoming 1.13
Stefano Lattarini [Sat, 27 Oct 2012 10:03:44 +0000 (12:03 +0200)] 
autom4te: update Automake preselections to reflect upcoming 1.13

Issue revealed by a failure in test "35: tools.at: autom4te preselections"

* lib/autom4te.in ("Automake-preselections"): Add automake-provided
macro '_AM_EXTRA_RECURSIVE_TARGETS'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agoAC_PROG_CC_C89, AC_PROG_CC_C99: Use AU_DEFUN
Paul Eggert [Wed, 24 Oct 2012 22:28:24 +0000 (15:28 -0700)] 
AC_PROG_CC_C89, AC_PROG_CC_C99: Use AU_DEFUN

* tests/mktests.sh (au_exclude_list): Exclude AC_PROG_CC_C89
and AC_PROG_CC_C99 too.  Suggested by Adrian Bunk.

12 years agoAC_PROG_CC_C89, AC_PROG_CC_C99, AC_PROG_CC_STDC: Use AU_DEFUN
Paul Eggert [Wed, 24 Oct 2012 19:25:34 +0000 (12:25 -0700)] 
AC_PROG_CC_C89, AC_PROG_CC_C99, AC_PROG_CC_STDC: Use AU_DEFUN

This fixes a bug introduced by the most recent change to c.m4.
Problem reported by Jim Meyering in
<http://lists.gnu.org/archive/html/autoconf/2012-10/msg00048.html>.
* lib/autoconf/c.m4 (AC_PROG_CC_C89, AC_PROG_CC_C99, AC_PROG_CC_STDC):
Use AU_DEFUN and AC_REQUIRE, not AU_ALIAS, as the latter is not
compatible with how Automake redefines AC_PROG_CC.

12 years agoAC_PROG_CC_C89, AC_PROG_CC_C99, AC_PROG_CC_STDC: Use AU_ALIAS.
Paul Eggert [Tue, 16 Oct 2012 20:32:31 +0000 (13:32 -0700)] 
AC_PROG_CC_C89, AC_PROG_CC_C99, AC_PROG_CC_STDC: Use AU_ALIAS.

Based on a suggestion by Adrian Bunk in
http://lists.gnu.org/archive/html/autoconf-patches/2012-09/msg00040.html
* lib/autoconf/c.m4 (AC_PROG_CC_C89, AC_PROG_CC_C99, AC_PROG_CC_STDC):
Use AU_ALIAS, now that AC_PROG_CC is defined via AC_DEFUN_ONCE.

12 years agoAC_PROG_CC: define via AC_DEFUN_ONCE
Paul Eggert [Tue, 16 Oct 2012 20:20:58 +0000 (13:20 -0700)] 
AC_PROG_CC: define via AC_DEFUN_ONCE

Suggested by Adrian Bunk in
http://lists.gnu.org/archive/html/autoconf-patches/2012-09/msg00034.html
* NEWS:
* doc/autoconf.texi (C Compiler): Document it
* lib/autoconf/c.m4 (AC_PROG_CC): Implement it.

12 years agoAC_PROG_CC: clarify documentation, encourage -qlanglvl=extc1x
Paul Eggert [Fri, 28 Sep 2012 17:44:16 +0000 (10:44 -0700)] 
AC_PROG_CC: clarify documentation, encourage -qlanglvl=extc1x

* doc/autoconf.texi (C Compiler): Document the intent of AC_PROG_CC
better.  It's not meant to check for strict conformance, only to
get the latest version with extensions.
(Running the Preprocessor, Present But Cannot Be Compiled):
Document new diagnostic wording.
* lib/autoconf/c.m4 (_AC_C_STD_TRY): Change diagnostic wording from
"checking for gcc option to accept ISO C11" to
"checkint for gcc option to enable C11 features", as this better
reflects what is actually happening.
(_AC_PROG_CC_C99): Put -qlanglvl=extc1x here ...
(_AC_PROG_CC_C11): ... rather than here, as it doesn't pass the C11
test with IBM XL C V12.1, and the point is to enable features not to
test for strict conformance.

12 years agoAC_PROG_CC: try -qlanglvl=extc1x, for IBM XL C V12.1
Paul Eggert [Wed, 26 Sep 2012 14:49:59 +0000 (07:49 -0700)] 
AC_PROG_CC: try -qlanglvl=extc1x, for IBM XL C V12.1

* lib/autoconf/c.m4 (_AC_PROG_CC_C11): Add -qlanglvl=extc1x, for
IBM XL C V12.1.  It shouldn't pass the C11 test yet, since it's not
documented to support _Alignas, _Alignof, UTF-8 string literals,
and duplicate typedefs, but presumably it will eventually.

12 years agomaint: fix the comment at the end of _AC_FUNC_REALLOC_IF
Adrian Bunk [Tue, 25 Sep 2012 12:25:03 +0000 (15:25 +0300)] 
maint: fix the comment at the end of _AC_FUNC_REALLOC_IF

* lib/autoconf/functions.m4: fix the comment at the end of
_AC_FUNC_REALLOC_IF
Copyright-paperwork-exempt: yes

12 years agoAC_PROG_CC_C89, AC_PROG_CC_C99: now obsolete; defer to AC_PROG_CC
Paul Eggert [Sat, 22 Sep 2012 02:19:54 +0000 (19:19 -0700)] 
AC_PROG_CC_C89, AC_PROG_CC_C99: now obsolete; defer to AC_PROG_CC

* 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.

12 years agotests: sort preselections to make test failures easier to read
Eric Blake [Fri, 21 Sep 2012 21:27:58 +0000 (15:27 -0600)] 
tests: sort preselections to make test failures easier to read

Prompted by Stefano Lattarini's report of a test failure due to
a missing preselection for automake 1.12.

* tests/tools.at (autom4te preselections): Sort before diffing.

12 years agomaint: resync most files from upstream
Stefano Lattarini [Fri, 21 Sep 2012 12:37:00 +0000 (14:37 +0200)] 
maint: resync most files from upstream

The files in lib/Autom4te/ are intentionally not synced at this point,
since automake commit v1.11-2114-g2d671e1 "perl refactor: use modern
semantics of 'open'":
<http://lists.gnu.org/archive/html/automake-patches/2012-03/msg00111.html>
would require wider adaptation of our scripts to the new XFile API, and
also exposes some latent bugs in autoconf where we use raw 'open' instead
of XFile::open.  We'll take care of that in a later patches (maybe).

* build-aux/announce-gen: Resync via 'make fetch'.
* build-aux/config.guess: Likewise.
* build-aux/config.sub: Likewise.
* build-aux/gendocs.sh: Likewise.
* build-aux/gitlog-to-changelog: Likewise.
* build-aux/gnupload: Likewise.
* build-aux/texinfo.tex: Likewise.
* doc/make-stds.texi: Likewise.
* doc/standards.texi: Likewise.
* maint.mk: Likewise.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agobuild: quote 'like this', not `like this'
Stefano Lattarini [Fri, 21 Sep 2012 10:34:48 +0000 (12:34 +0200)] 
build: quote 'like this', not `like this'

As per updated GCS recommendations.

* Makefile.am, configure.ac, lib/m4sugar/Makefile.am,
tests/Makefile.am, m4/m4.m4: Here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agoautom4te: update Automake preselections to reflect the changes in 1.12.x
Stefano Lattarini [Fri, 21 Sep 2012 19:28:34 +0000 (21:28 +0200)] 
autom4te: update Automake preselections to reflect the changes in 1.12.x

Issue revealed by a failure in test "35: tools.at: autom4te preselections":
<http://lists.gnu.org/archive/html/bug-autoconf/2012-09/msg00020.html>

* lib/autom4te.in: Add 'AM_PROG_MKDIR_P'.

Helped-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agoautoreconf: assume --force-missing automake option is supported
Stefano Lattarini [Fri, 21 Sep 2012 18:59:01 +0000 (20:59 +0200)] 
autoreconf: assume --force-missing automake option is supported

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>
12 years agoautoreconf: minor simplifying refactoring
Stefano Lattarini [Fri, 21 Sep 2012 07:56:06 +0000 (09:56 +0200)] 
autoreconf: minor simplifying refactoring

* bin/autoreconf.in (run_aclocal): After the previous commit, this has
become just a useless wrapper around xsystem("$aclocal .."), so get rid
of it, and inline its expansion in the two places where it was used ...
(autoreconf_current_directory): ... in here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agoautoreconf: drop support for old (< 1.8) aclocal versions
Stefano Lattarini [Fri, 21 Sep 2012 07:51:33 +0000 (09:51 +0200)] 
autoreconf: drop support for old (< 1.8) aclocal versions

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>
12 years agoscripts: quote 'like this', not `like this'
Stefano Lattarini [Fri, 21 Sep 2012 08:51:36 +0000 (10:51 +0200)] 
scripts: quote 'like this', not `like this'

As per updated GCS recommendations.

* bin/autoconf.as, bin/autoreconf.in, bin/autoscan.in, ifnames.in,
bin/autoupdate.in: Throughout these files.
* bin/autoheader.in, bin/autom4te.in: Likewise.  Also, remove some
useless escaping of the "'" single-quote characters, and reformat
some message for better line wrapping.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 years agoAC_PROG_CC_STDC: fold into AC_PROG_CC, removing C11 macro
Paul Eggert [Thu, 20 Sep 2012 21:32:06 +0000 (14:32 -0700)] 
AC_PROG_CC_STDC: fold into AC_PROG_CC, removing C11 macro

* 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.

12 years agoAC_FUNC_VFORK: check for Solaris 2.4 signal-handling bug
Paul Eggert [Sun, 16 Sep 2012 23:41:48 +0000 (16:41 -0700)] 
AC_FUNC_VFORK: check for Solaris 2.4 signal-handling bug

* NEWS:
* doc/autoconf.texi (Particular Functions): Document this.
* lib/autoconf/functions.m4 (_AC_FUNC_VFORK): Check for the bug.

12 years agoAC_CHECK_ALIGNOF: fix cross-compilation bug with newer gcc
Paul Eggert [Thu, 6 Sep 2012 21:50:27 +0000 (14:50 -0700)] 
AC_CHECK_ALIGNOF: fix cross-compilation bug with newer gcc

* 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>.

12 years agoAC_PROG_CC_C11: new macro, which AC_PROG_CC_STDC now defaults to
Paul Eggert [Thu, 23 Aug 2012 19:45:39 +0000 (12:45 -0700)] 
AC_PROG_CC_C11: new macro, which AC_PROG_CC_STDC now defaults to

* 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.

12 years agoAC_SUBST: document and test previous patch
Eric Blake [Thu, 16 Aug 2012 04:17:49 +0000 (22:17 -0600)] 
AC_SUBST: document and test previous patch

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>
12 years agoAC_SUBST: don't underquote the variable name
Nick Bowler [Thu, 16 Aug 2012 03:54:53 +0000 (21:54 -0600)] 
AC_SUBST: don't underquote the variable name

Consider the following:

% cat >configure.ac <<'EOF'
AC_INIT([test], [0])

m4_define([FOO], [baz])
AC_SUBST([FOO], [bar])

AC_CONFIG_FILES([test])
AC_OUTPUT
EOF

% cat >test.in <<'EOF'
@FOO@
EOF

This produces no error messages at autoconf time and none at configure
time.  Nevertheless, the substituted value of FOO is the empty string,
instead of bar, as expected.  Sure enough, in the output variables
section of config.log, we see FOO='' instead of FOO='bar'.  Looking
at the generated configure script, we see that AC_SUBST has produced
baz=bar in the output, instead of the expected FOO=bar.  But this is
the only place: everywhere else is still using FOO.

* lib/autoconf/general.m4 (AC_SUBST): Add another layer of
quoting.
* THANKS: Update.

Signed-off-by: Eric Blake <eblake@redhat.com>
13 years agodoc: fix style issues in the display of macro optional arguments
Akim Demaille [Sun, 22 Jul 2012 08:24:02 +0000 (10:24 +0200)] 
doc: fix style issues in the display of macro optional arguments

* doc/autoconf.texi (@dvarv): New.
Use it where optional macro arguments default to other arguments.

13 years agomaint: avoid new syntax-check failure
Jim Meyering [Sun, 22 Jul 2012 10:26:26 +0000 (12:26 +0200)] 
maint: avoid new syntax-check failure

* cfg.mk (exclude_file_name_regexp--sc_prohibit_defined_have_decl_tests):
Exempt autoconf.texi's test of "#if defined HAVE_DECL_MALLOC".

13 years agotests: use configure.ac, not configure.in, with aclocal/automake involved
Stefano Lattarini [Sat, 21 Jul 2012 15:31:11 +0000 (17:31 +0200)] 
tests: use configure.ac, not configure.in, with aclocal/automake involved

Do so because future automake and aclocal versions (starting from 1.13)
drop support for 'configure.in' as the name of the Autoconf input file.
Without this patch, the Autoconf testsuite experiences some spurious
failures when run with the development version of aclocal and automake
installed early enough in $PATH.

* tests/torture.at: Rename 'configure.in' to 'configure.ac' throughout.
Remove an obsolete comment about backward-compatibility.

Helped-by: Jim Meyering <jim@meyering.net>
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agodoc: mention trap pitfalls
Eric Blake [Wed, 18 Jul 2012 20:53:24 +0000 (14:53 -0600)] 
doc: mention trap pitfalls

Document why the previous patch was useful.

* doc/autoconf.texi (Limitations of Builtins) <trap>: Mention the
need to be defensive in trap handlers.

13 years agogeneral: Sanitize IFS in EXIT trap
Andreas Schwab [Wed, 18 Jul 2012 20:23:14 +0000 (22:23 +0200)] 
general: Sanitize IFS in EXIT trap

IFS may be modified temporarily when the configure script receives a
signal.  Make sure the EXIT trap uses the standard value.

* lib/autoconf/general.m4: Sanitize IFS in trap.
* THANKS: Update.

Copyright-paperwork-exempt: Yes

13 years agodoc: fix texinfo macro usage
Patrice Dumas [Wed, 18 Jul 2012 19:41:45 +0000 (13:41 -0600)] 
doc: fix texinfo macro usage

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

13 years agodoc: fix texinfo location reports
Eric Blake [Tue, 17 Jul 2012 18:02:12 +0000 (12:02 -0600)] 
doc: fix texinfo location reports

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.

13 years agom4sh: avoid // issues in _AS_PATH_WALK
Eric Blake [Fri, 13 Jul 2012 16:45:32 +0000 (10:45 -0600)] 
m4sh: avoid // issues in _AS_PATH_WALK

As reported by Paul Keir on the cygwin lists,
http://cygwin.com/ml/cygwin/2012-07/msg00263.html,
some people like to stick / in their $PATH, and if we then try
to probe $as_dir/progname for existence, we can end up causing
cygwin to have a several-second timeout per //name probe.  It
is better to avoid inserting the extra slash when $as_dir is the
root directory, and simpler to code by always having a trailing
slash present than it is to strip a trailing slash.  Thankfully,
_AS_PATH_WALK is an undocumented interface, and even if someone
was using it in spite of the warnings, their use of $as_dir/foo
will typically only lead to odd-looking /dir//foo probes, with
only the case of / in $PATH causing slowdowns, and only when //
is special.

There was also a minor bug where the if-not-found code of
_AS_PATH_WALK could be executed with $IFS still in the wrong state.

* lib/m4sugar/m4sh.m4 (_AS_PATH_WALK): Always end as_dir in /.
Avoid wrong IFS during if-not-found.  Minor optimization to avoid
regex.
(_AS_DETECT_BETTER_SHELL, _AS_SHELL_SANITIZE): Update clients.
* lib/autotest/general.m4 (_AT_FINISH): Likewise.
* lib/autoconf/programs.m4 (_AC_CHECK_PROG, _AC_PATH_PROG)
(_AC_PATH_PROGS_FEATURE_CHECK, _AC_PATH_PROG_FLAVOR_GNU): Likewise.

13 years agodoc: avoid hard-coding usage of automake's missing
Eric Blake [Fri, 29 Jun 2012 14:54:43 +0000 (08:54 -0600)] 
doc: avoid hard-coding usage of automake's missing

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.

13 years agomaint: don't sync elisp-comp or missing from gnulib
Eric Blake [Wed, 27 Jun 2012 22:59:21 +0000 (16:59 -0600)] 
maint: don't sync elisp-comp or missing from gnulib

Automake 1.13 will be changing the semantics of 'missing'; maintaining
our own copy in version control risks problems if our version does
not match automake's expectations.  As a result, gnulib no longer
mirrors 'missing'.  Furthermore, gnulib originally added the
'elisp-comp' module with the explanation that autoconf uses it, but
we don't use it anywhere other than the manner in which automake
will byte-compile our .el files; since we don't document the script,
we should be just fine using the version that was installed by automake.

See more discussion in the thread starting here:
https://lists.gnu.org/archive/html/automake-patches/2012-06/msg00154.html

* cfg.mk (gnulib-update): Drop files installed by automake and no
longer present in gnulib.
* .gitattributes: Delete references to files not in git.

13 years agomaint: add attribution
Eric Blake [Mon, 18 Jun 2012 13:11:26 +0000 (07:11 -0600)] 
maint: add attribution

* THANKS: Update.

13 years agofunctions: add Bitrig defaults
David Hill [Mon, 18 Jun 2012 00:52:58 +0000 (20:52 -0400)] 
functions: add Bitrig defaults

Cater to the Bitrig OS, an OpenBSD fork.  config.guess and
config.sub have been updated upstream.

* lib/autoconf/functions.m4 (_AC_FUNC_MALLOC_IF)
(_AC_FUNC_REALLOC_IF): Bitrig inherits from BSD.

13 years agomaint: fix typos in old ChangeLog files
Jim Meyering [Tue, 29 May 2012 10:33:46 +0000 (12:33 +0200)] 
maint: fix typos in old ChangeLog files

Culprits identified and fixed automatically using these commands:
git ls-files | misspellings -f - |grep -v '^ERROR:' |perl -pe \
's/^(.*?)\[(\d+)\]: (\w+) -> "(.*?)"$/sed -i '\''${2}s!$3!$4!'\'' $1/'\
|bash
using http://github.com/lyda/misspell-check
* ChangeLog.2, ChangeLog.3: Fix typos.

13 years agogeneral: deprecate 'configure.in' as autoconf input
Stefano Lattarini [Sun, 6 May 2012 08:38:01 +0000 (10:38 +0200)] 
general: deprecate 'configure.in' as autoconf input

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>
13 years agofunctions: improve cross-compilation guesses for glibc system hosts
Bruno Haible [Wed, 2 May 2012 21:02:49 +0000 (23:02 +0200)] 
functions: improve cross-compilation guesses for glibc system hosts

Paul and Eric suggested that improving the cross-compilation guesses
for targets that are glibc systems would be welcome here [1][2].

This patch modifies the cross-compilation behaviour of
  AC_FUNC_CHOWN
  AC_FUNC_GETGROUPS
  AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
  AC_FUNC_MALLOC
  AC_FUNC_MMAP
  AC_FUNC_REALLOC
  AC_FUNC_STRCOLL
so that when the target is a glibc system (or, in case of AC_FUNC_MALLOC
and AC_FUNC_REALLOC, any known "good" Unix system), the guess is
"yes it works" rather than "guessing no".

This is important because some of these macros are used in Gnulib, and
in case of "guessing no" Gnulib provides extra workaround code, and
  1) Generally, when targetting embedded systems, code size should be
     minimized,
  2) In [3], unnecessary workaround code will look like a Glibc bug.

This patch also changes the configure output to "guessing yes" or
"guessing no" in a case where the ac_cv_* variable is undocumented.

[1] http://lists.gnu.org/archive/html/bug-gnulib/2012-05/msg00010.html
[2] http://lists.gnu.org/archive/html/bug-gnulib/2012-05/msg00013.html
[3] http://sourceware.org/glibc/wiki/Testing/Gnulib

This patch was tested with the simple configure.ac file
=============== configure.ac ==================
AC_INIT([dummy], [0])
AC_FUNC_CHOWN
AC_FUNC_GETGROUPS
AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
AC_FUNC_MALLOC
AC_FUNC_MMAP
AC_FUNC_REALLOC
AC_FUNC_STRCOLL
AC_OUTPUT
===============================================

* lib/autoconf/functions.m4 (AC_FUNC_CHOWN): Require AC_CANONICAL_HOST.
When cross-compiling to a glibc system, guess yes.
(AC_FUNC_GETGROUPS): Likewise.
(AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Likewise.
(AC_FUNC_STRCOLL): Likewise.
(_AC_FUNC_MALLOC_IF): Require AC_CANONICAL_HOST. When cross-compiling
to a know Unix system other than AIX and OSF/1, guess yes.
(_AC_FUNC_REALLOC_IF): Likewise.
(AC_FUNC_MMAP): Require AC_CANONICAL_HOST. When cross-compiling to a
system with a Linux kernel, guess yes.

13 years agodoc: fix another bad @xref
Eric Blake [Thu, 3 May 2012 15:28:20 +0000 (09:28 -0600)] 
doc: fix another bad @xref

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>
13 years agomaint: post-release administrivia
Eric Blake [Wed, 25 Apr 2012 03:06:32 +0000 (21:06 -0600)] 
maint: post-release administrivia

* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.

13 years agoRelease Version 2.69. v2.69
Eric Blake [Wed, 25 Apr 2012 02:17:06 +0000 (20:17 -0600)] 
Release Version 2.69.

* NEWS: Mention the release.

Signed-off-by: Eric Blake <eblake@redhat.com>
13 years agomaint: drop bz2 tarball
Eric Blake [Wed, 25 Apr 2012 02:38:57 +0000 (20:38 -0600)] 
maint: drop bz2 tarball

At 2.68b, I asked whether anyone would miss .gz and .bz2 formats.
Consensus was overwhelming that .gz still holds a place in people's
hearts, in spite of .xz compressing to smaller files, but no one
was able to make a convincing argument for .bz2.

* configure.ac (AM_INIT_AUTOMAKE): Drop bzip2; xz wins hands down.

Signed-off-by: Eric Blake <eblake@redhat.com>
13 years agomaint: resync files from upstream
Eric Blake [Tue, 24 Apr 2012 23:30:37 +0000 (17:30 -0600)] 
maint: resync files from upstream

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.

13 years agodoc: fix bad @xref uses
Eric Blake [Wed, 25 Apr 2012 02:08:06 +0000 (20:08 -0600)] 
doc: fix bad @xref uses

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.

13 years agoAC_INIT: remove a transitional warning
Bruno Haible [Sun, 22 Apr 2012 17:42:24 +0000 (19:42 +0200)] 
AC_INIT: remove a transitional warning

On bi-arch systems (such as x86 / x86_64) it is often necessary to pass
the --host option together with an appropriate value for CC. But this
triggers a warning:

$ ./configure --host=i686-pc-linux-gnu CC="gcc -m32 -march=i586"
configure: WARNING: if you wanted to set the --build type, don't use --host.
    If a cross compiler is detected then cross compile mode will be used
..

This warning was introduced on 2000-06-30, in commit
<http://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=cb2e761b8e1181f97e8e09d85526bd22078433db>
with the remark "Re-enable the old behavior of --host and --build."

This warning was meant to warn users about a changed semantics of
--build and --host. This change is now 12 years in the past; users
have had enough time to learn it. I therefore suggest to remove the
warning.

I've done lots of cross and bi-arch compilations in the last 10 years,
all with --host and without --build, and have never observed a problem
with it, except for the warning. Simply relying on config.guess is sufficient.

* lib/autoconf/general.m4 (_AC_INIT_PARSE_ARGS): Don't warn if --host
given without --build.

Signed-off-by: Eric Blake <eblake@redhat.com>
13 years agodoc: fix incorrect and incomplete doc about cross-compilation mode
Bruno Haible [Mon, 23 Apr 2012 19:43:04 +0000 (21:43 +0200)] 
doc: fix incorrect and incomplete doc about cross-compilation mode

* 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>
13 years agodoc: document --build and cross-compilation better
Paul Eggert [Mon, 23 Apr 2012 17:30:05 +0000 (10:30 -0700)] 
doc: document --build and cross-compilation better

* doc/autoconf.texi (Specifying Target Triplets): Mention that
specifying a build-type that differs from host-type enables
cross-compilation.  Problem reported by Bruno Haible in:
http://lists.gnu.org/archive/html/autoconf-patches/2012-04/msg00009.html

13 years agomaint: avoid "make syntax-check" failure
Jim Meyering [Wed, 11 Apr 2012 10:05:38 +0000 (12:05 +0200)] 
maint: avoid "make syntax-check" failure

* cfg.mk (old_NEWS_hash): Update to reflect typo fix in old news.

13 years agocosmetics fix imprecise comment in Autom4te::General
Stefano Lattarini [Wed, 28 Mar 2012 22:29:12 +0000 (00:29 +0200)] 
cosmetics fix imprecise comment in Autom4te::General

* lib/Autom4te/General.pm: This file is *not* used by Automake;
adjust comments accordingly.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: fix port of AT_CHECK_ENV to hosts with flaky grep
Paul Eggert [Wed, 7 Mar 2012 22:22:54 +0000 (14:22 -0800)] 
tests: fix port of AT_CHECK_ENV to hosts with flaky grep

* tests/local.at (AT_CHECK_ENV): Don't copy the buggy grep's
diagnostics to stderr, as that causes AT_CHECK to fail.  They can
be found in the stderr-* files if this is needed for debugging.

13 years agodocs: document set -n pitfalls
Eric Blake [Wed, 7 Mar 2012 18:11:58 +0000 (11:11 -0700)] 
docs: document set -n pitfalls

* doc/autoconf.texi (Limitations of Builtins) <set>: Document
issues with set -n.

13 years agobuild: require perl 5.6
Eric Blake [Wed, 7 Mar 2012 17:47:01 +0000 (10:47 -0700)] 
build: require perl 5.6

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.