Commit Graph

6828 Commits

Author SHA1 Message Date
Paul Eggert
ae26b9b44c Port AC_F77_LIBRARY_LDFLAGS to oneAPI HPC Toolkit
Problem reported by Bill Dieter in:
https://lists.gnu.org/r/bug-autoconf/2020-07/msg00089.html
* lib/autoconf/fortran.m4 (_AC_FC_LIBRARY_LDFLAGS):
Defend against ‘clang -mllvm -loopopt=0’.
2020-07-22 14:09:16 -07:00
Paul Eggert
96f0001bcd Don’t assume plain ‘make’ in C unit tests
Problem reported by Bruno Haible in:
https://savannah.gnu.org/support/?110273#comment6
* lib/autoconf/general.m4 (_AC_ARG_VAR_VALIDATE):
* tests/autotest.at (C unit tests, C unit tests (EXEEXT)):
Prefer ‘${MAKE-make}’ to ‘make’ in shell code.
2020-07-20 15:13:34 -07:00
Paul Eggert
14d58bfd58 Prefer ‘$(MAKE)’ to ‘make’ in Makefiles
* GNUmakefile (abort-due-to-no-makefile):
* Makefile.am (check-coverage-report):
Prefer ‘$(MAKE)’ to ‘make’ in diagnostics.
2020-07-20 15:13:34 -07:00
Paul Eggert
d7bd610b4c Port build procedure to AIX 7.1
* lib/freeze.mk (MY_AUTOM4TE, build_libdir, m4f_dependencies):
Prefer ‘$(top_build_prefix)’ to ‘$(top_builddir)/’.
The difference matters on AIX 7.1, where ‘make’ doesn’t know that
bin/autom4te and ./bin/autom4te are the same file,
and gets confused about dependencies without this change.
‘$(top_build_prefix)bin/autom4te’ expands to ‘bin/automake’
whereas ‘$(top_builddir)/bin/autom4te’ expands to
‘./bin/automake’, and the former works where the latter doesn’t.
2020-07-17 18:43:38 -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
c03ca42de3 Fix ${VAR-NONWORD} bugs
* lib/autoconf/functions.m4 (AC_FUNC_SELECT_ARGTYPES):
* lib/autoconf/programs.m4 (AC_FUNC_SELECT_ARGTYPES):
* lib/autotest/general.m4 (AT_INIT):
Rewrite to avoid ${VAR-VALUE} where VALUE is not a shell word.
2020-07-16 23:08:10 -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
7c08375081
tests/autotest.at: don’t use suffix rules to generate executables
In two tests, when @EXEEXT@ is empty, we were generating Makefiles
containing suffix rules with only one explicit suffix, e.g.

    .o:
        $(CC) -o $@ $^

Solaris 10’s ‘dmake’ does not understand this as a rule to create
‘foo’ from ‘foo.o’.  That’s not the point of the tests, so use
ordinary per-rule commands to link the executables in these tests
instead.

Partially addresses #110267.
2020-07-16 17:31:07 -04:00
Zack Weinberg
71b5037ac6
tests/local.at: improve sed portability
Solaris 10 /bin/sed does not support * after \( … \), only after
subexpressions that match a _single character_.

Partially addresses #110267. Problem reported by Dagobert Michelsen.

* tests/local.at (AT_CHECK_M4): Do not use star after parenthesized
  subexpression in sed s/// commands.
