]> git.ipfire.org Git - thirdparty/autoconf.git/log
thirdparty/autoconf.git
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.

13 years agotests: ignore ksh -n warnings
Eric Blake [Wed, 7 Mar 2012 17:40:11 +0000 (10:40 -0700)] 
tests: ignore ksh -n warnings

Recent ksh is noisy:

$ ksh -nc '``'; echo $?
ksh: warning: line 1: `...` obsolete, use $(...)
0

* tests/local.at (AT_CHECK_SHELL_SYNTAX): Ignore noisy ksh on.
Reported by Martin Zaun.

Signed-off-by: Eric Blake <eblake@redhat.com>
13 years agotests: port AT_CHECK_ENV to hosts with flaky grep
Paul Eggert [Wed, 7 Mar 2012 06:56:39 +0000 (22:56 -0800)] 
tests: port AT_CHECK_ENV to hosts with flaky grep

* tests/local.at (AT_CHECK_ENV): Don't assume that if one grep
fails, the other will too.  It could be that 'grep' is flaky,
and fails somewhat at random.  This would explain the problems
reported for autoconf-2.68b on FreeBSD and MacOS X, for example:
<http://lists.gnu.org/archive/html/bug-autoconf/2012-03/msg00032.html>
<http://lists.gnu.org/archive/html/bug-autoconf/2012-03/msg00035.html>
<http://lists.gnu.org/archive/html/bug-autoconf/2012-03/msg00036.html>
<http://lists.gnu.org/archive/html/bug-autoconf/2012-03/msg00044.html>

13 years agomaint: resync files from upstream
Stefano Lattarini [Tue, 6 Mar 2012 11:45:10 +0000 (12:45 +0100)] 
maint: resync files from upstream

Since the perl version required in Automake::Getopt has been
recently lowered from 5.6.2 to 5.6.0, this change has the nice
effect of making autoconf compatible again with all perls in
the 5.6.x release series.

* maint.mk: Resync via 'make fetch'.
* lib/Autom4te/Channels.pm: Likewise.
* lib/Autom4te/Configure_ac.pm: Likewise.
* lib/Autom4te/FileUtils.pm: Likewise.
* lib/Autom4te/Getopt.pm: Likewise.
* lib/Autom4te/XFile.pm: Likewise.

13 years agomaint: drop syncing with Automake::Struct
Stefano Lattarini [Mon, 5 Mar 2012 19:19:22 +0000 (20:19 +0100)] 
maint: drop syncing with Automake::Struct

