Commit Graph

6511 Commits

Author SHA1 Message Date
Stefano Lattarini
20626b671f 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'.
2012-03-05 20:52:50 +01:00
Paul Eggert
5046bf6ee6 doc: mention PATH bug with "ksh foo"
* doc/autoconf.texi (Invoking the Shell): Mention ksh PATH bug.
2012-03-04 09:50:07 -08:00
Stefano Lattarini
43814d248d 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.
2012-03-04 17:14:14 +01:00
Stefano Lattarini
6e7264cf45 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.
2012-03-04 16:30:17 +01:00
Paul Eggert
3b78f246db 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.
2012-03-03 21:37:17 -08:00
Paul Eggert
49b68f063e 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.
2012-03-03 21:37:17 -08:00
Paul Eggert
bb454862bb 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
2012-03-03 21:37:17 -08:00
Paul Eggert
7d55ba7fd9 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.
2012-03-03 21:37:17 -08:00
Stefano Lattarini
cca288d94e 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.
2012-03-03 10:44:25 +01:00
Paul Eggert
46a40ee9c4 maint: spelling fixes 2012-03-01 22:43:19 -08:00
Eric Blake
36a229e233 maint: post-release administrivia
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
2012-03-01 21:30:13 -07:00
Eric Blake
eeabb77781 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>
2012-03-01 21:28:54 -07:00
Eric Blake
14e8178c50 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>
2012-03-01 21:28:52 -07:00
Eric Blake
ff3011217d 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>
2012-02-25 07:14:29 -07:00
Eric Blake
9e4e0a37d7 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>
2012-02-24 22:12:07 -07:00
Eric Blake
8798792f56 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>
2012-02-24 21:46:26 -07:00
Eric Blake
fed83ed994 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>
2012-02-24 20:52:44 -07:00
Eric Blake
989c790c4f 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>
2012-02-16 14:29:37 -07:00
Paul Eggert
e32b90e41f 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.
2012-02-09 23:33:59 -08:00
Jim Meyering
a1a00a9768 maint: avoid "make syntax-check" failure
* Makefile.am ($(srcdir)/INSTALL): Remove spurious space-before-TAB.
2012-01-28 15:19:38 +01:00
Eric Blake
2fdeca5321 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>
2012-01-23 11:55:29 -07:00
Eric Blake
ac8beb0097 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>
2012-01-23 11:30:35 -07:00
Jim Meyering
ae930c76c7 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.
2012-01-23 09:12:23 +01:00
Paul Eggert
015ecc5018 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>.
2012-01-23 00:11:20 -08:00
Jim Meyering
b035df38e0 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.
2012-01-21 16:01:35 +01:00
Jim Meyering
d9256c2143 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.
2012-01-21 15:14:45 +01:00
Jim Meyering
364bdd3bff maint.mk: update from gnulib
* maint.mk: Update.
2012-01-21 15:14:33 +01:00
Jim Meyering
2ca285bdbc 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.
2012-01-21 15:13:32 +01:00
Jim Meyering
5fdbf57c6a 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.
2012-01-21 11:49:40 +01:00
Jim Meyering
40c846ea9c 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.
2012-01-21 11:49:40 +01:00
Jim Meyering
a7f773305a 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.
2012-01-21 11:49:40 +01:00
Stefano Lattarini
7dae44f737 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.
2012-01-21 10:50:57 +01:00
Stefano Lattarini
95d927ec16 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.
2012-01-21 10:48:20 +01:00
Stefano Lattarini
0383261176 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.
2012-01-20 18:14:51 +01:00
Stefano Lattarini
ff2060231a 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.
2012-01-20 18:03:37 +01:00
Stefano Lattarini
f4be358c2b 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.
2012-01-17 21:24:04 +01:00
Jim Meyering
7137156eec 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.
2012-01-17 13:26:05 +01:00
Stefano Lattarini
6ed5195ee1 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.
2012-01-17 09:18:58 +01:00
Stefano Lattarini
46c04f8009 cosmetics: fix some typos in ChangeLog 2012-01-15 19:11:41 +01:00
Jim Meyering
e2816169d5 getopt: refine syntax of previous change
* lib/Autom4te/General.pm (getopt): Use a more concise test.
2012-01-15 18:51:02 +01:00
Stefano Lattarini
c3797b86cc 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.
2012-01-15 18:07:04 +01:00
Jim Meyering
75a5ef5c88 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.
2012-01-15 17:16:52 +01:00
Stefano Lattarini
5bc3e85e91 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.
2012-01-14 19:04:32 +01:00
Paul Eggert
28fd1f4aa4 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.
2012-01-05 12:33:05 -08:00
Paul Eggert
3b4b3ee585 doc: clarify sed buffer limit
* doc/autoconf.texi (Limitations of Usual Tools):
That 4000-byte limit applies to output and internal buffers, too.
2012-01-05 12:33:05 -08:00
Paul Eggert
b69f4c2834 maint: update copyright year
All files changed to add 2012, via 'make update-copyright'.
2012-01-04 00:20:24 -08:00
Paul Eggert
9b939481e6 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'.
2012-01-04 00:20:24 -08:00
Paul Eggert
afd2a0d7f3 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>.
2012-01-02 11:22:46 -08:00
Paul Eggert
9663eea509 Do not use "win" to refer to Microsoft Windows. 2012-01-01 15:26:39 -08:00
Stefano Lattarini
b5832028b6 configure: will re-execute with $CONFIG_SHELL, if it's set
* lib/m4sugar/general.m4 (_AS_DETECT_BETTER_SHELL): Define the macro
`_AS_FORCE_REEXEC_WITH_CONFIG_SHELL' to `yes', so that the code in
`_AS_DETECT_BETTER_SHELL' will cause autoconf-generated configure
scripts to always re-execute themselves with $CONFIG_SHELL, if it's
set in the environment.
* doc/autoconf.texi (config.status Invocation): Update.
* doc/install.texi (Defining Variables): Likewise.
* NEWS: Likewise.
* tests/m4sh.at: Add tests for the new semantics in ...
(Configure re-execs self with CONFIG_SHELL): ... this new
test group.
2011-12-26 22:17:54 +01:00