[PATCH 0/2] Modernize header checks

2013-05-30 Thread Zack Weinberg
This patch series accomplishes two things. First, it switches AC_CHECK_HEADER[S] to do only a compile test by default. This completes the transition begun in Autoconf 2.56. It has been my experience that basically nobody bothered to disable the mongrel mode, and that basically nobody actually

[PATCH 2/2] Modernize AC_INCLUDES_DEFAULT and friends.

2013-05-30 Thread Zack Weinberg
. (_AC_LIBOBJ_GETLOADAVG): Assume locale.h exists. (AC_FUNC_MMAP): Assume stdlib.h exists. * tests/tools.at: Use AC_WORDS_BIGENDIAN instead of AC_STDC_HEADERS in autoupdate test. * NEWS, doc/autoconf.texi: Document changes. Remove obsolete advice. Signed-off-by: Zack Weinberg za...@panix.com --- NEWS

[PATCH 1/2] AC_CHECK_HEADER/AC_CHECK_HEADERS: complete transition to compile tests.

2013-05-30 Thread Zack Weinberg
(AT_CHECK_M4): Support 'stderr' as fourth argument. * tests/c.at, tests/semantics.at: Update uses of AC_CHECK_HEADER(S). * doc/autoconf.texi, NEWS: Document change. Signed-off-by: Zack Weinberg za...@panix.com --- NEWS| 10 doc/autoconf.texi | 106

Re: [PATCH 0/2] Modernize header checks

2013-05-31 Thread Zack Weinberg
On Fri, May 31, 2013 at 12:39 PM, Russ Allbery r...@stanford.edu wrote: Zack Weinberg za...@panix.com writes: I *think* your patch would remove strings.h from the list of headers that are probed by default by Autoconf, and hence remove HAVE_STRINGS_H from the preprocessor directives set

[PATCH 3/3] Use AC_CHECK_HEADERS_ONCE for the tests done by AC_INCLUDES_DEFAULT.

2013-09-07 Thread Zack Weinberg
. (_AC_INCLUDES_DEFAULT_REQUIREMENTS): Use AC_CHECK_HEADERS_ONCE. (all of the above): Sprinkle dnl's around. Signed-off-by: Zack Weinberg za...@panix.com --- lib/autoconf/headers.m4 | 24 +++- 1 files changed, 15 insertions(+), 9 deletions(-) diff --git a/lib/autoconf/headers.m4 b

[PATCH 1/3] AC_CHECK_HEADER/AC_CHECK_HEADERS: complete transition to compile tests.

2013-09-07 Thread Zack Weinberg
(AT_CHECK_M4): Support 'stderr' as fourth argument. * tests/c.at, tests/semantics.at: Update uses of AC_CHECK_HEADER(S). * doc/autoconf.texi, NEWS: Document change. Signed-off-by: Zack Weinberg za...@panix.com --- NEWS| 10 doc/autoconf.texi | 106

[PATCH 2/3] Modernize AC_INCLUDES_DEFAULT and friends.

2013-09-07 Thread Zack Weinberg
obsolete advice. Signed-off-by: Zack Weinberg za...@panix.com --- NEWS | 24 doc/autoconf.texi | 314 + lib/autoconf/functions.m4 | 35 + lib/autoconf/headers.m4 | 179 ++ tests

Re: [PATCH 0/3] Modernize header checks, v2

2013-09-07 Thread Zack Weinberg
On 2013-09-07 10:06 AM, Paul Eggert wrote: Zack Weinberg wrote: One remaining wart is that autoupdate replaces AC_HEADER_STDC with an overt invocation of _AC_INCLUDES_DEFAULT_REQUIREMENTS. I couldn't find an AU_DEFUN construct that didn't expose this internal macro but would still DTRT both

Re: problem with ./configure

