Go to file
Zack Weinberg 87a81f44c6
Fix testsuite failures from ‘make maintainer-check-c++’.
‘make maintainer-check-c++’ has two test failures that don’t show in
an ordinary ‘make check’.  One of these is a pair of problems with the
semantics.at test of AC_CHECK_DECL(S):

 * AC_CHECK_DECL cannot handle a function argument whose declared type
   is ‘char []’; it generates a cast to the array type, which is
   invalid in both C and C++.  This was masked by an M4 quotation bug,
   causing it to emit a cast to ‘char’ instead, prodicing code that
   was valid C but invalid C++.  I don’t think it’s practical to teach
   AC_CHECK_DECL to do argument type decay, so I changed the type
   signature in the AC_CHECK_DECL call (not in the actual declaration)
   to ‘char *’.  Conveniently this also avoids the quotation issue.

 * In C++, apparently ‘extern struct { int x; } foo;’ is invalid.
   (clang++ explains at length: “variable ‘foo’ is used but not
   defined in this translation unit, and cannot be defined in any
   other translation unit because its type does not have linkage.”)
   Fixed by giving the struct a tag.

The other failure is an actual bug in AC_PROG_LEX: the test program
used by _AC_PROG_LEX_YYTEXT_DECL uses the flex utility function
‘input’, which is renamed to ‘yyinput’ when the scanner is compiled as
C++.  Fixed with ifdefs in the offending action--it might seem cleaner
to use a macro defined in a %{ %} block, but that would be inserted into
the skeleton *above* the declaration of (yy)input, so I didn’t feel
it was safe.

* tests/semantics.at (AC_CHECK_DECLS): Adjust test programs for C++
  compatibility and to work around lack of support for argument type
  decay.

* programs.m4 (_AC_PROG_LEX_YYTEXT_DECL): Call yyinput(), not input(),
  in scanner action when scanner is compiled as C++.
2020-08-28 16:42:28 -04:00
bin Generate manpages directly from source code. 2020-08-21 16:23:32 -04:00
build-aux Generate manpages directly from source code. 2020-08-21 16:23:32 -04:00
doc autoreconf: integrate intltoolize into the standard configuration tools 2020-08-18 08:49:18 -04:00
lib Fix testsuite failures from ‘make maintainer-check-c++’. 2020-08-28 16:42:28 -04:00
m4 make fetch 2020-06-29 17:08:26 -07:00
man Generate manpages directly from source code. 2020-08-21 16:23:32 -04:00
tests Fix testsuite failures from ‘make maintainer-check-c++’. 2020-08-28 16:42:28 -04:00
.gitattributes
.gitignore
.prev-version
.x-update-copyright
AUTHORS maint: make update-copyright 2020-01-01 11:45:50 -08:00
BUGS maint: make update-copyright 2020-01-01 11:45:50 -08:00
cfg.mk Formally obsolete AC_CONFIG_HEADER (#105403) 2020-07-12 11:59:14 -04:00
ChangeLog.0
ChangeLog.1
ChangeLog.2
ChangeLog.3
configure.ac Add NetBSD /bin/sh to the -n whitelist. 2020-08-26 15:08:26 -04:00
COPYING Update links in COPYING, COPYINGv3, and COPYING.EXCEPTION. 2020-07-10 16:43:22 -04:00
COPYING.EXCEPTION Update links in COPYING, COPYINGv3, and COPYING.EXCEPTION. 2020-07-10 16:43:22 -04:00
COPYINGv3 Update links in COPYING, COPYINGv3, and COPYING.EXCEPTION. 2020-07-10 16:43:22 -04:00
GNUmakefile Partially revert e54e3f90: restore use of $(MAKE) in error message. 2020-08-04 08:46:59 -04:00
HACKING Update release advice 2020-06-29 17:08:27 -07:00
maint.mk make fetch 2020-06-29 17:08:26 -07:00
Makefile.am Generate manpages directly from source code. 2020-08-21 16:23:32 -04:00
NEWS autoreconf: integrate intltoolize into the standard configuration tools 2020-08-18 08:49:18 -04:00
README maint: make update-copyright 2020-01-01 11:45:50 -08:00
README-alpha maint: make update-copyright 2020-01-01 11:45:50 -08:00
README-hacking * doc/autoconf.texi: Fix mishandling of `. 2020-07-13 12:55:19 -07:00
THANKS maint: make update-copyright 2020-01-01 11:45:50 -08:00
TODO * TODO: Add -Werror support. 2020-08-06 12:28:40 -07:00

-*- text -*-

Autoconf

Autoconf is an extensible package of M4 macros that produce shell
scripts to automatically configure software source code packages.
These scripts can adapt the packages to many kinds of UNIX-like
systems without manual user intervention.  Autoconf creates a
configuration script for a package from a template file that lists the
operating system features that the package can use, in the form of M4
macro calls.

Producing configuration scripts using Autoconf requires GNU M4 and
Perl.  You should install GNU M4 (version 1.4.6 or later is required;
1.4.14 or later is recommended) and Perl (5.006 or later) before
configuring Autoconf, so that Autoconf's configure script can find
them.  The configuration scripts produced by Autoconf are
self-contained, so their users do not need to have Autoconf (or GNU
M4, Perl, etc.).

You can get GNU M4 here:

https://ftp.gnu.org/gnu/m4/

The file INSTALL should be distributed with packages that use
Autoconf-generated configure scripts and Makefiles that conform to the
GNU coding standards.  The package's README can just give an overview
of the package, where to report bugs, and a pointer to INSTALL for
instructions on compilation and installation.  This removes the need
to maintain many similar sets of installation instructions.

Be sure to read BUGS and INSTALL.

Mail suggestions to autoconf@gnu.org, report bugs to
bug-autoconf@gnu.org, and submit patches to autoconf-patches@gnu.org.
All changes can be tracked at the read-only autoconf-commit@gnu.org.
Always include the Autoconf version number, which you can get by
running `autoconf --version'.  Archives of bug-autoconf@gnu.org can be
found in <https://lists.gnu.org/archive/html/bug-autoconf/>, and
similarly for the other mailing lists.

Licensing

Autoconf is released under the General Public License version 3 (GPLv3+).
Additionally, Autoconf includes a licensing exception in some of its
source files; see the respective copyright notices for how your
project is impacted by including scripts generated by Autoconf, and the
COPYING.EXCEPTION file for the exception in terms of the Additional
Permissions as described in section 7 of GPLv3.

For more licensing information, see
<https://www.gnu.org/licenses/gpl-faq.html> and
<https://www.gnu.org/licenses/exceptions.html>.

For any copyright year range specified as YYYY-ZZZZ in this package
note that the range specifies every single year in that closed interval.

-----

Copyright (C) 1992-1994, 1998, 2000-2017, 2020 Free Software Foundation,
Inc.

Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.  This file is offered as-is,
without warranty of any kind.