The module Automake::Struct has been removed in automake master
branch (with yesterday's commit v1.11-2055-g74a7f49 "maint: drop
'Automake::Struct' module"): since Automake now requires Perl 5.6,
that module has become obsolete, being basically just a backport
of Perl 5.6's 'Class::Struct' to Perl 5.5.  With this change, we
follow suite in Autoconf, which syncs some of its internal modules
with Automake.

* lib/Autom4te/Struct.pm: Delete.
* lib/Autom4te/Makefile.am (dist_perllib_DATA): Don't list it
anymore.
* cfg.mk: Don't sync it with the Automake repository anymore.
* lib/Autom4te/Request.pm: Use 'Class::Struct' instead of
'Autom4te::Struct'.

13 years agodoc: mention PATH bug with "ksh foo"
Paul Eggert [Sun, 4 Mar 2012 17:49:27 +0000 (09:49 -0800)] 
doc: mention PATH bug with "ksh foo"

* doc/autoconf.texi (Invoking the Shell): Mention ksh PATH bug.

13 years agotests: fix spurious failure due to Solaris XPG4 sh bug
Stefano Lattarini [Sun, 4 Mar 2012 16:14:14 +0000 (17:14 +0100)] 
tests: fix spurious failure due to Solaris XPG4 sh bug

On Solaris 10, the /usr/xpg4/bin/sh shell seems unable to execute
a shell script named 'script':

  $ touch script
  $ /bin/sh script; echo status: $? # As expected.
  status: 0
  $ /usr/xpg4/bin/sh script; echo status: $? # Weirdness follows.
  /usr/xpg4/bin/sh: script: cannot execute
  status: 1

This was causing a spurious testsuite failure for users which have
/usr/xpg4/bin in $PATH before /bin and /usr/bin.  Fix that.

* tests/m4sh.at (Configure re-execs self with CONFIG_SHELL): Rename
the m4sh-produced script to 'script2', to avoid the just-described
issue.

13 years agotests: fix spurious failure when CONFIG_SITE is set
Stefano Lattarini [Sun, 4 Mar 2012 15:30:17 +0000 (16:30 +0100)] 
tests: fix spurious failure when CONFIG_SITE is set

* tests/m4sh.at (Configure re-execs self with CONFIG_SHELL): Export
$CONFIG_SITE to "/dev/null", to avoid spurious diffs in expected
stdout/stderr.

13 years agofortran: clean up core files after AC_FC_CHECK_BOUNDS
Paul Eggert [Sun, 4 Mar 2012 05:35:29 +0000 (21:35 -0800)] 
fortran: clean up core files after AC_FC_CHECK_BOUNDS

* lib/autoconf/fortran.m4 (AC_FC_CHECK_BOUNDS): Clean up core
files, too.  Needed for Sun Fortran 95 8.2 2005/10/13 on Solaris 8.

13 years agotests: port AS_TR_SH and AS_TR_CPP test to Solaris 8 wc
Paul Eggert [Sun, 4 Mar 2012 05:28:01 +0000 (21:28 -0800)] 
tests: port AS_TR_SH and AS_TR_CPP test to Solaris 8 wc

* tests/m4sh.at (AS@&t@_TR_SH and AS@&t@_TR_CPP): Do not assume
that "wc -l" outputs only digits; on Solaris 8 it also outputs
blanks and POSIX allows this.

13 years agotests: fix "#/bin/sh" typo
Paul Eggert [Sun, 4 Mar 2012 02:47:36 +0000 (18:47 -0800)] 
tests: fix "#/bin/sh" typo

* tests/m4sh.at (AS@&t@_EXECUTABLE): "#!/bin/sh", not "#/bin/sh".
Typo reported by Tim Rice in:
http://lists.gnu.org/archive/html/autoconf-patches/2012-03/msg00009.html

13 years agotests: port AS_EXECUTABLE_P test to Solaris 8 /bin/sh
Paul Eggert [Sun, 4 Mar 2012 02:42:21 +0000 (18:42 -0800)] 
tests: port AS_EXECUTABLE_P test to Solaris 8 /bin/sh

* tests/m4sh.at (AS@&t@_EXECUTABLE): Treat any nonzero exit
status as failure.  This is needed for Solaris 8 /bin/sh,
where executing a nonexecutable file causes the shell
to say the file had exit status 1.

13 years agoconfigure: don't infloop when re-executing with $CONFIG_SHELL
Stefano Lattarini [Sat, 3 Mar 2012 09:44:25 +0000 (10:44 +0100)] 
configure: don't infloop when re-executing with $CONFIG_SHELL

It turns out our guard against infinite recursion wasn't good
enough when shells without $LINENO support were involved, since
the creation-and-sourcing of configure.lineno broke the guard's
expectations.  Reports by Tim Rice and Paul Eggert.

* lib/m4sugar/m4sh.m4 (_AS_LINENO_PREPARE): Export '_as_can_reexec'
to "no" before sourcing the just-created configure.lineno.

13 years agomaint: spelling fixes
Paul Eggert [Fri, 2 Mar 2012 05:55:25 +0000 (21:55 -0800)] 
maint: spelling fixes

13 years agomaint: post-release administrivia
Eric Blake [Fri, 2 Mar 2012 04:30:13 +0000 (21:30 -0700)] 
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.68b. v2.68b
Eric Blake [Sun, 26 Feb 2012 00:16:08 +0000 (17:16 -0700)] 
Release Version 2.68b.

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>
13 years agomaint: resync files from upstream
Eric Blake [Wed, 29 Feb 2012 13:39:00 +0000 (06:39 -0700)] 
maint: resync files from upstream

* GNUmakefile: Resync via 'make fetch'.
* build-aux/config.guess: Likewise.
* build-aux/config.sub: Likewise.
* build-aux/texinfo.tex: Likewise.
* build-aux/update-copyright: Likewise.
* doc/standards.texi: Likewise.
* lib/Autom4te/Channels.pm: Likewise.
* lib/Autom4te/Configure_ac.pm: Likewise.
* lib/Autom4te/FileUtils.pm: Likewise.
* lib/Autom4te/Getopt.pm: Likewise.
* lib/Autom4te/Struct.pm: Likewise.
* lib/Autom4te/XFile.pm: Likewise.
* maint.mk: Likewise.

Signed-off-by: Eric Blake <eblake@redhat.com>
13 years agotests: add test for AS_EXECUTABLE_P
Eric Blake [Sat, 25 Feb 2012 14:14:29 +0000 (07:14 -0700)] 
tests: add test for AS_EXECUTABLE_P

Now that this is public, we should regression test it.

* tests/m4sh.at (AS@&t@_EXECUTABLE): New test.

Signed-off-by: Eric Blake <eblake@redhat.com>
13 years agom4sh: make AS_EXECUTABLE_P public
Eric Blake [Sat, 25 Feb 2012 04:54:39 +0000 (21:54 -0700)] 
m4sh: make AS_EXECUTABLE_P public

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>
13 years agom4sh: require that 'test -x' works
Eric Blake [Sat, 25 Feb 2012 04:09:34 +0000 (21:09 -0700)] 
m4sh: require that 'test -x' works

4.3BSD is no longer a reasonable portability target; and we are
pretty sure that these days we can find at least one shell on any
platform that supports 'test -x'.  Drop a horribly unsafe use of
eval as a result. :)

