Commit Graph

1969 Commits

Author SHA1 Message Date
Paul Eggert
787acdfaa7 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.
2012-09-16 16:42:20 -07:00
Paul Eggert
f52459d158 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>.
2012-09-06 14:55:09 -07:00
Paul Eggert
db36f6df60 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.
2012-08-23 12:46:20 -07:00
Eric Blake
1bb104167e 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>
2012-08-15 22:23:04 -06:00
Akim Demaille
b406df6adc 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.
2012-07-26 08:13:53 +02:00
Eric Blake
45737f00b0 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.
2012-07-18 14:58:16 -06:00
Patrice Dumas
a357718b08 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
2012-07-18 13:51:17 -06:00
Eric Blake
8c8522f1c5 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.
2012-07-17 12:02:12 -06:00
Eric Blake
7f1e05a5fc 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.
2012-06-29 08:54:43 -06:00
Stefano Lattarini
560f16b52d 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>
2012-05-23 00:13:01 +02:00
Eric Blake
926a43c86d 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>
2012-05-03 09:29:06 -06:00
Eric Blake
84e20e9164 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.
2012-04-24 20:15:05 -06:00
Eric Blake
f35498d15c 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.
2012-04-24 20:14:19 -06:00
Bruno Haible
303e507c27 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>
2012-04-24 15:01:02 -06:00
Paul Eggert
ed96f6541c 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
2012-04-23 10:30:19 -07:00
Eric Blake
943789e03f docs: document set -n pitfalls
* doc/autoconf.texi (Limitations of Builtins) <set>: Document
issues with set -n.
2012-03-07 11:16:38 -07: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
Paul Eggert
46a40ee9c4 maint: spelling fixes 2012-03-01 22:43:19 -08: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
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
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
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
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
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
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
Stefano Lattarini
d1b31ac57c docs: issue with shell functions and here-documents on Solaris
* doc/autoconf.texi (Here-Documents): Using a command substitution
in a here-documents being fed to a shell function is unportable.

Problem revealed by the automake testsuite:
<http://lists.gnu.org/archive/html/automake-patches/2011-12/msg00149.html>
2011-12-26 11:33:41 +01:00
Paul Eggert
17ea0df46f AS_LN_S: fall back on 'cp -pR' (not 'cp -p') if 'ln -s' fails
This works better for symlinks to directories.
Problem reported by Eli Zaretskii via Werner Lemberg in
<http://lists.gnu.org/archive/html/bug-autoconf/2011-12/msg00006.html>.
* NEWS:
* doc/autoconf.texi (Particular Programs): Document this.
* lib/m4sugar/m4sh.m4 (_AS_LN_S_PREPARE): Implement this.
2011-12-26 00:35:06 -08:00
Paul Eggert
a8942db4d7 doc: document GNU make's \#
* doc/autoconf.texi (Comments in Make Macros): Also mention \#
in the right hand side of a macro, as an unportable usage.
2011-12-05 14:21:44 -08:00
Eric Blake
7aae67fbef doc: tweak previous commit
* doc/autoconf.texi (Limitations of Builtins) <export>: Give
concrete example of offender, and drop redundant text.
Reported by Stefano Lattarini.

Signed-off-by: Eric Blake <eblake@redhat.com>
2011-11-11 14:19:04 -07:00
Eric Blake
2f3cec7dfc doc: mention export portability hint
* doc/autoconf.texi (Limitations of Builtins) <export>: Document
export limitation.
Suggested by Bruno Haible.

