Commit Graph

6844 Commits

Author SHA1 Message Date
Paul Eggert
8b5e2016c7 Port to compilers that moan about K&R func decls
* lib/autoconf/c.m4 (AC_LANG_CALL, AC_LANG_FUNC_LINK_TRY):
Use '(void)' rather than '()' in function prototypes, as the latter
provokes fatal errors in some compilers nowadays.
* lib/autoconf/functions.m4 (AC_FUNC_STRTOD):
* tests/fortran.at (AC_F77_DUMMY_MAIN usage):
* tests/semantics.at (AC_CHECK_DECLS):
Don’t use () in a function decl.
2022-09-02 12:09:32 -05:00
Paul Eggert
0a647a93cb Remove obsolete Solaris info from manual
Don't mention anything about Solaris 9 or older,
as Oracle no longer supports those old versions
and the obsolete info merely clutters the manual.
2022-08-25 14:27:02 -05:00
Paul Eggert
bc66c26f48 Improve doc for AC_SYS_LARGEFILE etc. 2022-08-18 15:20:46 -07:00
Paul Eggert
6dcecb780a Port AC_CHECK_HEADER_STDBOOL to C23
Modernize the bool documentation a bit too.
* lib/autoconf/headers.m4 (AC_CHECK_HEADER_STDBOOL):
Allow C23 too.
2022-08-13 19:39:59 -07:00
Paul Eggert
f6657256a3 AC_SYS_LARGEFILE now widens time_t if possible
This change is taken from Gnulib, and is needed for apps like GDB.
* lib/autoconf/specific.m4 (_AC_SYS_YEAR2038_TEST_INCLUDES)
(_AC_SYS_YEAR2038, AC_SYS_YEAR2038): New macros, taken (with
renaming) from Gnulib.
(_AC_SYS_LARGEFILE_MACRO_VALUE): #undef before #define.
(AC_SYS_LARGEFILE): Prefer AS_IF and AS_CASE to doing it by hand.
Widen time_t if possible, too.  Define  __MINGW_USE_VC2005_COMPAT
early if needed.
2022-08-09 11:07:03 -07:00
Paul Eggert
2b4b96d982 Fix compilation errors in 32-bit C++ mode on HP-UX 11/ia64
This should render unnecessary Gnulib’s gl_SET_LARGEFILE_SOURCE hack
https://lists.gnu.org/r/bug-gnulib/2019-12/msg00046.html
* lib/autoconf/functions.m4 (AC_FUNC_FSEEKO):
On that platform, simply set _LARGEFILE_SOURCE.
2022-08-09 11:07:03 -07:00
Paul Eggert
234fc6c866 Port AC_C_BIGENDIAN to cross gcc -std=c11 -flto
* lib/autoconf/c.m4 (AC_C_BIGENDIAN): Improve the
inherently-unportable grep trick well enough to survive gcc
-std=c11 -flto when cross-compiling (sr#110687).
2022-07-27 08:56:12 -07:00
Paul Eggert
e50a50c4dc basename and dirname are portable now
* doc/autoconf.texi (Limitations of Usual Tools):
basename and dirname are portable shell commands now.
2022-07-21 12:50:16 -07:00
Paul Eggert
f07de9b1db Handle z/OS Unix ‘set’ output
Problem and fix reported by Jeff Shimoda in:
https://lists.gnu.org/r/autoconf-patches/2022-06/msg00007.html
* tests/local.at (AT_CONFIG_CMP): Treat ‘var=""’ like ‘var=''’.
Copyright-paperwork-exempt: Yes
2022-07-14 12:25:18 -07:00
Zack Weinberg
56b21590f6
Fix testsuite failures on Darwin (aka macOS).
Tests of AC_{CHECK_,}HEADER_STDBOOL were failing on Darwin for two
reasons: an m4 quoting bug in tests/local.at causing Darwin sed to
throw syntax errors, and an excessively precise interpretation of how
C99 and C++11 interact.  The latter is worth mentioning in NEWS.

 * tests/local.at (_AT_DEFINES_CMP_PRUNE): Insert [] before ‘dnl’ in
   two places to keep it separate from the result of the m4_bpatsubsts
   operation that immediately precedes it.
 * lib/autoconf/headers.m4 (AC_CHECK_HEADER_STDBOOL): Allow ‘bool’,
   ‘true’, and ‘false’ not to be macros, after including stdbool.h,
   whenever __cplusplus is defined.
 * NEWS: Document change to AC_{CHECK_,}HEADER_STDBOOL.
2022-07-10 15:05:31 -04:00
Zack Weinberg
db7205a864
Make help-extract.pl work with Perl 5.10.x.
The main issue was use of s///r; the /r modifier was added in 5.14.
Since the baseline is now 5.10.0 instead of 5.6.0, a couple places
can be tidied up using slightly newer constructs.

* help-extract.pl: Use File::Spec::Functions instead of File::Spec
  for reduced clunkiness.
  (eval_qq_no_interpolation): Don’t use s///r.  Do use \K and (?=...)
  to match the empty string (but only in just the right locations),
  so we don’t need to use $& in the replacement.
  (main): Don’t use s///r.
2022-07-10 15:00:48 -04:00
Zack Weinberg
f580247d46
Remove ancient backward compatibility code from m4/m4.m4.
We have had AC_PREREQ([2.69]) in our own configure.ac since 2021,
and before that it was AC_PREREQ([2.62]) since 2012, so backcompat
code for 2.61 is not necessary anymore.

Also add logging of the name of each candidate executable and bump the
serial number.
2022-07-10 11:42:59 -04:00
Zack Weinberg
bfd655e5f1
make fetch
Our local patches to lib/Autom4te/FileUtils.pm and maint.mk were
manually reapplied.
2022-07-10 11:42:00 -04:00
Zack Weinberg
61901a1a14
Require Perl 5.10.0 or later.
The minimum Perl version was raised to 5.8.0 from 5.6.0 in commit
3a9802d601 (but not documented as
such until e8c2d79ec4, and not
actually *enforced* by our own configure script until, er, now)
in order to use Time::HiRes::stat.

Unfortunately, while the Time::HiRes *module* was added in 5.8.0, it
did not export a ‘stat’ function until 5.8.9.  More precisely, this
feature was added to Time::HiRes in version 1.92 of that module; Perl
core 5.8.8 shipped Time::HiRes 1.86, 5.8.9 shipped 1.9715.  The only
system I have convenient access to, that has older Perls installed,
offers me a choice of 5.8.8 or 5.10.1, so the new requirement means
I cannot test with 5.8.x anymore.

Per https://perldoc.perl.org/perlhist the release history of these
versions of Perl is, in chronological order,

  5.8.0         2002-Jul-18
  5.8.8         2006-Jan-31
  5.10.0        2007-Dec-18
  5.8.9         2008-Dec-14  <-- almost a year later than 5.10.0
  5.10.1        2009-Aug-22
  5.12.0        2010-Apr-12

Per https://perldoc.perl.org/perl5101delta the differences between
5.10.0 and 5.10.1 are small, and do not make me worry about
accidentally introducing code that works on my test boxes but not for
our users, unlike the gulf between 5.8.x and 5.10.x.

Requiring 5.10 will mean that we have access to Digest::SHA, the //
and //= operators, the regexp \K escape, and ‘state’ variables
(lexical scope, persistent value) all of which I can think
of uses for (but none of them are actually used in this patch).

Putting it all together, I think a requirement bump to version 5.10.0
is justified.  We are already chopping off the trailing edge at 2006
due to the requirement for M4 1.4.8 (/de facto/ since 2.70) and late
2007 is still 15 years ago.

This patch also makes configure search $PATH for executables named
‘perl5*’ and ‘perl-5.*’ if bare ‘perl’ is too old.  To do this, it
introduces a helper macro AClocal_PATH_PROG_GLOBS_FEATURE_CHECK, which
I would *like* to promote to a new Autoconf feature, but I got stuck
on quoting issues — see comments in m4/perl-time-hires.m4.

* NEWS: Document requirement for Perl 5.10.
* m4/perl-time-hires.m4: New file.
* configure.ac: Use AC_PATH_PERL_WITH_TIME_HIRES_STAT to probe for
  perl.
* build-aux/fetch.pl (fetch): For .pm files fetched from Automake,
  rewrite “use 5.006” to “use 5.010”.

* build-aux/help-extract.pl
* lib/Autom4te/C4che.pm
* lib/Autom4te/ChannelDefs.pm
* lib/Autom4te/Channels.pm
* lib/Autom4te/Config.pm
* lib/Autom4te/Configure_ac.pm
* lib/Autom4te/FileUtils.pm
* lib/Autom4te/General.pm
* lib/Autom4te/Getopt.pm
* lib/Autom4te/Request.pm
* lib/Autom4te/XFile.pm
* tests/mktests.pl: Change “use 5.006” to “use 5.010”.
2022-07-10 10:52:33 -04:00
Zack Weinberg
fec8a33d87
Require GNU M4 1.4.8 or later.
The former minimum version was 1.4.6.  1.4.6 and 1.4.7 do not track
the original location of text fed to ‘m4wrap’, which breaks autom4te’s
ability to trace macros invoked from _AC_FINALIZE.

Right now, the only _user_ visible effect of this is that autoconf
running on M4 1.4.6 or 1.4.7 will emit an internal error, instead of
the intended warning message, when it processes a configure.ac that
neglects to invoke AC_INIT or AC_OUTPUT.  Perhaps more importantly,
it causes a bunch of scary-sounding failures in our own testsuite,
which deliberately doesn’t use AC_OUTPUT sometimes.

M4 1.4.6 and 1.4.7 also have bugs in location tracking of macro
invocations spread over multiple lines, which, guess what, causes
even more testsuite failures.

1.4.8 came out in 2006.  As a practical matter, this change to our
requirements means that people using macOS *to run autoconf* (not just
to run generated configure scripts) cannot use the system-provided m4
anymore.  {Free,Net,Open}BSD already don’t ship GNU M4 as their system
m4, so users of those OSes should not be affected.
2022-07-06 16:11:43 -04:00
Zack Weinberg
5d8a59e337
testsuite: Handle `balanced ASCII quotes' correctly in m4 errors.
AT_CHECK_M4 was _documented_ to convert

   m4: cannot open `foo': No such file or directory

to

   m4: cannot open 'foo': No such file or directory

but the regexp that was supposed to do this didn’t work.

Fix the regexp, and remove a workaround for the bug in one test
(yes, we had code in our own testsuite to work around bugs in our
own testsuite!)

* tests/local.at (AT_CHECK_M4): Fix regex for “cannot open” messages.
* tests/tools.at (autom4te cache): Remove workaround for buggy regex
  in AT_CHECK_M4.
2022-07-06 16:05:42 -04:00
Paul Eggert
76beb33bfe Port _AC_COMPILER_EXEEXT to IBM z/OS Unix
Problem reported by Jeff Shimoda in:
https://lists.gnu.org/r/autoconf-patches/2022-06/msg00001.html
* lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT):
Also remove conftest.o and conftest.obj.
We can't use $ac_objext as it might not be defined yet.
2022-06-28 18:27:40 -05:00
Paul Eggert
9c3f25710d Avoid \] in BREs and EREs
* bootstrap (PACKAGE_NAME, PACKAGE_BUGREPORT):
* lib/autoconf/status.m4 (AC_OUTPUT_MAKE_DEFS):
* maint.mk (longopt_re, gpg_key_ID):
* tests/m4sugar.at (m4_dumpdef):
Avoid \] in POSIX-specified regular expressions, as POSIX says \]
produces undefined results in BREs and EREs.
2022-06-28 18:27:40 -05:00
Paul Eggert
6e3282fe38 Refactor recent AC_FUNC_ALLOCA fix
* lib/autoconf/functions.m4 (AC_FUNC_ALLOCA): Simplify and use
AS_IF.  Had I done it this way originally I would have avoided the
bug that Jim just fixed.
2022-06-28 18:27:40 -05:00
Jim Meyering
68fac90c09 AC_FUNC_ALLOCA: fix a misplaced (now fatal) closing "fi"
"autoconf quoting is a pain"
* lib/autoconf/functions.m4 (AC_FUNC_ALLOCA): Its AC_CACHE_CHECK
contains an if/else block, but the closing "fi" lay just after its ")".
Before, this error didn't trigger any failure because the if/else code was
in the "else" block of AC_CACHE_CHECK's AS_IF invocation and AS_IF was also
implemented using an if..fi block. So the ostensibly-"outer" "fi" provided
by AS_IF matched the inner "if/else", and that stray-after-end "fi" served
to close the AS_IF block. However, when AS_IF switched from if..fi to
case..esac, this became a nesting error: no matching "fi".
Initially-harmless error introduced by v2.69-52-gfd29dbd7 in 2012.
Error exposed by v2.72a-30-gc8d6d6eb.
* tests/mktests.pl (scan_m4_files): Do not elide direct test
of AC_FUNC_ALLOCA.