Libtool still uses $as_executable_p without so much as calling
either AS_TEST_X or AS_EXECUTABLE_P; even though the latter has
existed, although undocumented, since at least 2.59; furthermore,
libtool uses it in a context where filtering out directories
would have been desirable.  Shame on them.

* lib/m4sugar/m4sh.m4 (_AS_TEST_X_WORKS): New probe.
(AS_SHELL_SANITIZE, AS_INIT): Use it in shell searching.
(AS_TEST_X, AS_EXECUTABLE_P): Simplify.

Signed-off-by: Eric Blake <eblake@redhat.com>
13 years agodoc: mention more pitfalls of file mode tests
Eric Blake [Sat, 25 Feb 2012 03:45:35 +0000 (20:45 -0700)] 
doc: mention more pitfalls of file mode tests

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>
13 years agodocs: tweak 'rm -f' limitations
Eric Blake [Thu, 16 Feb 2012 21:29:37 +0000 (14:29 -0700)] 
docs: tweak 'rm -f' limitations

Based on http://debbugs.gnu.org/10819 and
http://austingroupbugs.net/view.php?id=542

* doc/autoconf.texi (Limitations of Usual Tools) <rm>: More
details on 'rm -f' without files.

Signed-off-by: Eric Blake <eblake@redhat.com>
13 years agomaint: replace FSF snail-mail addresses with URLs
Paul Eggert [Fri, 10 Feb 2012 07:33:29 +0000 (23:33 -0800)] 
maint: replace FSF snail-mail addresses with URLs

* tests/erlang.at, tests/go.at, tests/statesave.m4:
Replace FSF snail mail addresses with URLs, as per GNU coding
standards, and for consistency with other tests.

13 years agomaint: avoid "make syntax-check" failure
Jim Meyering [Sat, 28 Jan 2012 14:19:38 +0000 (15:19 +0100)] 
maint: avoid "make syntax-check" failure

* Makefile.am ($(srcdir)/INSTALL): Remove spurious space-before-TAB.

13 years agotests: fix test regression due to additional output
Eric Blake [Mon, 23 Jan 2012 18:55:29 +0000 (11:55 -0700)] 
tests: fix test regression due to additional output

This test has been failing since commit 5285ea8c (sadly, since
last July; thankfully, unreleased).

* tests/m4sugar.at (m4@&t@_require: nested): Fix test.

Signed-off-by: Eric Blake <eblake@redhat.com>
13 years agoINSTALL: convert to '' quoting, drop blank line at end
Eric Blake [Mon, 23 Jan 2012 17:48:03 +0000 (10:48 -0700)] 
INSTALL: convert to '' quoting, drop blank line at end

This is allowed by recent GNU Coding Standards changes, and
mirrors recent gnulib changes:
https://lists.gnu.org/archive/html/bug-gnulib/2012-01/msg00267.html
https://lists.gnu.org/archive/html/bug-gnulib/2012-01/msg00298.html

I've confirmed that after these changes, the INSTALL generated and
installed by autoconf matches the INSTALL.ISO in gnulib.

* Makefile.am ($(srcdir)/INSTALL): Match gnulib INSTALL.ISO.

Signed-off-by: Eric Blake <eblake@redhat.com>
13 years agomaint: convert .x-sc_* into exclude_file_name_regexp--sc_* exemptions
Jim Meyering [Sat, 21 Jan 2012 15:12:45 +0000 (16:12 +0100)] 
maint: convert .x-sc_* into exclude_file_name_regexp--sc_* exemptions

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.