Signed-off-by: Eric Blake <eblake@redhat.com>
2011-11-11 13:51:33 -07:00
Stefano Lattarini
bd962acf3e fortran: define $GFC to "yes" if $FC is a GNU compiler
* lib/autoconf/fortran.m4 (AC_PROG_FC): Define `$GFC' to "yes" if
the detected fortran compiler is a GNU compiler, define it to the
empty string otherwise.
This is mostly for consistency for what is done for the C, C++
and Fortran 77 compilers.
* doc/automake.texi: Update.
2011-10-21 14:00:36 +02:00
Stefano Lattarini
e0cb97afda docs: we prefer US English spelling over British one
* doc/autoconf.texi (Parallel Make): Prefer `behavior' over
`behaviour' in a couple of places.
2011-10-06 10:40:23 +02:00
Stefano Lattarini
f60916593d docs: some fixlets in section about shell signal handling
* doc/autoconf.texi (Signal handling): Rename ...
(Signal Handling): ... to this, for consistency with other node
names.  Fix some typos and grammaros.  Add more URL references
in comments.
2011-10-06 10:35:48 +02:00
Stefano Lattarini
124d6e9d96 docs: korn shells can have $? > 256 for signal-terminated children
Some Korn shells, when a child process dies due to signal number
n, can leave in $? an exit status of 256+n, instead of the more
common 128+n.  See also Austin Group issue 0000051:
  <http://www.austingroupbugs.net/view.php?id=51>

* doc/autoconf.texi (Signal handling): Document the described Korn
Shell behaviour, and some of its possible shortcomings.

Suggestion by Eric Blake.
2011-10-06 10:34:14 +02:00
Eric Blake
00f569ae0c docs: relax documentation license by dropping cover text
See https://lists.gnu.org/archive/html/bug-diffutils/2011-08/msg00022.html
for precedence in diffutils.  The autoconf manual, as of this commit,
was still barely below 400 pages.

* doc/autoconf.texi (copying): Drop front- and back-cover texts.
* NEWS: Document this.
Reported by Brian Gough.

Signed-off-by: Eric Blake <eblake@redhat.com>
2011-09-26 12:02:35 -06:00
Stefano Lattarini
cff03ec71f docs: signal-related bugs and incompatibilities for the shells
* doc/autoconf.texi (Signal handling): New paragraph.
(@menu at "Portable Shell", @detailmenu): Update.

Motivated by recent discussion on the bug-autoconf list, as well
as work in the automake testsuite:
 <https://lists.gnu.org/archive/html/bug-autoconf/2011-09/msg00003.html>
 <https://lists.gnu.org/archive/html/bug-autoconf/2011-09/msg00004.html>
 <http://lists.gnu.org/archive/html/automake-patches/2011-09/msg00066.html>
2011-09-20 18:10:19 +02:00
Eric Blake
f37c5e315c docs: refer to correct AC_RUN_IFELSE parameter name
The docs referred to @var{program}, which did not exist.

* doc/autoconf.texi (Runtime) <AC_RUN_IFELSE>: Fix wording.
Reported by Reuben Thomas.

Signed-off-by: Eric Blake <eblake@redhat.com>
2011-09-19 10:59:14 -06:00
Eric Blake
2a9b772222 docs: fix typo in shell example
* doc/autoconf.texi (Shell Substitutions): Fix typo.
* THANKS: Update.
Reported by Nick Bowler.

Signed-off-by: Eric Blake <eblake@redhat.com>
2011-09-16 13:37:38 -06:00
Stefano Lattarini
19951ff75b docs: more details about make VPATH rewriting woes
* doc/autoconf.texi (Automatic Rule Rewriting): Solaris make
VPATH rewriting applies to any whitespace-separated word in a
rule, so it might apply also to shell variables, functions
and keywords (and automake has already tripped on this once);
document this, with an example.  Since we are at it, do some
minor reformatting of existing text.
2011-09-16 10:21:14 +02:00
Stefano Lattarini
7b49187003 docs: document Solaris 10 /bin/ksh and XPG4 sh 'unset' bug
* doc/autoconf.texi (Limitations of Builtins): Solaris 10 ksh
and XPG4 sh also fails upon `unset' of a variable that is not
set.
2011-09-13 16:24:41 +02:00
Stefano Lattarini
96cdf32954 docs: other issues with parallel BSD make
Motivated by automake bug#9245:
 <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9245>
and FreeBSD PR bin/159730:
 <http://www.freebsd.org/cgi/query-pr.cgi?pr=159730>

* doc/autoconf.texi (Parallel Make): Document other BSD make
incompatibilities.  Reorganize the existing related documentation
accordingly.
2011-08-18 21:08:13 +02:00