2020-07-16 16:43:48 -04: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
eb4a1d7faf Fix AC_PROG_LEX regression
Problem reported by Ross Burton in:
https://savannah.gnu.org/support/?110269
* lib/autoconf/programs.m4 (_AC_PROG_LEX_YYTEXT_DECL):
If tests indicate that LEX or LEXLIB does not work, set LEX to ":"
and LEXLIB empty, instead of failing out of 'configure' entirely.
2020-07-16 09:49:14 -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
6997ed9cee Revert mistaken patch for Wine
* lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT_CROSS):
Revert patch trying to cater to GNU/Linux builds
for Wine.  They should use --build as well as --host.
Problem reported by Bruno Haible in:
https://savannah.gnu.org/support/?110268
2020-07-15 11:51:07 -07:00
Nick Alcock
60e1c17ee0
NEWS: don’t describe Automake 1.13 as “upcoming.”
Automake 1.13 was released eight years ago.  The current version is
1.16.2.
2020-07-14 13:23:00 -04:00
Paul Eggert
5878ecc5fe * doc/autoconf.texi: Fix mishandling of `. 2020-07-13 12:55:19 -07:00
Paul Eggert
3d93e2a2a2 make fetch 2020-07-13 12:55:19 -07:00
Zack Weinberg
a1acd8e66b
Formally obsolete AC_CONFIG_HEADER (#105403)
This macro was replaced by AC_CONFIG_HEADERS many years ago (before
the beginning of the VCS history) and isn’t even documented, but we
never got around to making autoupdate notice it.  Problem reported
*in 2006* by jensseidel@users.sf.net.

There was one use of AC_CONFIG_HEADER in our source tree, which is
converted.  Also, to avoid confusing people reading old NEWS or TODO
entries, all mentions of AC_CONFIG_HEADER therein are also replaced
with AC_CONFIG_HEADERS.

* lib/autoconf/status.m4 (AC_CONFIG_HEADER): Make an AU_ALIAS for
  AC_CONFIG_HEADERS.
2020-07-12 11:59:14 -04:00
Zack Weinberg
d5cb54d02d
Add AC_PROG_EGREP to AU_DEFUN for AC_HEADER_STDC (#110215)
AC_HEADER_STDC used to use AC_EGREP_CPP, and therefore had the side
effect of AC_REQUIRE([AC_PROG_EGREP]).  In 2.70 AC_HEADER_STDC is an
AU_DEFUN and, before this change, the replacement didn’t invoke
AC_PROG_EGREP, which broke configure scripts that assumed $EGREP would
be set.  Problem reported by Ross Burton.

* lib/autoconf/headers.m4 (AU::AC_HEADER_STDC): Also invoke AC_PROG_EGREP.
2020-07-12 11:26:47 -04:00
Tom
8173e5d6fe
Fix logic error in _AC_PROG_LEX_YYTEXT_DECL (#109320)
The search for the appropriate value for @LEXLIB@ did not distinguish
correctly between success (‘break’ out of a shell for loop, having set
$ac_cv_lib_lex) and failure (normal termination of the loop, value in
$ac_cv_lib_lex is garbage).  Bug report and original patch by
Tom <tom@ojodeagua.com> with refinements by Zack Weinberg.

* lib/autoconf/programs.m4 (_AC_PROG_LEX_YYTEXT_DECL):
  Error out if we cannot find the library that (f)lex scanners
  need to be linked against, instead of continuing with @LEXLIB@
  set to the empty string.
2020-07-12 10:52:26 -04: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
Zack Weinberg
61024bf52b
Update links in COPYING, COPYINGv3, and COPYING.EXCEPTION.
- COPYINGv3 now exactly matches
   https://www.gnu.org/licenses/gpl-3.0.txt
   as of 2020-07-10.
   The only change was to turn a bunch of http:// URLs
   into https:// URLs.

 - COPYING now exactly matches
   https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
   as of 2020-07-10
   except that the FSF’s old postal address has been deleted
   and <https://fsf.org/> inserted
   (consistent with COPYINGv3).
   Besides the above, the only change was to whitespace.

 - A typo in a URL in COPYING.EXCEPTION was corrected.
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
63e8f7ad4d Fix ac_compiler_gnu bug
Problem and fix reported by Jannick in:
https://lists.gnu.org/r/autoconf/2020-03/msg00045.html
except that I omitted the comment, which I thought unnecessary.
* lib/autoconf/lang.m4 (_AC_LANG_COMPILER_GNU): Set
ac_compiler_gnu regardless of whether result was from cache.
2020-07-10 12:50:57 -07:00
Zack Weinberg
83798d2971
NEWS: add notes about known breakage due to pickier macros.
These are all cases where the offending configure script or
third-party macro was always incorrect, but autoconf 2.69 let you get
away with it.
2020-07-10 14:16:18 -04:00
Zack Weinberg
5016cdc03a
NEWS: mention that AS_INIT no longer embeds full paths to source files.
(Change made in c6daae41276a49b52a9d5e2f70c95651364ed619.)

Also reorder some of the NEWS entries more logically.
2020-07-09 13:59:05 -04:00
Luke Mewburn
c6daae4127
AS_INIT: basename __file__
Fix AS_INIT to encode the basename of __file__
instead of the full path to the source directory.
Allows for reproducible builds.
2020-07-05 09:45:52 -04:00
Paul Eggert
d0acdabdec Fix AC_CHECK_LIB quoting bug
Problem reported by Bert Wesarg in:
https://lists.gnu.org/archive/html/autoconf/2016-04/msg00020.html
* lib/autoconf/libs.m4 (AC_CHECK_LIB): Fix quoting bug.
* tests/semantics.at (AC_CHECK_LIB): Add a test for the bug.
2020-07-02 22:24:38 -07:00
Paul Eggert
ff47b2ea8d * tests/local.at: Fix space-tab problems. 2020-06-29 23:17:15 -07:00
Zack Weinberg
0a0a337886 Consistently expand macros in whitespace-separated lists.
Several of the most commonly used Autoconf macros (starting with
AC_CHECK_FUNCS and AC_CHECK_HEADERS) take a whitespace-separated list
of symbols as their primary argument.  It would abstractly be best if
this list were _not_ subject to M4 macro expansion, in case there’s a
collision between a M4 macro name and something to be looked for.
However, we have historically not been careful about this, and there’s
been reports of configure scripts using ‘dnl’ to write comments inside
the list.  The AS_LITERAL_IF optimizations added to AC_CHECK_FUNCS and
AC_CHECK_HEADERS since 2.69 broke some of those scripts with bizarre
shell syntax errors.

Also, the macro expansion behavior is not consistent among all of the
macros that take whitespace-separated lists, nor is it consistent
between autoconf and autoheader.

Address this by introducing a new m4sugar macro, currently called
‘m4_validate_w’ (I’m open to suggestions for better names).  Here’s
its documentation comment:

| m4_validate_w(STRING): Expands into m4_normalize(m4_expand([STRING])),
| but if that is not the same as just m4_normalize([STRING]),
| issue a warning.

The text of the warning is

| configure.ac:N: warning: whitespace-separated-list contains macros;
| configure.ac:N: in a future version of Autoconf they will not be expanded

If the unexpanded form of the string contains the token ‘dnl’ then
there’s an additional line:

| configure.ac:N: note: ‘dnl’ is a macro

All of the public macros that take a whitespace-separated list of
symbols are changed to pass that argument through m4_validate_w before
doing anything else with it, and the test suite is updated to verify
consistent behavior for every last one of them.

This addresses Savannah issues #110210 and #110211, and the harmless
but annoying autoheader behavior described at
https://lists.gnu.org/archive/html/bug-autoconf/2018-02/msg00005.html .

In order to avoid expanding relatively expensive m4sugar macros
multiple times per top-level macro invocation, several of the affected
Autoconf macros are restructured along the same lines as I did for
AC_REPLACE_FUNCS in the previous patch.

* lib/m4sugar/m4sugar.m4 (m4_validate_w): New macro.
* lib/autoconf/functions.m4 (AC_CHECK_FUNCS, AC_CHECK_FUNCS_ONCE)
  (AC_REPLACE_FUNCS)
* lib/autoconf/general.m4 (AC_CONFIG_MACRO_DIRS, AC_CHECK_FILES)
* lib/autoconf/headers.m4 (AC_CHECK_HEADERS, AC_CHECK_HEADERS_ONCE)
* lib/autoconf/status.m4 (AC_CONFIG_SUBDIRS): Pass $1 through
  m4_validate_w before use.

* lib/autoconf/headers.m4 (AC_CHECK_HEADERS): Refactor with helpers
  _AC_CHECK_HEADERS_ONE_U, _AC_CHECK_HEADERS_ONE_S, _AC_CHECK_HEADERS_ONE_C.
  (AC_CHECK_HEADERS_ONCE): Eliminate _AC_CHECK_HEADERS_ONCE.
  (AC_CHECK_INCLUDES_DEFAULT): Don’t use _AC_CHECK_HEADERS_ONCE.

* lib/autoconf/functions.m4 (AC_CHECK_FUNCS): Refactor with helpers
  _AC_CHECK_FUNCS_ONE_U, _AC_CHECK_FUNCS_ONE_S, _AC_CHECK_FUNCS_ONE_C.

* lib/autoconf/status.m4 (_AC_CONFIG_SUBDIRS): No need to use m4_normalize.

* tests/semantics.at: Add tests for expansion of M4 macros in
  whitespace-separated list arguments to all of the above.
2020-06-29 23:17:15 -07:00
Zack Weinberg
d330dd6273 AC_REPLACE_FUNCS: invoke _AH_CHECK_FUNC and AC_LIBSOURCE unconditionally.
While investigating something else, I noticed that AC_REPLACE_FUNCS
calls _AH_CHECK_FUNC and AC_LIBSOURCE in the success branch of an
AC_CHECK_FUNC.  This doesn’t work; both of those are marker macros
that need to be expanded unconditionally at m4 time so that traces
(placed by autoheader and automake, respectively) will fire.  In order
to fix this while keeping the code readable, I would up doing a major
refactor.  There are now four internal macros implementing AC_REPLACE_FUNCS.

_AC_REPLACE_FUNC_U is called unconditionally for every shell word in
the list passed to AC_REPLACE_FUNCS, and does _AH_CHECK_FUNC +
AC_LIBSOURCE if it can, or issues a warning if it can’t.  (It could
make sense to make this a public function, if we think shell variables
in the AC_REPLACE_FUNCS list need to be supported long-term.  I dunno
if there’s a use case that can’t be handled by AC_REPLACE_FUNCS inside
a shell conditional just as well.)

_AC_REPLACE_FUNC_L and _AC_REPLACE_FUNC_NL implement the actual test
performed for each function to be replaced; the difference is that _L
(for literal) can only be used on a function whose name is known at m4
expansion time, _NL (nonliteral) works regardless.  _AC_REPLACE_FUNCS,
which already existed, handles looping either at m4 time or shell time
as appropriate.  AC_REPLACE_FUNCS remains a thin wrapper that runs
_AC_REPLACE_FUNCS(m4_flatten([$1])).

The _bulk_ of the patch is changes to the testsuite so that it notices
the original bug.  Specifically, AT_CHECK_AUTOHEADER now takes an
argument which is a whitespace-separated list of preprocessor macro
names that ought to appear in the generated config.h.in.  This can be
set to ‘ignore’ to skip the test, and unfortunately that’s what the
“trivial” per-macro tests have to do (AT_CHECK_MACRO and friends), so
coverage is not ideal, but it’s better than what we had.  Also,
AT_CHECK_M4 now normalizes the backtrace lines that appear in the
output of an AC_DIAGNOSE, e.g.

    configure.ac:6: warning: The macro `AC_LANG_SAVE' is obsolete.
    configure.ac:6: You should run autoupdate.
    ../../lib/autoconf/lang.m4:125: AC_LANG_SAVE is expanded from...
    configure.ac:6: the top level