13 years agodoc: work around mingw-w64 alloca problem with example
Paul Eggert [Mon, 23 Jan 2012 08:10:55 +0000 (00:10 -0800)] 
doc: work around mingw-w64 alloca problem with example

* doc/autoconf.texi (Particular Functions): In example code for
alloca, do not re-#define alloca.  This works around a mingw-w64
problem reported by Vincent Torri in
<http://lists.gnu.org/archive/html/autoconf/2012-01/msg00018.html>.

13 years agomaint: fix or disable failing syntax-check rules
Jim Meyering [Sat, 21 Jan 2012 11:05:02 +0000 (12:05 +0100)] 
maint: fix or disable failing syntax-check rules

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

13 years agomaint: also sync maint.mk and useless-if-before-free from gnulib
Jim Meyering [Tue, 17 Jan 2012 13:22:02 +0000 (14:22 +0100)] 
maint: also sync maint.mk and useless-if-before-free from gnulib

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

13 years agomaint.mk: update from gnulib
Jim Meyering [Tue, 17 Jan 2012 10:02:03 +0000 (11:02 +0100)] 
maint.mk: update from gnulib

* maint.mk: Update.

13 years agomaint: placate syntax-check rules: exempt some false positives
Jim Meyering [Tue, 17 Jan 2012 09:58:54 +0000 (10:58 +0100)] 
maint: placate syntax-check rules: exempt some false positives

* cfg.mk: Exempt maint.mk from the "undesirable word seq" check.
Exempt maint.mk and autoconf.texi from the test_minus_ao check.

13 years agomaint: tweak to avoid triggering space-tab-prohibiting syntax-check
Jim Meyering [Tue, 17 Jan 2012 09:36:42 +0000 (10:36 +0100)] 
maint: tweak to avoid triggering space-tab-prohibiting syntax-check

* tests/m4sh.at (nargs): Use TAB-SP, not SP-TAB in abusive file name,
to avoid triggering the space-tab-prohibiting syntax-check.

13 years agomaint: remove empty lines at EOF
Jim Meyering [Tue, 17 Jan 2012 09:33:51 +0000 (10:33 +0100)] 
maint: remove empty lines at EOF

* man/autoconf.x: Remove empty line at EOF.
* man/autoheader.x: Likewise.
* man/autoscan.x: Likewise.
* man/autoupdate.x: Likewise.
* man/ifnames.x: Likewise.
* tests/compile.at: Likewise.
* doc/fdl.texi: Likewise.

13 years agodoc: fix grammar/doubled-word errors
Jim Meyering [Tue, 17 Jan 2012 09:31:12 +0000 (10:31 +0100)] 
doc: fix grammar/doubled-word errors

* doc/autoconf.texi: Remove/fix doubled-word errors.
Also, s/can not/cannot/.
* lib/m4sugar/m4sh.m4: Reword "if IF" comment to avoid triggering
the doubled-word warning.

13 years agomaint: sync files from gnulib
Stefano Lattarini [Sat, 21 Jan 2012 09:50:57 +0000 (10:50 +0100)] 
maint: sync files from gnulib

* GNUmakefile: Sync from gnulib.
* build-aux/announce-gen: Likewise.
* build-aux/config.guess: Likewise.
* 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.
* build-aux/update-copyright: Likewise.
* build-aux/vc-list-files: Likewise.
* doc/gendocs_template: Likewise.
* doc/standards.texi: Likewise.
* m4/autobuild.m4: Likewise.

13 years agomaint: make position of gnulib checkout configurable
Stefano Lattarini [Sat, 21 Jan 2012 09:48:20 +0000 (10:48 +0100)] 
maint: make position of gnulib checkout configurable

Some gnulib-related tools (most prominently, the gnulib-provided
'bootstrap' script) allow the user to define the position of his
gnulib's repository checkout through the use of the 'GNULIB_SRCDIR'
environment variable.  We should do the same, for consistency and
to easily support slightly unusual layouts in developers' source
trees.

* cfg.mk (gnulib_dir): Define to "$GNULIB_SRCDIR" if that's set,
and to default value of "'$(abs_srcdir)'/../gnulib" otherwise.
Update comments.

13 years agogetopt: sync from Automake repository
Stefano Lattarini [Wed, 18 Jan 2012 18:08:18 +0000 (19:08 +0100)] 
getopt: sync from Automake repository