FTR, here's the list of macros whose direct tests were being suppressed:
AC_CANONICAL_BUILD AC_CANONICAL_HOST AC_CANONICAL_TARGET
AC_CHECK_INCLUDES_DEFAULT AC_DISABLE_OPTION_CHECKING
AC_ERLANG_NEED_ERL AC_ERLANG_NEED_ERLC AC_ERLANG_SUBST_ERTS_VER
AC_ERLANG_SUBST_INSTALL_LIB_DIR AC_ERLANG_SUBST_LIB_DIR AC_F77_DUMMY_MAIN
AC_F77_LIBRARY_LDFLAGS AC_FC_DUMMY_MAIN AC_FC_LIBRARY_LDFLAGS
AC_FUNC_ALLOCA AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK AC_GNU_SOURCE
AC_HEADER_DIRENT AC_HEADER_SYS_WAIT AC_PATH_X AC_PROG_CPP AC_PROG_CXX
AC_PROG_CXXCPP AC_PROG_F77 AC_PROG_FC AC_PROG_GO AC_PROG_GREP
AC_PROG_OBJC AC_PROG_OBJCPP AC_PROG_OBJCXX AC_PROG_OBJCXXCPP
AC_STRUCT_TM AC_TYPE_GETGROUPS AC_TYPE_LONG_LONG_INT AC_TYPE_MBSTATE_T
AC_TYPE_PID_T AC_TYPE_SIZE_T AC_TYPE_UID_T AC_TYPE_UNSIGNED_LONG_LONG_INT
AC_USE_SYSTEM_EXTENSIONS
2022-06-27 21:39:24 -07:00
Jim Meyering
34427e07bc tests: avoid test failures due to new EGREP_TRADITIONAL
Some tests require that filtered pre- and post-test
environments be identical. The filtering removes assignments
to known (set-by-test) envvar names, like GREP, SED, YACC.
* tests/local.at (_AT_CHECK_ENV): Also filter out assignments to
EGREP_TRADITIONAL, added in v2.72a-35-g0c762675.
2022-06-27 21:39:24 -07:00
Paul Eggert
256d85494e Improve regex documentation
* doc/autoconf.texi (Running the Preprocessor)
(Limitations of Usual Tools):
Improve comments on limitations of regular expressions.
2022-06-22 00:35:59 -05:00
Paul Eggert
0c76267536 Fix bug: AC_EGREP_CPP with leading '-' in pattern
Also, port AC_EGREP_CPP to AT&T UnixPC.
Latter problem reported by Alain Knaff [sr #110657].
* lib/autoconf/general.m4 (AC_EGREP_CPP): Use new _AC_PROG_GREP.
Work even if the pattern starts with "-".
* lib/autoconf/programs.m4 (_AC_PROG_GREP):
New optional arg ACTION-IF-NOT-FOUND.
(_AC_PROG_EGREP_TRADITIONAL): New macro.
2022-06-08 17:57:37 -07:00
Paul Eggert
ef27f692a0 make update-copyright 2022-05-19 13:57:38 -07:00
Paul Eggert
4860658148 Work around AT&T 3b1 bug
* lib/m4sugar/m4sh.m4: Work around bug in ancient sed.
Problem reported by Alain Knaff [sr#110654] for AT&T 3b1.
The Autoconf manual says this sed bug also occurs for
RISC/OS and IRIX 5.3.
2022-05-15 22:16:00 -07:00
Paul Eggert
dc28f7c20b Document AC_RUN_IFELSE([], ...) etc.
* doc/autoconf.texi (Running the Preprocessor)
(Running the Compiler, Running the Linker, Runtime):
Document that the _IFELSE macros reuse an existing input file
if their input is empty.
2022-05-10 14:23:39 -07:00
Paul Eggert
ce3d5ff4f2 Work around memory-leak false alarms
Problem reported by Raphael Isemann in:
https://lists.gnu.org/r/autoconf-patches/2022-03/msg00007.html
* lib/autoconf/c.m4 (_AC_C_C99_TEST_MAIN, AC_C_FLEXIBLE_ARRAY_MEMBER):
* tests/data/gnulib_std_gnu11_2020_08_17.m4 (_AC_C_C99_TEST_HEADER):
Free storage allocated via malloc, to pacify overly-picky
implementations that issue false alarms about memory leaks.
2022-03-31 23:25:54 -07:00
Paul Eggert
c8d6d6eb8b Fix bug with AS_IF and ‘set -e’
Problem reported by Peter Johansson in:
https://lists.gnu.org/r/bug-autoconf/2022-03/msg00009.html
The bug was introduced in 2020-11-15T18:56:18Z!zackw@panix.com
with commit message saying “If anyone has a better idea for how to
make this work I will be glad to hear it”, and this patch uses a
trick with ‘case’ that should be a better idea.
* lib/m4sugar/m4sh.m4 (as_nop, as_fn_nop, _AS_EMPTY_ELSE_PREPARE):
Remove.  All uses removed.
(_AS_IF_ELSE): Wrap the non-blank IF-ELSE inside a no-op case,
which works since a case branch can be empty in the shell.
* tests/m4sh.at (AS_IF and AS_CASE): Test the fix.
2022-03-31 22:38:38 -07:00
Paul Eggert
00358457d0 doc: update Manthey name+email 2022-03-12 11:32:35 -08:00
Paul Eggert
eea5092d16 Fix unwanted globbing of sed script
Problem reported by mirabilos via Eric Blake in:
https://www.austingroupbugs.net/view.php?id=1558
https://lists.gnu.org/r/bug-autoconf/2022-02/msg00003.html
* lib/m4sugar/m4sh.m4 (_AS_TR_SH_PREPARE):
Define as_sed_sh as the sed script.  All uses of as_tr_sh changed.
Define as_tr_sh as before, but only for compatibility with scripts
that mistakenly use as_tr_sh directly.
(AS_TR_CPP_PREPARE): Likewise for as_sed_cpp and as_tr_cpp.
2022-02-18 15:42:31 -08:00
Paul Eggert
cbec82b65f Clarify documentation of number format
Problem reported by Mike Frysinger in:
https://lists.gnu.org/r/autoconf-patches/2022-02/msg00007.html
2022-02-12 14:49:37 -08:00
Mike Frysinger
c48fdb8119
add new AC_PROG_AR helper
This mirrors the existing RANLIB and related toolchain macros that
autoconf already exports.  Some projects assume `ar` is available
which isn't always safe, so provide a macro that probes the full
toolchain settings.

This also makes it easier to use AC_REQUIRE with the macro instead
of duplicating the AC_CHECK_TOOL call in projects.

  * lib/autoconf/programs.m4 (AC_PROG_AR): New macro.
  * doc/autoconf.texi: Document it.
  * tests/local.at (_AT_CHECK_ENV): Allow $AR output variable.
2022-01-24 09:33:20 -05:00
Bruno Haible
b0d5d2d3eb doc: Document how to deal with missing 'join'.
* doc/autoconf.texi (Limitations of Usual Tools): Mention that 'join' is missing
in BusyBox.
2022-01-12 11:39:38 -08:00
Paul Eggert
d405fa2ec6 doc: document BusyBox sed w bug 2022-01-01 18:08:56 -08:00
Paul Eggert
407d5955f0 doc: update ‘find’ info
* doc/autoconf.texi (Limitations of Usual Tools):
Mention a few more GNU ‘find’ options that are not portable.
Modernize a bit.
2021-10-09 18:38:45 -07:00
Zack Weinberg
6027e99358
Update .gitignore for move of version.m4.
Commit af5c11ed moved version.m4 from lib/m4sugar to lib, but did not
update .gitignore to match.
2021-10-03 18:15:20 -04:00
Zack Weinberg
8de33b817f
Add a bootstrap script like Automake has.
The bootstrap script generates the same files ‘autoreconf -vi’ would,
in a normal package, but it uses autoconf *from the git sources* to do
it.  This means people building from git do not need autoconf to be
installed already.  More importantly, it eliminates the extra steps
when building from git, of re-generating autoconf’s own configure
script with the just-built autoconf, then rebuilding the entire tree.

(This process still requires Automake to be installed already, and
Automake’s bootstrap script requires Autoconf to be installed already,
so there is still a dependency loop between Autoconf and Automake when
building from git—you need at least one of them installed from a
tarball to get started.)

The bootstrap script works by creating a partial installation tree in
a temporary directory, containing bin/autoconf, bin/autom4te, and just
enough of the usual contents of $(pkgdatadir) for autoconf and
autom4te to work.  It then runs a hardcoded list of commands,
corresponding to what ‘autoreconf -i -Wall,error’ would run, but
setting environment variables AUTOCONF and AUTOM4TE to ensure the
bootstrap versions of these tools are used.  (We have to create both,
because automake runs autoconf, not autom4te, to trace configure.ac.)

The ‘Autom4te’, ‘autoconf’, and ‘m4sugar’ subdirectories of the
partial installation tree are symlinked back to the source tree; this
is why version.m4 needed to be moved out of the m4sugar subdirectory,
so the bootstrap script can create it without scribbling on the source
tree.  autom4te is run in --melt mode, so we don’t need to create
freeze files in any subdirectories either.  All of the substitution
variables that are needed for autoconf and autom4te to both run, and
create the same output that they would have if fully configured, are
honored (unfortunately this does involve digging around in
configure.ac with sed expressions).
2021-09-15 14:26:11 -04:00
Zack Weinberg
f060c7e5fd
Rewrite bin/autoconf in Perl.
Of all the installed programs (autoconf, autoheader, autom4te,
autoreconf, autoscan, autoupdate, ifnames) autoconf is the only one
that is a shell script instead of a Perl script.  This means it has to
do a lot of fiddly quoting and requoting to assemble an autom4te
command line, it doesn’t get to use the shared option handling code in
Autom4te/{General,Getopt}.pm, and it has to duplicate usage text that
properly should only be in Autom4te/ChannelDefs.pm.  It also means
there’s extra code in build-aux/help-extract.pl just for it, and a
special two-phase generation process in bin/local.mk.

This also paves the way for the bootstrap script mentioned in the
previous commit; it will only have to know how to deal with
substitution variables, not generation of m4sh scripts.

The new script winds up being slightly longer on disk but that’s
because our boilerplate for Perl scripts is quite long.  The code is
visibly simpler.

* bin/autoconf.as: Rename to bin/autoconf.in and rewrite in Perl.
* bin/local.mk (EXTRA_DIST): Change autoconf.as to autoconf.in.
  (MOSTLYCLEANFILES): Don’t delete autoconf.in.
  (bin/autoconf.in): Delete rule.
  (ETAGS_PERL): Add autoconf.in and sort list.
  (ETAGS_SH): Delete, no longer needed.
* tests/tools.at: Syntax-check autoconf as a Perl script.

* build-aux/help-extract.pl: Remove all code for extracting usage text
  from shell scripts.
* man/autoconf.w, man/local.mk: Refer to autoconf.in, not autoconf.as.
2021-09-15 14:02:41 -04:00
Zack Weinberg
af5c11ed61
Generate version.m4 from config.status, in lib/ not lib/m4sugar/.
This simplifies the Makefile a bit and also paves the way for a
bootstrap script (replacing the process of re-running autoreconf with
the just-built autoconf) which will be able to cope with generated
files that get installed in @pkgdatadir@ but not in @pkgdatadir@/m4sugar.

* lib/version.in: New file, contents extracted from lib/local.mk.
* lib/local.mk: Do not generate version.m4 here.
* configure.ac: Generate lib/version.m4 from lib/version.in via
  config.status.

* lib/freeze.mk, lib/local.mk, lib/m4sugar/m4sugar.m4:
  version.m4 now lives in @pkgdatadir@ rather than @pkgdatadir@/m4sugar.
2021-09-15 14:02:34 -04:00
Paul Eggert
fbdf711569 fortran: *mingw* → mingw* in previous patch
* lib/autoconf/fortran.m4 (_AC_FC_LIBRARY_LDFLAGS): Omit a ‘*’.
2021-09-01 19:08:20 -07:00
Keno Fischer
997dfc9c07 fortran.m4: Filter mingw intrinsic libraries
* lib/autoconf/fortran.m4 (_AC_FC_LIBRARY_LDFLAGS):
Filter out mingw libraries too.
Problem and fix reported by Keno Fischer in
https://lists.gnu.org/r/autoconf-patches/2021-09/msg00000.html
Copyright-paperwork-exempt: Yes
2021-09-01 19:08:20 -07:00
Jim Meyering
9db4522239 fix a typo
* doc/autoconf.texi (Integer Overflow): Fix typo: s/many/may/
2021-09-01 08:50:30 +02:00
Paul Eggert
e8c2d79ec4 Add commentary for Time::HiRes patches 2021-08-31 17:35:42 -07:00
Andreas K. Hüttel
3a9802d601 Fix bug when autom4te updates too quickly
Use stat from Time::HiRes (instead of File::stat).

Problem reported by Ionen Wolkens <https://bugs.gentoo.org/782985>.
2021-08-31 17:35:42 -07:00
Paul Eggert
b27bc3e230 Port AC_LANG_CALL(C) to C++
* lib/autoconf/c.m4 (AC_LANG_CALL(C)): Add an extern "C" if C++.
Problem reported by Vincent Lefèvre (sr #110532).
2021-08-31 16:51:11 -07:00
Paul Eggert
411d0c0ef5 Modernize discussion of integer overflow
* doc/autoconf.texi (Integer Overflow, Integer Overflow Basics)
(Signed Overflow Examples, Optimization and Wraparound):
Modernize discussion to take current compiler and Gnulib
technology into account.
2021-08-31 16:10:30 -07:00
Paul Eggert
7b3aa70a73 Port test to next m4 version
* tests/tools.at (autom4te cache):
Allow m4 to quote 'like this' as well as 'like this'.
2021-08-31 16:10:30 -07:00
Marshall Ward
6cfdc56489 Fortran Cray pointer macro support
This patch adds the AC_F77_CRAY_POINTERS and AC_FC_CRAY_POINTERS macros,
which test if the Fortran compiler supports Cray pointers.

The macros are written such that the tests share a common backend
(_AC_FC_CRAY_POINTERS) which works on both F77 and FC compilers.
Wrappers are provided to address any future potential compatibility
issues.

The macros include additional tests for particular flags required by
GFortran and PGI compilers.  The current set of flags is sparse, but can
be extended for other compilers if needed.

Documentation and a minimal test of the macro have been included.

Two minor variable name typos (@EXEEXT@ as @EEXEXT@) were also fixed in
two of the other Fortran tests.
2021-08-16 09:56:09 -07:00
Eric Blake
706847e2d0 tests: typo fix
* tests/base.at: Fix typo.
Spotted by anonymous in https://savannah.gnu.org/support/?110526
2021-08-12 13:05:42 -05:00
Paul Eggert
64df9b4523 Autoconf now quotes 'like this' instead of `like this'
Autoconf’s diagnostics now follow current GNU coding standards,
which say that diagnostics in the C locale should quote 'like this'
with plain apostrophes instead of the older GNU style `like this'
with grave accent and apostrophe.
2021-07-20 16:04:21 -05:00