2013-09-12 Thread Zack Weinberg
On 2013-09-12 12:13 PM, Eric Blake wrote: That could help if we had a 'break' statement to abort the loop once we think a version had been scraped; but right now, the full loop is executed to completion regardless of what option(s) the compiler understands (and in the case of gcc, executing

Re: problem with ./configure

2013-09-12 Thread Zack Weinberg
On 2013-09-12 11:25 AM, Eric Blake wrote: -for ac_option in --version -v -V -qversion; do +for ac_option in --version -v -V -qversion -version; do _AC_DO_LIMIT([$ac_compiler $ac_option AS_MESSAGE_LOG_FD]) This isn't anything to do with your change, but -qversion should be moved to the

[PATCH 4/6] Use AC_CHECK_HEADERS_ONCE for the tests done by AC_INCLUDES_DEFAULT.

2013-09-15 Thread Zack Weinberg
. (_AC_INCLUDES_DEFAULT_REQUIREMENTS): Use AC_CHECK_HEADERS_ONCE. Signed-off-by: Zack Weinberg za...@panix.com --- lib/autoconf/headers.m4 | 16 +++- 1 files changed, 11 insertions(+), 5 deletions(-) diff --git a/lib/autoconf/headers.m4 b/lib/autoconf/headers.m4 index 634cf45..eb3aec8

[PATCH 3/6] Modernize AC_INCLUDES_DEFAULT and friends.

2013-09-15 Thread Zack Weinberg
in autoupdate test. * NEWS, doc/autoconf.texi: Document changes. Remove obsolete advice. Signed-off-by: Zack Weinberg za...@panix.com --- NEWS | 24 +++ doc/autoconf.texi | 373 ++--- lib/autoconf/functions.m4 | 47

[PATCH 6/6] Expose the checks done by AC_INCLUDES_DEFAULT as a public macro.

2013-09-15 Thread Zack Weinberg
-by: Zack Weinberg za...@panix.com --- doc/autoconf.texi | 13 + lib/autoconf/headers.m4 | 22 +- 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/doc/autoconf.texi b/doc/autoconf.texi index d097c23..dad882f 100644 --- a/doc/autoconf.texi +++ b

[PATCH 5/6] Use AC_CHECK_{DECLS, FUNCS, HEADERS}_ONCE more in specific-check macros.

2013-09-15 Thread Zack Weinberg
. (AC_FUNC_VPRINTF): Use AC_CHECK_FUNCS_ONCE for vprintf (but not _doprnt). * lib/autoconf/headers.m4 (AC_HEADER_TIME, AC_MEMORY_H): Use AC_CHECK_HEADERS_ONCE. Signed-off-by: Zack Weinberg za...@panix.com --- lib/autoconf/functions.m4 | 32 +++- lib/autoconf

[PATCH 2/6] AC_CHECK_HEADER/AC_CHECK_HEADERS: complete transition to compile tests.

2013-09-15 Thread Zack Weinberg
, tests/semantics.at: Update uses of AC_CHECK_HEADER(S). * doc/autoconf.texi, NEWS: Document change. Signed-off-by: Zack Weinberg za...@panix.com --- NEWS| 10 doc/autoconf.texi | 106 - lib/autoconf/headers.m4 | 122

[PATCH 1/6] * tests/local.at (AT_CHECK_M4): Support 'stderr' as fourth argument.

2013-09-15 Thread Zack Weinberg
Signed-off-by: Zack Weinberg za...@panix.com --- tests/local.at |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/local.at b/tests/local.at index 97a1e1d..47501bf 100644 --- a/tests/local.at +++ b/tests/local.at @@ -113,13 +113,14 @@ m4_define([AT_CHECK_M4

Re: [PATCH 4/6] Use AC_CHECK_HEADERS_ONCE for the tests done by AC_INCLUDES_DEFAULT.

2013-09-16 Thread Zack Weinberg
On 2013-09-14 12:42 PM, Zack Weinberg wrote: * lib/autoconf/headers.m4 (AC_CHECK_HEADERS_ONCE): Divide into a public macro that AC_REQUIREs _AC_INCLUDES_DEFAULT_REQUIREMENTS, and ... (_AC_CHECK_HEADERS_ONCE): ... a private macro, that doesn't. (_AC_HEADERS_EXPANSION): Use

Re: [PATCH 3/6] Modernize AC_INCLUDES_DEFAULT and friends.

2013-09-21 Thread Zack Weinberg
On Sat, Sep 21, 2013 at 9:29 AM, Eric Blake ebl...@redhat.com wrote: On 09/14/2013 10:22 AM, Zack Weinberg wrote: ... (AC_HEADER_STDC, AC_UNISTD_H): AU_DEFUN to trigger _AC_INCLUDES_DEFAULT_REQUIREMENTS if it hasn't already happened, and do nothing else. ... Ah, I see what you did

Re: [PATCH 3/6] Modernize AC_INCLUDES_DEFAULT and friends.

2013-09-23 Thread Zack Weinberg
On Mon, Sep 23, 2013 at 9:44 AM, Eric Blake ebl...@redhat.com wrote: Given that, do you still want patch 6? Yes, patch 6 is still worthwhile. OK. I have pushed the entire series now. zw

Re: Turn on compiler warnings by default for AC_PROG_CC, AC_PROG_CXX AC_PROG_FC

2014-01-14 Thread Zack Weinberg
For GCC I would be quite hesitant to turn anything on beyond -Wall without explicit buy-in from the project, but I like the idea of enabling -Wall by default.

Re: Turn on compiler warnings by default for AC_PROG_CC, AC_PROG_CXX AC_PROG_FC

2014-01-17 Thread Zack Weinberg
On 2014-01-17 4:02 PM, David A. Wheeler wrote: Zack Weinberg said: For GCC I would be quite hesitant to turn anything on beyond -Wall without explicit buy-in from the project, but I like the idea of enabling -Wall by default. I pretty sure that's what Dale Visser's patch does. It says

Re: [PATCH] docs: mention that not all values can be exported

2014-09-29 Thread Zack Weinberg
On Sat, Sep 27, 2014 at 8:26 PM, Eric Blake ebl...@redhat.com wrote: There has been a LOT of news about bash's Shell Shock bug lately. Document some of the ramifications it has on portable scripting. I think this is a good idea in the abstract, but I think it's maybe a little too specific to

Re: [PATCH] AC_HEADER_MAJOR: port to glibc 2.25

2016-09-14 Thread Zack Weinberg
On Wed, Sep 14, 2016 at 9:26 AM, Eric Blake wrote: > 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 > instead. However, because the

Re: [PATCH v2] AC_HEADER_MAJOR: port to glibc 2.25

2016-09-14 Thread Zack Weinberg
On Wed, Sep 14, 2016 at 3:00 PM, Eric Blake wrote: > > Thanks for the wordsmithing help, and forcing me to think about > mingw. This version updates some wording, and changes the macro > to leave the relative order of mkdev.h vs. sysmacros.h checking > unchanged (by merely

Re: [PATCH v2] AC_HEADER_MAJOR: port to glibc 2.25

2016-09-14 Thread Zack Weinberg
Doh, one small correction: > +@verbatim > +#include > +#ifdef MAJOR_IN_MKDEV > +# include > +#elif MAJOR_IN_SYSMACROS > +# include > +#endif > +@end verbatim That should be `#elif defined MAJOR_IN_SYSMACROS`. This was originally my mistake and I just realized it _was_ a mistake, sorry.

[PATCH] _AS_REEXEC_WITH_SHELL: don’t use AS_EXIT.

2020-03-13 Thread Zack Weinberg
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

Re: [PATCH] Define $as_echo and $as_echo_n for backward compatibility.

2020-03-13 Thread Zack Weinberg
On Fri, Mar 13, 2020 at 3:13 PM Eric Blake wrote: > > Unpatched bash 5.0 has a bug where calling $as_echo that contains \ can > result in unintended globbing, where the behavior of the expansion is > dependent on the contents of the current directory. Nasty! Yikes! And not just unpatched

[PATCH] Define $as_echo and $as_echo_n for backward compatibility.

2020-03-13 Thread Zack Weinberg
Commit 2b59b6f8a79b8bf77e178ff4e5aa0ede433d39cf 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

[PATCH 1/3] Look harder for a shell whose -n is known to work.

2020-03-25 Thread Zack Weinberg
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

[PATCH 2/3] AC_REPLACE_FUNCS: invoke _AH_CHECK_FUNC and AC_LIBSOURCE unconditionally.

2020-03-25 Thread Zack Weinberg
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 --- lib/autoconf/functions.m4 | 39 ++- tests/fortran.at

[PATCH 3/3] Consistently expand macros in whitespace-separated lists.

2020-03-25 Thread Zack Weinberg
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

Re: [PATCH] m4sh: prefer bash over sh

2020-03-23 Thread Zack Weinberg
On Mon, Mar 23, 2020 at 9:34 AM Ross Burton wrote: > _AS_DETECT_BETTER_SHELL looks for a good shell to use, and tries to look for > 'sh' before 'bash'. Whilst for many systems sh is a symlink to bash, > there are many where sh is a symlink to a more minimal sh implementation. > > For example,

Re: [PATCH] Swallow m4traces that have no file/line number

2020-09-04 Thread Zack Weinberg
I would like to get this bug fixed for autoconf 2.70, but the trouble is I have no idea how to reproduce the problem on my computer. The various old reports you originally linked to, all seem to involve filesystem-level bugs on MacOS, which I don't have convenient access to, or with archaic

Re: [PATCH] Fortran Cray pointer macro support

2020-10-06 Thread Zack Weinberg
On Tue, Oct 6, 2020 at 12:24 PM Marshall Ward wrote: > This patch adds a macro, AC_FC_CRAY_POINTER, which tests if the Fortran > compiler supports Cray pointers. This seems like a reasonable addition to me. Would anyone with Fortran experience care to comment? I have never properly learned

Re: AS_IF

2020-10-06 Thread Zack Weinberg
On Tue, Oct 6, 2020 at 5:57 PM Bruno Haible wrote: > Paul Eggert wrote in > : > > > AFAICS, this is relevant for code written directly into configure.ac. But > > > inside an AC_DEFUN it is irrelevant, because required macros are

Re: [PATCH] general.m4: fix AC_INIT with unquoted bug-report field

2020-10-13 Thread Zack Weinberg
On Tue, Oct 13, 2020 at 3:55 PM Ross Burton wrote: > > The bug report field is passed unquoted to m4_define which causes > problems if it contains values such as ',' (as seen in gmp). > > Ensure that the value is correctly quoted to solve this. Thanks for the patch. FYI, before committing it I

Re: AS_IF

2020-10-12 Thread Zack Weinberg
On Mon, Oct 12, 2020 at 3:01 AM Paul Eggert wrote: > On 10/6/20 5:52 PM, Zack Weinberg wrote: > > I'm not sure we should say AS_IF/CASE > > are equivalent to plain shell if/case inside an AC_DEFUN; they do do > > more than just make the m4 expansion stack not be empty. >

[PATCH 1/2 COMMITTED] Fix regressions when using the C++ compiler to perform tests.

2020-10-10 Thread Zack Weinberg
The Debian project has done an archive rebuild using autoconf 2.69c, which found several serious regressions from 2.69 where test programs used to be accepted by a C++ compiler, but are now rejected. Part of the problem is that newer C++ compilers are more likely to reject “traditional” sloppy C,

[PATCH 2/2 RFC] Improve handling of missing aux scripts.

2020-10-10 Thread Zack Weinberg
Another regression identified by the Debian archive rebuild was that more macros require the presence of config.sub and config.guess now. ‘autoreconf --install’ doesn’t install these itself, it relies on ‘automake --add-missing’ to do that; so, packages that don’t use Automake will fail at the

Re: [RFC PATCH 0/2] Additional AC_INIT/AC_OUTPUT-related diagnostics

2020-08-17 Thread Zack Weinberg
On Fri, Aug 14, 2020 at 5:06 PM Paul Eggert wrote: > On 8/14/20 11:44 AM, Zack Weinberg wrote: > > I found a kludge that works, > > but I’d like to hear opinions on whether we should instead postpone > > this patch till after 2.70 so we can coordinate with automak

Re: RFC PATCH 1/2] AS_INIT: try to ensure fds 0, 1, 2 are open

2020-08-28 Thread Zack Weinberg
On Thu, Aug 27, 2020 at 6:49 PM Paul Eggert wrote: > > On 8/27/20 3:20 PM, Zack Weinberg wrote: > > On Thu, Aug 27, 2020 at 2:09 PM Paul Eggert wrote: > >> > >>> + if (exec 3>&0) 2>/dev/null; then :; else exec 0 >>> + if (exec

[PATCH] Generate manpages directly from source code.

2020-08-21 Thread Zack Weinberg
ion) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have receive

[PATCH] tests: New helper macro AT_CHECK_MAKE.

2020-08-20 Thread Zack Weinberg
This macro factors out some repeated code surrounding tests that run make, such as honoring $MAKE, *not* honoring $MAKEFLAGS, and normalizing the exit status. Partially addresses bug #110267 (problems with Sun’s make barfing on GNU make options from $MAKEFLAGS). Also addresses some unrelated

[RFC PATCH 1/2] AS_INIT: try to ensure fds 0, 1, 2 are open

2020-08-27 Thread Zack Weinberg
A patch was recently proposed for GNU libc to make *all* processes start up with file descriptors 0, 1, and 2 guaranteed to be open. Part of the rationale for this patch was that configure scripts fail catastrophically if these fds are closed, even if you just want to run --help or --version, e.g.

[RFC PATCH 2/2] _AS_ENSURE_STANDARD_FDS: use lsof and fstat when possible

2020-08-27 Thread Zack Weinberg
This follow-up patch adds additional ways of detecting whether fds 0, 1, 2 are closed, using the ‘lsof’ and ‘fstat’ utilities. The former is not a standard component of any OS, but is very widely installed and can produce machine-parseable output; the latter ships with many BSD variants but its

Re: RFC PATCH 1/2] AS_INIT: try to ensure fds 0, 1, 2 are open

2020-08-27 Thread Zack Weinberg
On Thu, Aug 27, 2020 at 2:09 PM Paul Eggert wrote: > > > + if (exec 3>&0) 2>/dev/null; then :; else exec 0 > + if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi > > + if (exec 3>&2); then :; else exec 2>/dev/null; fi > > This is all _AS_ENSURE_STANDARD_FDS needs to do;

[PATCH 1/2] Trim whitespace from arguments of AC_INIT (#107986)

2020-08-14 Thread Zack Weinberg
Specifically, all five arguments, if present, are passed through m4_normalize before doing anything else with them. For instance, AC_INIT([ GNU Hello ], [1.0]) is now equivalent to AC_INIT([GNU Hello], [1.0]). As a consequence, newlines in the arguments to AC_INIT are now converted to spaces

[PATCH 2/2] Warn if AC_INIT or AC_OUTPUT are missing from configure.ac (#107986)

2020-08-14 Thread Zack Weinberg
It is almost always incorrect for a configure script to omit either AC_INIT or AC_OUTPUT. Issue warnings in the ‘syntax’ category for this. The implementation is, unfortunately, a bit of a kludge. To check for the _absence_ of a macro invocation, we can use m4_provide_if inside a m4_wrap hook.

[RFC PATCH 0/2] Additional AC_INIT/AC_OUTPUT-related diagnostics

2020-08-14 Thread Zack Weinberg
to hear opinions on whether we should instead postpone this patch till after 2.70 so we can coordinate with automake on the addition of the missing autom4te feature. zw Zack Weinberg (2): Trim whitespace from arguments of AC_INIT (#107986) Warn if AC_INIT or AC_OUTPUT are missing from

[RFC PATCH 3/3] Update documentation of warnings options and strictness levels.

2020-09-22 Thread Zack Weinberg
The warning categories ‘cross’ and ‘portability-recursive’ were not mentioned in the manual. Also clarify the relationship between warnings categories and strictness levels, and streamline the description of strictness levels by merging the “Gnits” section into the “Strictness” section. *

[RFC PATCH 0/3] Work around autoconf/automake warnings skew (automake side)

2020-09-22 Thread Zack Weinberg
org/archive/html/autoconf-patches/2020-09/msg8.html> for the rationale for merge_WARNINGS, which is not used in automake, but will be in autoconf. Zack Weinberg (3): New utility function Automake::ChannelDefs::merge_WARNINGS. Use WARNINGS=none to suppress warnings from autom4te runs.

[RFC PATCH 1/3] New utility function Automake::ChannelDefs::merge_WARNINGS.

2020-09-22 Thread Zack Weinberg
This function merges a list of warnings categories into the environment variable WARNINGS, returning a new value to set it to. The intended use is in code of the form { local $ENV{WARNINGS} = merge_WARNINGS ("this", "that"); # run a command here with WARNINGS=this,that,etc } This is not

[RFC PATCH 5/6] Update documentation related to warnings.

2020-09-22 Thread Zack Weinberg
This makes the Texinfo documentation consistent with the previous changes. --help output regarding warnings is already drawn directly from ChannelDefs.pm and thus does not need to be updated. * doc/autoconf.texi: Update all ‘invocation’ sections to describe -W/--warnings consistently, and to

[RFC PATCH 2/6] New utility function Autom4te::ChannelDefs::merge_WARNINGS.

2020-09-22 Thread Zack Weinberg
This function merges a list of warnings categories into the environment variable WARNINGS, returning a new value to set it to. The intended use is in code of the form { local $ENV{WARNINGS} = merge_WARNINGS ("this", "that"); # run a command here with WARNINGS=this,that,etc } This is not

[RFC PATCH 1/6] Manually sync ChannelDefs.pm from automake.

2020-09-22 Thread Zack Weinberg
ChannelDefs.pm *ought* to be kept in sync between automake and autoconf, because it defines the set of valid -W options, and autoreconf assumes that it can pass arbitrary -W options to all of the tools it invokes. However, it isn’t covered by either project’s ‘make fetch’ and it hasn’t actually

[RFC PATCH 6/6] Autoupdate AC_{DIAGNOSE, FATAL, OBSOLETE, WARNING} and _AC_COMPUTE_INT.

2020-09-22 Thread Zack Weinberg
While working on the previous patches I noticed that all of these macros are officially obsolete, but autoupdate doesn’t replace them. _AC_COMPUTE_INT is easy to autoupdate. AC_{DIAGNOSE,FATAL,WARNING} require a little special handling because their replacements are m4sugar macros, and

[RFC PATCH 0/6] Work around autoconf/automake warnings skew

2020-09-22 Thread Zack Weinberg
ill do that in a separate commit after all the dust settles from this patchset. zw -- Zack Weinberg (6): Manually sync ChannelDefs.pm from automake. New utility function Autom4te::ChannelDefs::merge_WARNINGS. Disable all warnings when running autoconf as a subprocess. Use WARNINGS to pass down warnings o

[RFC PATCH 3/6] Disable all warnings when running autoconf as a subprocess.

2020-09-22 Thread Zack Weinberg
autoheader and autoscan both run autoconf in trace mode, and autoheader makes a point of passing down the warnings options. This means autoheader prints warnings that a regular invocation of autoconf would also print, so in the common case where both are being run by autoreconf, the warnings are

[RFC PATCH 2/3] Use WARNINGS=none to suppress warnings from autom4te runs.

2020-09-22 Thread Zack Weinberg
aclocal uses autom4te in trace mode to scan configure.ac for macros whose definition is not yet available. It has a kludge to prevent this from producing spurious warnings, but a cleaner, fully backward compatible, way to get the same effect is to set WARNINGS=none in the environment and not pass

Re: doc: Mention two more shell portability problems

2020-09-18 Thread Zack Weinberg
I verified both of these behaviors and merged the patch, with two slight changes to the text: - it is specifically Solaris 10 /bin/sh that executes redirected compound commands in a subshell; ksh (aka /usr/xpg4/bin/sh) doesn't. - the latest version of dash also doesn't support file descriptors

Re: [PATCH] AC_LANG_INT_SAVE: Modernize function declarators (C89 and above).

2020-08-05 Thread Zack Weinberg
On Wed, Aug 5, 2020 at 1:32 PM Vincent Lefevre wrote: > > On 2020-08-05 07:24:38 -0700, Paul Eggert wrote: > > On 8/5/20 3:59 AM, Vincent Lefevre wrote: > > > This allows one to avoid a failure with AC_COMPUTE_INT when using > > > the -Werror=old-style-definition GCC option. > > > > Why is this

Re: [PATCH] Use just-built utilities for help2man rule

2020-07-15 Thread Zack Weinberg
On Wed, Jul 15, 2020 at 7:57 AM Andreas Schwab wrote: > - > PATH="./tests$(PATH_SEPARATOR)$(top_srcdir)/build-aux$(PATH_SEPARATOR)$$PATH"; > \ > + > PATH="bin$(PATH_SEPARATOR)./tests$(PATH_SEPARATOR)$(top_srcdir)/build-aux$(PATH_SEPARATOR)$$PATH"; > \ This bypasses the wrappers

Re: [PATCH] Use just-built utilities for help2man rule

2020-07-15 Thread Zack Weinberg
On Wed, Jul 15, 2020 at 10:13 AM Andreas Schwab wrote: > On Jul 15 2020, Zack Weinberg wrote: > > > Under normal circumstances, there should always be a wrapper in > > ./tests for each executable in ./bin. > > There are no dependencies. OK, want to write a patch to fix *that*? zw

Re: [PATCH] AS_INIT: don't encode full path

2020-07-04 Thread Zack Weinberg
On Fri, Jul 3, 2020 at 8:42 PM Luke Mewburn wrote: > > Fix AS_INIT to use the basename of __file__ instead of the full path. > Allows for reproducible builds. I like the idea here, but I think the patch isn't quite ready yet. Most importantly, please write a test for the testsuite to ensure that

Re: [PATCH] Revert 'Fix logic error in _AC_PROG_LEX_YYTEXT_DECL (#109320)'

2020-07-16 Thread Zack Weinberg
On Thu, Jul 16, 2020 at 7:21 AM Ross Burton wrote: > > Commit 8173e5, 'Fix logic error in _AC_PROG_LEX_YYTEXT_DECL (#109320)', > causes AC_PROG_LEX to always fail when searching for a lex library. Before we give up on this patch I'd like to understand the conditions under which it fails. I did

Re: [PATCH] Revert 'Fix logic error in _AC_PROG_LEX_YYTEXT_DECL (#109320)'

2020-07-16 Thread Zack Weinberg
On Thu, Jul 16, 2020 at 9:46 AM Ross Burton wrote: > > On Thu, 16 Jul 2020 at 14:08, Zack Weinberg wrote: > > > Commit 8173e5, 'Fix logic error in _AC_PROG_LEX_YYTEXT_DECL (#109320)', > > > causes AC_PROG_LEX to always fail when searching for a lex library. &

Re: [PATCH] Revert 'Fix logic error in _AC_PROG_LEX_YYTEXT_DECL (#109320)'

2020-07-16 Thread Zack Weinberg
On Thu, Jul 16, 2020 at 1:55 PM Ross Burton wrote: > On Thu, 16 Jul 2020 at 18:51, Paul Eggert wrote: >> >> On 7/16/20 10:34 AM, Ross Burton wrote: >> > Wouldn't that break cross-compilation where a host flex is present but >> > target libfl isn't? That case worked previously and should work

Re: [PATCH] Revert 'Fix logic error in _AC_PROG_LEX_YYTEXT_DECL (#109320)'

2020-07-16 Thread Zack Weinberg
On Thu, Jul 16, 2020 at 2:47 PM Ross Burton wrote: > On Thu, 16 Jul 2020 at 19:41, Zack Weinberg wrote: > > Can we slow down a bit please? I had written out a patch (basically > > equivalent to what's now in trunk) and I am in the process of setting > > up a cross-co

Re: [PATCH] Revert 'Fix logic error in _AC_PROG_LEX_YYTEXT_DECL (#109320)'

2020-07-16 Thread Zack Weinberg
On Thu, Jul 16, 2020 at 8:50 PM Paul Eggert wrote: > On 7/16/20 11:40 AM, Zack Weinberg wrote: > > I believe that what's in trunk now should work fine for > > cross-compilation of programs that don't require yywrap > > I thought so too, but after eyeballing the trunk a

Re: [PATCH] AS_INIT: don't encode full path

2020-07-05 Thread Zack Weinberg
On Sun, Jul 5, 2020 at 12:13 AM Luke Mewburn wrote: > > I've updated the patch to address your comments: > 1) Added a testsuite. > 2) Added the comment. > 3) Improved the regex. (Thanks for the heads up about M4 greedy regex.) Thanks for the quick reply! I adjusted the wording of the comment a

Re: [PATCH] general: support CONFIG_SITE being a list of entries

2020-11-11 Thread Zack Weinberg
On Wed, Nov 11, 2020 at 8:33 AM Ross Burton wrote: > > Instead of treating CONFIG_SITE as a single path, treat it as a > space-separated list of paths and load them in order. Thanks. This is simple enough that I don't see any reason not to merge it for 2.70, but could you also update the

Re: [PATCH v2] general: support CONFIG_SITE being a list of entries

2020-11-11 Thread Zack Weinberg
On Wed, Nov 11, 2020 at 11:04 AM Ross Burton wrote: > > Instead of treating CONFIG_SITE as a single path, treat it as a > space-separated list of paths and load them in order. Merged with minor adjustments as 996f608165814d578bdcb0ab2f3382edb8918690, thank you again. zw

[PATCH 2/2] Improve handling of missing aux scripts (autoreconf)

2020-10-20 Thread Zack Weinberg
Make ‘autoreconf --install’ add config.sub, config.guess, and install-sh to the source tree when necessary. This is only relevant for packages that don’t use Automake, because ‘automake --add-missing’ already adds these scripts to the source tree, but apparently there are plenty of packages out

RFC: Autotest: add official way to execute code before all/each test.

2020-10-28 Thread Zack Weinberg
is available from the zack/autotest-new-hooks branch on savannah git. zw From ff49cfa697466da3bbce6b740c228fe84831c174 Mon Sep 17 00:00:00 2001 From: Zack Weinberg Date: Wed, 28 Oct 2020 17:04:22 -0400 Subject: [PATCH] Autotest: add official way to execute code before all/each test. MIME-Version: 1.0

Re: [PATCH] doc: Document another portability problem of 'od'.

2020-12-30 Thread Zack Weinberg
On Mon, Dec 28, 2020 at 9:43 PM Bruno Haible wrote: > Here's a patch to mention a portability problems of 'od', that I noticed > during Gnulib work. Merged, thank you.

Re: [PATCH] lib/autoconf/c.m4: fix NULL pointer dereference in _AC_LANG_IO_PROGRAM

2021-06-28 Thread Zack Weinberg
On Mon, Jun 28, 2021 at 10:17 AM Nicolas Iooss wrote: > * lib/autoconf/c.m4: return an error when f is NULL. > --- > lib/autoconf/c.m4 | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/autoconf/c.m4 b/lib/autoconf/c.m4 > index 9f881f0bc10c..0d9efa62d450 100644 > ---

[PATCH 3/3] Add a bootstrap script like Automake has.

2021-02-05 Thread Zack Weinberg
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

[PATCH 2/3] Rewrite bin/autoconf in Perl.

2021-02-05 Thread Zack Weinberg
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

[PATCH 1/3] Generate version.m4 from config.status, in lib/ not lib/m4sugar/.

2021-02-05 Thread Zack Weinberg
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

[PATCH 0/3] RFC: automated bootstrap script

2021-02-05 Thread Zack Weinberg
how to generate M4sh scripts, so I’m posting this for comments and will wait one week before proceeding. (I think the code changes are desirable for other reasons, but the bootstrap process is why I did them now.) Zack Weinberg (3): Generate version.m4 from config.status, in lib/ not lib/m4sugar

Re: [PATCH] add new AC_PROG_AR helper

2021-02-22 Thread Zack Weinberg
On Mon, Feb 22, 2021 at 11:15 AM Mike Frysinger wrote: > 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

Re: [PATCH v4] Fortran Cray pointer macro support

2021-08-16 Thread Zack Weinberg
On Mon, Aug 16, 2021, at 10:12 AM, Marshall Ward wrote: > I haven't received any feedback on these updated PRs, which address > the issues raised in the first version. Unfortunately, I have almost no time for Autoconf work until 2022 at the earliest, and what time I do have is already earmarked

Re: [PATCH 0/3] RFC: automated bootstrap script

2021-09-15 Thread Zack Weinberg
On Sat, Feb 6, 2021, at 11:23 AM, Jim Meyering wrote: > On Fri, Feb 5, 2021 at 7:42 AM Zack Weinberg wrote: > > The procedure for building Autoconf from a git checkout is a little > > awkward, involving building it once, then using the just-built > > autoconf to regenerate

Re: [PATCH] add new AC_PROG_AR helper

2022-01-24 Thread Zack Weinberg
On Wed, Jan 19, 2022, at 12:22 AM, Mike Frysinger wrote: > On 22 Feb 2021 11:26, Zack Weinberg wrote: >> On Mon, Feb 22, 2021 at 11:15 AM Mike Frysinger wrote: >> > This mirrors the existing RANLIB and related toolchain macros that >> > autoconf already exports

Re: [PATCH] add new AC_PROG_AR helper

2022-01-26 Thread Zack Weinberg
On Tue, Jan 25, 2022, at 12:58 AM, Mike Frysinger wrote: > On 24 Jan 2022 09:35, Zack Weinberg wrote: >> Sorry about that, I thought you would merge it yourself (do you not have >> commit access for autoconf?) It's merged now. I had to add a change to >> tests/local.at

Re: How to get autoconf to respect CC="gcc -std=c89"?

2023-10-11 Thread Zack Weinberg
On Wed, Oct 11, 2023, at 3:43 AM, Niels Möller wrote: > Niels Möller writes: > >> Updated patch below. > > How do we move this forward? I think we first need to settle the > user-visible part, i.e., how AC_C_STANDARD_VERSION should work ... > Latest patch aims for the following, which seems

Re: [PATCH 1/2] Fix detection of GNU M4 on mksh

2023-10-17 Thread Zack Weinberg
On Sun, Oct 15, 2023, at 2:58 AM, KO Myung-Hun wrote: > Zack Weinberg wrote: >> On Sat, Oct 14, 2023, at 9:19 AM, KO Myung-Hun wrote: >>> * m4/m4.m4 (AC_PROG_GNU_M4): Double-quotes $ac_snip2. >> Please explain why it isn't also necessary to add double quotes >>

Re: [PATCH 2/2] Ignore failure of setting mode on a temporary file on OS/2

2023-10-17 Thread Zack Weinberg
On Sun, Oct 15, 2023, at 3:43 AM, KO Myung-Hun wrote: > Zack Weinberg wrote: >> On Sat, Oct 14, 2023, at 9:19 AM, KO Myung-Hun wrote: >>> * bin/autom4te.in (handle_output): Ignore setting mode failure on OS/2. >> >> Not OK, for two reasons: ... > How about this ?

Re: [PATCH 2/2] Ignore failure of setting mode on a temporary file on OS/2

2023-10-17 Thread Zack Weinberg
On Sat, Oct 14, 2023, at 1:27 PM, Russ Allbery wrote: > The standard Perl command corelist -a tells you the versions of > that module that shipped with each version of Perl. The first version of > Perl that included a version of File::Temp later than 0.2310 was Perl > 5.33.3 (which included

Re: [PATCH 1/2] Fix detection of GNU M4 on mksh

2023-10-18 Thread Zack Weinberg
On Wed, Oct 18, 2023, at 10:09 AM, KO Myung-Hun wrote: > Zack Weinberg wrote: >> Details please? > > Commit message was not enough ? I'm afraid not. I needed to know everything you say in the next two paragraphs: > $ac_snip2 contains NL. And in order to print it, `print -r --'

Re: [PATCH 2/2] Ignore failure of setting mode on a temporary file on OS/2

2023-10-18 Thread Zack Weinberg
On Tue, Oct 17, 2023, at 2:58 PM, Paul Eggert wrote: > On 10/17/23 11:16, Zack Weinberg wrote: ... >> you have to be exquisitely careful, or a malicious concurrent process >> might be able to trick you into overwriting some file elsewhere on >> the filesystem. ...

Re: [PATCH 2/2] Ignore failure of setting mode on a temporary file on OS/2

2023-10-18 Thread Zack Weinberg
On Wed, Oct 18, 2023, at 10:21 AM, KO Myung-Hun wrote: > Zack Weinberg wrote: >> I don’t want to have code in Autoconf that is only safe because of >> non-obvious details of the context it’s used in. People might >> reuse the code in a different context where it’s *not* safe,

Re: [PATCH 1/2] Fix detection of GNU M4 on mksh

2023-10-14 Thread Zack Weinberg
On Sat, Oct 14, 2023, at 9:19 AM, KO Myung-Hun wrote: > * m4/m4.m4 (AC_PROG_GNU_M4): Double-quotes $ac_snip2. Please explain why it isn't also necessary to add double quotes around all the other variable expansions in this check, particularly $ac_snippet and $ac_path_M4. Also, typo in your

Re: [PATCH 2/2] Ignore failure of setting mode on a temporary file on OS/2

2023-10-14 Thread Zack Weinberg
On Sat, Oct 14, 2023, at 9:19 AM, KO Myung-Hun wrote: > OS/2 does not allow chmod() on an opened file. > > * bin/autom4te.in (handle_output): Ignore setting mode failure on OS/2. Not OK, for two reasons: (1) IIRC this is used to create scripts with the execute bit set in at least one place.

Re: [PATCH] m4: Update invocation of AC_PROG_LEX

2023-08-16 Thread Zack Weinberg
On Wed, Aug 16, 2023, at 2:38 AM, Łukasz Stelmach wrote: > Commit 73f1be5e42e3 to autoconf has introduced an argument to > AC_PROG_LEX. Invocation without the argument has been treated as > obsolete since then. This should go to automake-patches, not autoconf-patches. Also, you should update the

[PATCH 2/5] make fetch

2022-07-10 Thread Zack Weinberg
Our local patches to lib/Autom4te/FileUtils.pm and maint.mk were manually reapplied. --- GNUmakefile |2 +- build-aux/announce-gen | 114 ++- build-aux/config.guess | 1262 -- build-aux/config.sub | 94 ++-

[PATCH 4/5] Make help-extract.pl work with Perl 5.10.x.

2022-07-10 Thread Zack Weinberg
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.

[PATCH 5/5] Fix testsuite failures on Darwin (aka macOS).

2022-07-10 Thread Zack Weinberg
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

[PATCH 1/5] Require Perl 5.10.0 or later.

2022-07-10 Thread Zack Weinberg
6,7 @@ # Written by Zack Weinberg. +use 5.010; use strict; use warnings; diff --git a/configure.ac b/configure.ac index 9362ddf3..3d849ac4 100644 --- a/configure.ac +++ b/configure.ac @@ -153,14 +153,7 @@ AM_MISSING_PROG([HELP2MAN], [help2man]) ## -- ## # We use an absolute name for perl

[PATCH 3/5] Remove ancient backward compatibility code from m4/m4.m4.

2022-07-10 Thread Zack Weinberg
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. --- m4/m4.m4 | 13 +++-- 1

  1   2   >