* lib/Autom4te/Getopt.am: The master copy of this file has
been moved to the  Automake repository (see Automake commit
'v1.11-662-g52246cc' 2012-01-18, "cmdline parsing: move into
a dedicated perl module").  So we now we sync it from there,
by listing it ...
* cfg.mk (autom4te_files): ... in this variable.

13 years agobuild: fix automake error due to missing ChangeLog
Stefano Lattarini [Fri, 20 Jan 2012 17:03:37 +0000 (18:03 +0100)] 
build: fix automake error due to missing ChangeLog

Apparently, Automake does not accept the '$(srcdir)/ChangeLog'
target in Makefile.am as a declaration that ChangeLog is
automatically generated (and thus does not need to exist at
automake time).  One has to use a *literal* 'ChangeLog' target.

Problem introduced in commit v2.68-118-g6ed5195 of 2012-01-17,
"maint: generate ChangeLog from git log".

* Makefile.ma ($(srcdir)/ChangeLog): Renamed ...
(ChangeLog): ... to this.

13 years agogetopt: new Autom4te::Getopt module
Stefano Lattarini [Tue, 17 Jan 2012 17:49:15 +0000 (18:49 +0100)] 
getopt: new Autom4te::Getopt module

* lib/Autom4te/General.pm (getopt): Move the guts of its
implementation ...
* lib/Autom4te/Getopt.pm (parse_options): .. into this function
in the new Autom4te::Getopt module.  This will make it simpler
for the implementation to be shared with other projects (right
now, Automake).
* lib/Automake/Makefile.am (dist_perllib_DATA): Add the new
module.

13 years agotests: avoid spurious failure for each gnu-fortran-using test
Jim Meyering [Tue, 17 Jan 2012 11:22:59 +0000 (12:22 +0100)] 
tests: avoid spurious failure for each gnu-fortran-using test

The tests compare pre- and post-run lists of envvars, which must
be the same, modulo a list of known, filtered-out exceptions.
However, when running fortran-checking tests with GNU fortran, each
would fail due to the post-run addition of the GFC symbol added in
v2.68-97-gbd962ac.
* tests/local.at (AT_CHECK_ENV): Add GFC to the list of symbols
that we ignore in pre-/post-run environment diffs.

13 years agomaint: generate ChangeLog from git log
Stefano Lattarini [Sun, 15 Jan 2012 18:43:18 +0000 (19:43 +0100)] 
maint: generate ChangeLog from git log

Following the practice set by various other GNU projects, we start
to automatically generate the ChangeLog file from the git commit
messages.  This will avoid duplication (as the ChangeLog entries
were always inserted both in the git commit message and in the
version-controlled ChangeLog file), and potential problems with
spurious merge conflicts (which, although greatly mitigated by
Bruno Haible's `git-merge-changelog' helper program, have never
been completely solved).

* ChangeLog: Moved ...
* ChangeLog.3: ... to this.
* build-aux/gitlog-to-changelog: New script, synced from gnulib.
* cfg.mk (gnulib-update): Also sync gitlog-to-changelog.
* Makefile.am (gen-ChangeLog): New .PHONY rule, generate the
ChangeLog for distribution.
(dist-hook): Depend on it.
($(srcdir)/ChangeLog): New dummy rule, to pacify automake "gnu"
strictness.  Creates a dummy ChangeLog, that will be overridden
by the proper one at distribution time.
(gen_start_date): New variable, the date starting from which the
git log entries are to be copied in the generated ChangeLog.
(EXTRA_DIST): Add ChangeLog.3 and gitlog-to-changelog.
* configure.ac (AC_CONFIG_SRCDIR): Use 'lib/autoconf/autoconf.m4'
instead of 'ChangeLog' as the sentinel file.
* .gitignore: Add ChangeLog.

13 years agocosmetics: fix some typos in ChangeLog
Stefano Lattarini [Sun, 15 Jan 2012 17:28:11 +0000 (18:28 +0100)] 
cosmetics: fix some typos in ChangeLog

13 years agogetopt: refine syntax of previous change
Jim Meyering [Sun, 15 Jan 2012 16:57:54 +0000 (17:57 +0100)] 
getopt: refine syntax of previous change

* lib/Autom4te/General.pm (getopt): Use a more concise test.

13 years agogetopt: remove hack for special handling of "-" argument
Stefano Lattarini [Sun, 15 Jan 2012 08:54:22 +0000 (09:54 +0100)] 
getopt: remove hack for special handling of "-" argument

Older versions of Getopt::Long acted bogusly and died when they
where configured with the 'bundling' flag and an argument '-' was
seen on the command line they were parsing.  That is no longer
the case though, and has not been for quite a long time: the bug
is no longer present in the 5.6.2 version of perl and the 2.25
version of Getopt::Long (and today, the latest versions of perl
and Getopt::Long are respectively 5.14.2 and 2.38).  The obsolete
workaround for that Getopt::Long bug can thus be removed from our
'getopt' function.

It is also worth noting that such a workaround was quite buggy
and brittle itself; for example, a command like this:
  "autom4te --output -"
would have caused the incorrect diagnostic:
  "autom4te: option `--output' requires an argument"
Much worse, a command like this:
  "autom4te --language=autoconf --output - configure.ac"
would have caused the standard input of autom4te to be processed
and copied into the 'configure.ac' file, deleting its pre-existing
content!  Surely not what a user would have expected.

After this change, a command like this:
  autom4te --language=autoconf --output - - <configure.ac >out
works as expected, processing the input from 'configure.ac' and
writing it to the 'out' file.

* lib/Autom4te/General.pm (use): Require perl version 5.6.2.
(getopt): Remove the old workaround.

13 years agoavoid new warning about undefined $ARGV[0]
Jim Meyering [Sun, 15 Jan 2012 16:16:52 +0000 (17:16 +0100)] 
avoid new warning about undefined $ARGV[0]

* lib/Autom4te/General.pm (getopt): Avoid warning induced by
yesterday's change: $ARGV[0] may not be defined, e.g., when
invoked via autoreconf.

13 years agogetopt: fix diagnostic for missing mandatory option argument
Stefano Lattarini [Sat, 14 Jan 2012 18:04:32 +0000 (19:04 +0100)] 
getopt: fix diagnostic for missing mandatory option argument

Before this change, an incorrect command line usage:
  "autom4te --output"
triggered broken diagnostic like:
  "autom4te: unrecognized option `--output'"
instead of the expected and correct:
  "autom4te: option `--output' requires an argument"

* lib/Autom4te/General.pm (getopt): Give correct diagnostic in
case of usage errors due to missing arguments for options for
which they are mandatory.  Code basically copied from automake's
'parse_arguments' private subroutine.

13 years agodoc: mention Bash 2.03 bug with backslash-newline
Paul Eggert [Thu, 5 Jan 2012 20:32:12 +0000 (12:32 -0800)] 
doc: mention Bash 2.03 bug with backslash-newline

* doc/autoconf.texi (Invoking the Shell): New section.
(Backslash-Newline-Empty): Rename from Backslash-Newline-Newline.
Mention problem with Bash 2.03.

13 years agodoc: clarify sed buffer limit
Paul Eggert [Thu, 5 Jan 2012 19:00:45 +0000 (11:00 -0800)] 
doc: clarify sed buffer limit

* doc/autoconf.texi (Limitations of Usual Tools):
That 4000-byte limit applies to output and internal buffers, too.

13 years agomaint: update copyright year
Paul Eggert [Tue, 3 Jan 2012 23:20:25 +0000 (15:20 -0800)] 
maint: update copyright year

All files changed to add 2012, via 'make update-copyright'.

13 years agomaint: resync upstream files
Paul Eggert [Tue, 3 Jan 2012 23:16:52 +0000 (15:16 -0800)] 
maint: resync upstream files

* ChangeLog, GNUmakefile, build-aux/announce-gen:
* build-aux/config.guess, build-aux/config.sub, build-aux/gendocs.sh:
* build-aux/git-version-gen, build-aux/move-if-change:
* build-aux/texinfo.tex, build-aux/update-copyright:
* build-aux/vc-list-files, doc/fdl.texi, doc/gendocs_template:
* doc/standards.texi, lib/Autom4te/XFile.pm, m4/autobuild.m4:
Regenerated by 'make fetch'.

13 years agoautoconf: remove " -link" and ")" from xlf output
Paul Eggert [Mon, 2 Jan 2012 19:22:25 +0000 (11:22 -0800)] 
autoconf: remove " -link" and ")" from xlf output

* lib/autoconf/fortran.m4 (_AC_PROG_FC_V_OUTPUT):
Also remove " -link" and trailing ")" from xlf output.
Problem and fix reported by Thomas Jahns in
<http://lists.gnu.org/archive/html/bug-autoconf/2012-01/msg00000.html>.

13 years agoDo not use "win" to refer to Microsoft Windows.
Paul Eggert [Sun, 1 Jan 2012 23:26:39 +0000 (15:26 -0800)] 
Do not use "win" to refer to Microsoft Windows.