Commit Graph

2066 Commits

Author SHA1 Message Date
Zack Weinberg
c16be7152d
Only probe C++ language features, not library, for speed (#110285)
The test programs used by _AC_PROG_CXX_CXX98 and _AC_PROG_CXX_CXX11
can take several seconds to compile, even on current-generation CPUs.
Each of them may be test-compiled up to six times as the configure
script searches for appropriate command-line switches.  This is
reported to cancel out all of the other performance gains made since
2.69.

Replace these programs with simpler ones that do not exercise the C++
standard *library* and can be compiled in less than a second each.
On my computer, which is quite new, the minimal configure script

    AC_INIT
    AC_PROG_CXX

executes in 4.5 seconds (wall-clock) before this change and 0.5
seconds after.

* lib/autoconf/c.m4 (_AC_CXX_CXX98_TEST_HEADER, _AC_CXX_CXX98_TEST_BODY):
  Rewrite to test only C++ 1998 language features, not library features.
  (_AC_CXX_CXX11_TEST_HEADER, _AC_CXX_CXX11_TEST_BODY):
  Similarly for C++ 2011.
* doc/autoconf.texi (AC_PROG_CXX): Document this change.
2020-08-04 13:08:31 -04:00
Paul Eggert
e30ed26209 Fix regression that broke Automake ‘make check’
Problem reported by Ken Moffat (sr#110287); the problem was
introduced in 2016-12-21T16:15:46Z!daniel.kitta@gmail.com.
* bin/autoheader.in (templates_for_header):
When generating warnings about symbols lacking templates,
downgrade template read failure from a fatal error to a warning.
Also, don’t even try to read from a template file whose name has
shell metavariables (which Autoconf 2.50 withdrew support for);
just warn about that, too.  These changes cause the Automake
tests to merely generate warnings that are ignored, instead
of failing.
* doc/autoconf.texi (Configuration Files, Configuration Headers)
(Configuration Commands, Configuration Links):
Also document here that the file names should not contain
shell metacharacters, to make this constraint more obvious.
2020-08-01 11:47:42 -07:00
Paul Eggert
e9bfc7c758 * doc/autoconf.texi: Tweak wording. 2020-07-31 14:22:28 -07:00
Bruno Haible
ca67a088dc doc: Update some more macro descriptions.
* doc/autoconf.texi (Particular Functions): Add a remark about AC_FUNC_MMAP.
Clarify AC_FUNC_STRCOLL.
2020-07-31 14:22:28 -07:00
Bruno Haible
091805f6ac doc: Refer to Gnulib where it makes sense.
* doc/autoconf.texi (Particular Functions): Point to Gnulib wherever Gnulib has
more workarounds than mentioned for the particular macro, namely for
AC_FUNC_CHOWN, AC_FUNC_FSEEKO, AC_FUNC_GETGROUPS, AC_FUNC_GETMNTENT,
AC_FUNC_MBRTOWC, AC_FUNC_STRERROR_R, AC_FUNC_STRTOLD.
2020-07-31 14:22:28 -07:00
Bruno Haible
61f97e6070 doc: Refer to Gnulib instead of asking clients to provide replacement code.
* doc/autoconf.texi (Particular Functions): Point to Gnulib for all macros that
may call AC_LIBOBJ, namely AC_FUNC_ALLOCA, AC_FUNC_MALLOC, AC_FUNC_OBSTACK,
AC_FUNC_REALLOC, AC_FUNC_STRNLEN.
2020-07-31 14:22:28 -07:00
Paul Eggert
15edf7fd80 Remove obsolete Cray support
Gnulib removed this recently, and we should be consistent.
* doc/autoconf.texi (Autoheader Macros):
Use a more up-to-date example.
* lib/autoconf/functions.m4 (CRAY_STACKSEG_END): Remove.
This is backported from the following Gnulib patch:
https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=41a2d446c7984f8f39e3eeca40c6d30630969c10
2020-07-30 18:51:59 -07:00
Paul Eggert
0c39ab024f Test AC_FC_LINE_LENGTH only to 250 columns
* NEWS, doc/autoconf.texi, lib/autoconf/fortran.m4:
Document 250, not 254.
* tests/fortran.at (AC_FC_LINE_LENGTH): Test lines with 250
columns not 253, since Oracle Studio 12.6 Fortran 95 8.8
2017/05/30 goes up only to 250.
2020-07-17 15:07:31 -07:00
Paul Eggert
2ff883c27e Document that VAL must be a word in ${VAR-VALUE}
* doc/autoconf.texi (Shell Substitutions):
Document that in ${VAR-VALUE}, VALUE must be a shell word,
and omit examples implying otherwise.
2020-07-16 17:30:54 -07:00
Zack Weinberg
f7693b83f2
Revise documentation for AC_PROG_LEX.
- Better explanation of the additional tests performed by this macro,
   once the tool has been located.

 - Update advice re using Flex to generate a bundled lex.yy.c.

 - Remove text describing a bug in Automake that has long since been
   corrected.
2020-07-16 14:48:09 -04:00
Paul Eggert
29ede6b96f AC_PROG_LEX no longer sets LEXLIB for yywrap
Suggested by Zack Weinberg in:
https://lists.gnu.org/r/autoconf-patches/2020-07/msg00016.html
* lib/autoconf/programs.m4 (_AC_PROG_LEX_YYTEXT_DECL):
Define yywrap too.
2020-07-16 10:48:09 -07:00
Paul Eggert
6677262915 Document AC_EGREP* better
From a suggestion by Bruno Haible in:
https://lists.gnu.org/archive/html/bug-autoconf/2017-02/msg00001.html
2020-07-15 16:27:58 -07:00
Bruno Haible
fc1fe98541 doc: More clarifications regarding --host and --build.
* doc/autoconf.texi (Specifying Target Triplets): Describe the effects
of --host in more detail. Don't recommend to specify --build when
specifying --host. Add another example regarding MinGW.
2020-07-15 13:45:43 -07:00
Paul Eggert
d45c2e2f5b Revert mistaken patch for Bison
Problem reported by Bruno Haible in:
https://savannah.gnu.org/support/?110266
* lib/autoconf/programs.m4 (AC_PROG_YACC):
Go back to using bison -y instead of bison -o y.tab.c.
2020-07-15 13:30:56 -07:00
Paul Eggert
e70c99a92f Use more-modern cross-compilation examples
* doc/autoconf.texi (Generic Programs)
(Specifying Target Triplets, Transformation Examples)
(Hosts and Cross-Compilation): Use more-modern examples.
2020-07-15 11:51:07 -07:00
Paul Eggert
5878ecc5fe * doc/autoconf.texi: Fix mishandling of `. 2020-07-13 12:55:19 -07:00
Zack Weinberg
a9323950d2
make fetch
URLs in gnu-oids.texi are now consistent with standards.texi.
2020-07-11 11:10:39 -04:00
Zack Weinberg
74010f5300
Update hyperlinks in the manual and README-hacking.
Lots of http:// -> https:// conversions;
refer to XZ Utils instead of the obsolete LZMA Utils;
remove dead link to dbaspot.com;
replace mention of -fmudflap with -fsanitize=
  and add a proper cross-reference to the GCC manual for that.
2020-07-10 16:43:22 -04:00
Paul Eggert
db15d7b9a5 Document AS_IF(..., ..., [[]]) glitch
* doc/autoconf.texi (Common Shell Constructs):
Note the if-false arg problem reported by Jannick in:
https://lists.gnu.org/r/autoconf/2020-03/msg00045.html
2020-07-10 13:42:51 -07:00
Paul Eggert
834b866d39 make fetch 2020-06-29 17:42:16 -07:00
Paul Eggert
c92f7606d6 make fetch 2020-06-29 17:08:26 -07:00
Zack Weinberg
8dcc5babcd
Fix `make syntax-check'.
There are two errors caught by make syntax-check currently.

First, the recent make update-copyright
(d78a7dd95f) missed autoconf.texi, I
think because there are a bunch of .texi files in doc/ whose copyright
years should *not* be updated (e.g. standards.texi, fdl.texi) and the
exclusion pattern is too broad.  I can't actually *find* the exclusion
pattern in the twisty maze of .mk files, all alike, so I just manually
updated autoconf.texi.

Second, it objects to an edit to an old section of NEWS.  This is
because of d3dcd5895d, which is a
legitimate change (replacing http:// with https:// in a URL) so the
correct action is to change old_NEWS_hash to match.

	* doc/autoconf.texi: Update copyright year.
	* cfg.mk (old_NEWS_hash): Update to acknowledge commit
	d3dcd5895d.
2020-02-26 10:27:38 -05:00
Jim Meyering
d78a7dd95f maint: make update-copyright 2020-01-01 11:45:50 -08:00
Paul Eggert
a9f5544ff6 Document AIX 7.2 printf command gotcha
* doc/autoconf.texi (Limitations of Builtins):
Document AIX 7.2 sh printf problem with octal escapes.
2019-12-25 14:19:10 -08:00
Jim Meyering
b8fd7ae756 doc/autoconf.texi: fix spelling/grammar nits 2018-12-15 09:02:22 -08:00
Paul Eggert
b0ee838e11 maint: update URLs
Most of this is replacing http: with https: when either will do.
2017-09-23 12:49:23 -07:00
Paul Eggert
d3dcd5895d Prefer HTTPS to FTP and HTTP 2017-09-16 17:48:51 -07:00
Paul Eggert
5a4041daca make fetch 2017-09-16 17:48:51 -07:00
Paul Eggert
9a2f2467b4 "time stamp" -> "timestamp", as per POSIX 2017-09-16 17:16:57 -07:00
Eric Blake
b502e35054 doc: emphasize that config.h must be first
* doc/autoconf.texi (C and Posix Variants, System Services):
Remind user to include config.h first.
(Configuration Headers): Give another reason why config.h must be
first, and mention that only .c files need it.
Based on discussion on bugs.debian.org/158969

Signed-off-by: Eric Blake <eblake@redhat.com>
2017-01-25 13:42:01 -06:00
Jim Meyering
60460b91d0 maint: update copyright dates for 2017
* all files: Run "make update-copyright".
* doc/autoconf.texi: Update manually.
2017-01-01 05:18:32 -08:00
Eric Blake
968215e7b4 doc: Mention effect of 'autoreconf -fi' on INSTALL
Several projects have a bootstrap script that invokes
'autoreconf -fi' as part of a fresh version control checkout,
in order to avoid storing common files in version control,
while also allowing contributors to rerun bootstrap to pick
up the benefits of any upgrade of one of the autotools.

However, the documentation did not make it obvious that such
a setup will overwrite any customizations to files like
INSTALL, if those files are stored in version control, when
automake still considers that file to be standard based on
AM_INIT_AUTOMAKE settings.  In such a case, a mere
'autoreconf -i' is good for the bootstrap script, while a
separate 'autoreconf -f' is good for picking up on an upgrade
of any autotools.

* bin/autoreconf.in (help): Mention standard files.
* doc/autoconf.texi (autoreconf Invocation): Add more text, including
warning that mixing --force and --install may undo customizations,
and that the set of files impacted is controlled by automake.
Reported by Emil Laine <laine.emil@gmail.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
2016-12-23 10:00:56 -06:00
Eric Blake
a6b2acf29d doc: Patterns in m4_pattern_forbid cause error, not warning
The example text regarding a desired literal AC_DC in output
claimed that the result would trigger a warning if one does
not use creative quoting; but in reality, autoconf's use of
m4_pattern_forbid to reserve the entire AC_ namespace makes
it a hard error.  Reword the section to mention the use of
m4_pattern_allow() as the fix, and beef up the example to
better demonstrate the problem.

* doc/autoconf.texi (Autoconf Language): Improve AC_DC example.
Reported by Gavin Smith <gavinsmith0123@gmail.com>.
Signed-off-by: Eric Blake <eblake@redhat.com>
2016-12-22 13:34:35 -06:00
Bruno Haible
eea950a012 * doc/autoconf.texi (Using Autotest): Stop mentioning Free Recode.
Free Wdiff is now GNU Wdiff again.
2016-12-14 10:29:05 -08:00
Quinn Grier
b2621a91d7 doc: fix an infinitely recursing example
The "single" macro infinitely recurses because its expansion contains
the unquoted text " single-". The "double" macro almost has the same
problem, but it is protected by extra quotes. In any case, the macro
names being repeated in the macro definitions is not necessary.

This commit changes the macro names to "foo" and "bar", which are taken
from a very similar example in the GNU M4 1.4.17 manual. See lines 1971
to 1980 of v1.4.17:doc/m4.texi in the GNU M4 Git repository.

* doc/autoconf.texi (Quoting and Parameters): Fix broken example.
2016-11-02 12:19:14 -05:00
Pádraig Brady
251cc70252 doc: detail inconsistencies in sed word boundary handling
* doc/autoconf.texi (Limitations of usual tools): Display a
table showing where the various syntaxes for word boundaries
are supported.
2016-11-01 15:30:32 -05:00
Paul Eggert
2b4844a760 AC_USE_SYSTEM_EXTENSIONS: Remove stray TR in doc 2016-09-15 12:26:52 -07:00
Paul Eggert
9021c82280 AC_USE_SYSTEM_EXTENSIONS: port to more ISO C TSes
* doc/autoconf.texi (C and Posix Variants): Rename from "Posix
Variants", and document updated behavior.
* lib/autoconf/specific.m4 (AC_USE_SYSTEM_EXTENSIONS): Also define
__STDC_WANT_IEC_60559_ATTRIBS_EXT__,
__STDC_WANT_IEC_60559_DFP_EXT__,
__STDC_WANT_IEC_60559_TYPES_EXT__, and
__STDC_WANT_MATH_SPEC_FUNCS__.  From a suggestion by Joseph Myers in:
http://lists.gnu.org/archive/html/autoconf-patches/2016-09/msg00011.html
2016-09-15 10:10:14 -07:00
Eric Blake
e17a30e987 AC_HEADER_MAJOR: port to glibc 2.25
glibc 2.25 is deprecating the namespace pollution of <sys/types.h>
injecting major(), minor(), and makedev() into the compilation
environment, with a warning that insists that users include
<sys/sysmacros.h> instead.  However, because the expansion of
AC_HEADER_MAJOR didn't bother checking sys/sysmacros.h until
after probing whether sys/types.h pollutes the namespace, it was
not defining MAJOR_IN_SYSMACROS, with the result that code
compiled with -Werror chokes on the deprecation warnings because
it was not including sysmacros.h.

In addition to fixing autoconf (which only benefits projects
that rebuild configure after this fix is released), we can also
give a hint to distros on how they can populate config.site with
a cache variable to force pre-existing configure scripts without
the updated macro to behave sanely in the presence of glibc 2.25
(the documentation is especially useful since that cache variable
is no longer present in autoconf after this patch).

Note that mingw lacks major/minor/makedev in any of its standard
headers; for that platform, the behavior of this macro is unchanged
(code using the recommended include formula will get a compile error
when trying to use major(), whether before or after this patch); but
for now, it is assumed that programs actually concerned with
creating devices are not worried about portability to mingw.  If
desired, a later patch could tighten AC_HEADER_MAJOR to fail at
configure time if the macros are unavailable in any of the three
system headers, but that semantic change is not worth mixing into
this patch.

* lib/autoconf/headers.m4 (AC_HEADER_MAJOR): Drop check for
major within sys/types.h; it interferes with the need to check
sysmacros.h first.
* doc/autoconf.texi (Particular Headers) <AC_HEADER_MAJOR>: Expand
details on usage, and on workarounds for non-updated projects.

Signed-off-by: Eric Blake <eblake@redhat.com>
2016-09-15 09:42:07 -05:00
Paul Eggert
565a6dc50c doc: resplit lines to avoid Texinfo chaos
* doc/autoconf.texi (Introduction): Resplit lines to avoid
Texinfo 6.3 incompatibility with Perl 5.22.  See:
http://lists.gnu.org/archive/html/bug-texinfo/2016-09/msg00037.html
2016-09-14 12:15:46 -07:00
Paul Eggert
4f08ddfe35 AC_USE_SYSTEM_EXTENSIONS: port to recent ISO C
* lib/autoconf/specific.m4 (AC_USE_SYSTEM_EXTENSIONS):
Also define __STDC_WANT_IEC_60559_BFP_EXT__,
__STDC_WANT_IEC_60559_FUNCS_EXT__, and __STDC_WANT_LIB_EXT2__.
* NEWS, doc/autoconf.texi (Posix Variants):
Document this.  Also, document other changes in this area
that were not properly documented before.
2016-09-13 18:28:47 -07:00
Paul Eggert
0bd5dbd9b2 doc: port to Texinfo 6.3
* doc/autoconf.texi: Remove obsolete @setcontentsaftertitlepage
that provokes a warning from Texinfo 6.3.
2016-09-13 17:51:41 -07:00
Eric Blake
125ec0d7a0 doc: use @xref correctly
Silences this warning from new-enough texinfo:
./doc/autoconf.texi:14236: warning: @xref node name should not contain `.'

* doc/autoconf.texi (Macro Definitions): No need for .info.

Signed-off-by: Eric Blake <eblake@redhat.com>
2016-09-13 17:44:02 -05:00
Paul Eggert
6236291e58 Fix broken URL to Unix history
* doc/autoconf.texi (Systemology): Fix broken URL.
Reported by Tom Wilcox.
2016-03-15 08:16:05 -07:00
Paul Eggert
bbfa63cd4a maint: make update-copyright 2016-02-06 17:17:49 -08:00
Paul Eggert
2ca0d5755f make fetch 2016-02-06 17:17:49 -08:00
Paul Eggert
5483deb8ae Document dash ${*-unset} behavior
* doc/autoconf.texi (Shell Substitutions): Document dash
incompatibility.  Problem reported by David Caldwell in:
http://bugs.gnu.org/22556
2016-02-05 14:15:38 -08:00
Eric Blake
51b89d1ccd doc: mention 'for' syntax issue on older shells
Based on a report by Michael Felt, via Paul Eggert on the
coreutils list.

* doc/autoconf.texi (Limitations of Builtins) <for>: Document
problem with 'for var in ;'.

Signed-off-by: Eric Blake <eblake@redhat.com>
2015-06-04 15:58:24 -06:00
Noah Misch
82ef7805fa AC_CHECK_DECL, AC_CHECK_DECLS: port to the Clang compiler
* lib/autoconf/general.m4 (_AC_UNDECLARED_WARNING): New macro.
(_AC_CHECK_DECL_BODY): Call it once per language; treat warnings as
errors when its verdict indicates that.
* tests/semantics.at (AC_CHECK_DECLS): Add a macro call that relies on
the new semantics.  Avoid -Wmissing-variable-declarations warnings.
* doc/autoconf.texi (Generic Declarations): Document the implications.
* NEWS: Mention this change.
2015-05-13 21:11:47 -04:00
Matěj Týč
d2f0ec8708 m4_pattern_forbid: better documentation
Give a more concrete description of what the m4_pattern_forbid
thingy that pretends it is a macro accepts as an argument.

Copyright-paper-exempt: Yes
Signed-off-by: Eric Blake <eblake@redhat.com>
2015-04-21 06:37:10 -06:00