becomes

    configure.ac:6: warning: The macro `AC_LANG_SAVE' is obsolete.
    configure.ac:6: You should run autoupdate.
    lang.m4: AC_LANG_SAVE is expanded from...
    configure.ac:6: the top level

This allows us to write tests for these diagnostics that don’t depend
on the relationship between the source and build directories, and
won’t break when unrelated patches change the line number of a macro
definition.

	* lib/autoconf/functions.m4 (AC_REPLACE_FUNCS, _AC_REPLACE_FUNCS)
        (_AC_REPLACE_FUNC): Refactor into AC_REPLACE_FUNCS,
        _AC_REPLACE_FUNCS, _AC_REPLACE_FUNC_U, _AC_REPLACE_FUNC_L,
        _AC_REPLACE_FUNC_NL.  Ensure that _AH_CHECK_FUNC and
        AC_LIBSOURCE are invoked unconditionally at m4 expansion
        time for each literal function name in the argument to
        AC_CHECK_FUNCS.  Issue warnings about non-literal names.

        * tests/local.at (AT_CHECK_M4): Normalize backtrace lines from
        the output of AC_DIAGNOSE / m4_warn.
        (AT_CHECK_AUTOHEADER): Add arg EXPECTED-TMPLS
        giving a list of preprocessor macro names that should appear
        in the generated config.h.in.  Use AT_CHECK_M4 to invoke autoheader.
        (_AT_CHECK_AC_MACRO, AT_CHECK_MACRO, AT_CHECK_AU_MACRO):
        Update uses of AT_CHECK_AUTOHEADER.
        * tests/fortran.at, tests/semantics.at, tests/tools.at
        * tests/torture.at: Update all uses of AT_CHECK_AUTOHEADER.

        * tests/semantics.at (AC_REPLACE_FUNCS test): Make somewhat
        more thorough, using new functionality of AT_CHECK_M4 and
        AT_CHECK_AUTOHEADER.

Signed-off-by: Zack Weinberg <zackw@panix.com>
2020-06-29 23:17:15 -07:00
Zack Weinberg
25014b40e0 Look harder for a shell whose -n is known to work.
The test suite was insisting on using /bin/sh -n for syntax checking,
which meant that if /bin/sh wasn’t one of the short list of shells
whose -n is known to work, we would skip all of the syntax-check
tests, even if some other shell was available that would work.

Instead do like _AS_DETECT_BETTER_SHELL, and loop over possible
shells, starting with $SHELL and going on to a hardwired list of
known-good possibilities.  The result is written to the substitution
variable @SHELL_N@ and the testsuite uses that.

(Should we invoke AC_PATH_PROG on the result of the search if it’s not
already absolute?)

	* configure.ac: Search for a shell whose -n mode is known to
        work, instead of just checking /bin/sh.  Set @SHELL_N@ to
        what we find.
        * tests/atlocal.in: Propagate @SHELL_N@ to testsuite.
        * tests/local.at (AT_CHECK_SHELL_SYNTAX): Use $SHELL_N instead
        of hardcoding /bin/sh.  Update test for usable shell -n.
        (AT_CHECK_AUTOCONF): Update test for usable shell -n.
        * tests/tools.at: Update test for usable shell -n.
2020-06-29 23:17:15 -07:00
Paul Eggert
834b866d39 make fetch 2020-06-29 17:42:16 -07:00
Paul Eggert
df361999a7 Update release advice 2020-06-29 17:08:27 -07:00
Paul Eggert
5e650129bc Stop using up_to_date_p
* bin/autom4te.in (up_to_date): Rewrite to stop using
up_to_date_p, which has been removed from Automake.
2020-06-29 17:08:26 -07:00
Paul Eggert
c92f7606d6 make fetch 2020-06-29 17:08:26 -07:00
Paul Eggert
b3eb40f9c9 Save and check Autom4te version in cache
Problem reported in <https://bugs.debian.org/219621>.
* bin/autom4te.in: Save and check autom4te version number into cache index.
* lib/Autom4te/C4che.pm (save): New arg $version.  All callers changed.
(good_version): New sub.
2020-06-29 17:08:26 -07:00
Paul Eggert
a1d8293f3b Fix undefined behavior in AC_SYS_LARGEFILE
* lib/autoconf/specific.m4 (_AC_SYS_LARGEFILE_TEST_INCLUDES):
Avoid undefined behavior on platforms where off_t is 32 bits.  See:
https://bugs.debian.org/742780
2020-06-29 17:08:26 -07:00
Andreas Barth
9019c72d8f Look for AM_PROG_LIBTOOL too
This helps out dh-autoreconf on Debian
<https://bugs.debian.org/759739>.
* bin/autoreconf.in (autoreconf_current_directory):
* lib/autom4te.in (args): Look for AM_PROG_LIBTOOL too.
Copyright-paperwork-exempt: Yes
2020-06-29 17:08:26 -07:00
Zack Weinberg
8a09003664
Define $as_echo and $as_echo_n for backward compatibility.
Commit 2b59b6f8a7 removed the internal
shell variables $as_echo and $as_echo_n.  It turns out that these are
used by several widely-used third-party m4 files (notably both
gnulib-common.m4 from gnulib, and ax_pthread.m4 from the Autoconf
macro archive) as well as any number of existing configure.ac’s.

Restore these shell variables, unconditionally defining them to use
printf.  Issue -Wobsolete warnings if they are used, recommending the
use of AS_ECHO and AS_ECHO_N respectively.  Add a test which checks
both that they do work and that they trigger warnings.
2020-03-13 14:50:50 -04:00
Zack Weinberg
b2e4b63337
_AS_REEXEC_WITH_SHELL: don’t use AS_EXIT.
If _AS_REEXEC_WITH_SHELL fails to exec the selected “better” shell
interpreter, and that failure somehow doesn’t terminate the process,
it calls AS_EXIT([255]).  This expands to an invocation of as_fn_exit.
However, the definition of as_fn_exit goes into the M4SH-INIT-FN
diversion, whereas _AS_REEXEC_WITH_SHELL goes into the M4SH-SANITIZE
diversion, so as_fn_exit won’t be defined at the point of this use.
We can’t move the definition of as_fn_exit earlier, because we don’t
know that the shell supports shell functions until after we get to the
end of the M4SH-SANITIZE diversion.

This is only a theoretical bug because, as the comments say, “all the
known shells bail out after a failed exec.”  However, a shell that
doesn’t bail out will instead give the user a flood of nonsensical
error messages (starting with “as_fn_exit: not found” and then going
on to choke on the rest of the script) so I think we should fix it
anyway.  There shouldn’t be any problem with using a plain ‘exit’ at
this point; no traps are active yet, and we are exiting with an
explicit error code.
2020-03-13 13:38:46 -04:00
Zack Weinberg
2d06297bd5
README-hacking: re-configure from scratch during bootstrap.
When building autoconf from a git checkout, recommend running
‘make distclean’ and a second ‘./configure’ after regenerating
autoconf’s own configure script using the just-built autoconf.
If one only runs ‘make check’ at that point, some configure-time
tests will not be repeated using the new code, such as detection
of a “better” shell.
2020-03-13 13:35:01 -04:00
Paul Eggert
9894c7b5ba Fix _AS_DETECT_BETTER_SHELL breakage
Problem reported by Zack Weinberg in:
https://lists.gnu.org/r/autoconf/2020-03/msg00017.html
* lib/m4sugar/m4sh.m4 (_AS_RUN): Use sh -c instead of
the no-longer-existent $as_echo.  This fixes a bug introduced
in 2013-01-28T03:44:45Z!gary@gnu.org.
2020-03-12 17:49:12 -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
Paul Eggert
98d67d660d Mention 32-bit GNU/Linux 64-bit inodes
* lib/autoconf/specific.m4 (AC_SYS_LARGEFILE):
In a comment, mention 64-bit inode problem on 32-bit GNU/Linux.
This is taken from Gnulib.
2020-02-21 17:24:19 -08:00
Paul Eggert
2864a5dbbf Remove definition of _DARWIN_USE_64_BIT_INODE
It’s not needed in currently-supported macOS versions, and was
problematic anyway in MacOS X 10.5 which was the only version that
could use it.  Problem reported by Peter Eisentraut in:
https://lists.gnu.org/r/bug-autoconf/2020-02/msg00004.html
* lib/autoconf/specific.m4 (AC_SYS_LARGEFILE):
Don’t define _DARWIN_USE_64_BIT_INODE.
2020-02-21 17:24:19 -08:00