[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/5] Require Perl 5.10.0 or later.
From: |
Zack Weinberg |
Subject: |
Re: [PATCH 1/5] Require Perl 5.10.0 or later. |
Date: |
Tue, 12 Jul 2022 14:36:28 -0400 |
User-agent: |
Cyrus-JMAP/3.7.0-alpha0-755-g3e1da8b93f-fm-20220708.002-g3e1da8b9 |
On Tue, Jul 12, 2022, at 10:06 AM, Eric Blake wrote:
> On Sun, Jul 10, 2022 at 03:08:57PM -0400, Zack Weinberg wrote:
>> +# That is, AClocal_PATH_PROG_GLOBS_FEATURE_CHECK([PERL], [perl-*]) will
>> +# test each program named something like 'perl-*' found anywhere on the
>> +# path. Due to the syntax conflict with Autoconf string quoting,
>> +# character sets (e.g. perl-[56]*) are not supported.
>
> Will quadrigraphs help? @<:@ and @:>@ form late expansions to [ and ]
> respectively, so that you can guarantee their presence in the
> configure script without munging during the rest of autoconf.
Are you suggesting that people should write this?
AC_PATH_PROG_GLOBS_FEATURE_CHECK([perl perl5.@<:@6-9@:>@], [...])
The problem with that (well, besides bad ergonomics) is it ultimately needs to
expand to something like
for as_dir in $PATH; do
for ac_prog in perl perl5.\[6-9\]; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_pathglob_PERL="$as_dir$ac_prog$ac_exec_ext"
for ac_path_PERL in $ac_pathglob_PERL; do
# feature check here
done
done
done
done
where the glob has been escaped in the second for loop's arguments so that it
is not expanded prematurely. That's what the m4_bpatsubst([$2], [[!?*]],
[\\\&]) does, but currently only for glob metacharacters _other than_ [ and ].
I tried m4_bpatsubst([$2], [[]!?*[]], [\\\&]) but then
AC_PATH_PROG_GLOBS_FEATURE_CHECK([perl perl5.[6-9]], [...])
expanded to
...
for ac_prog in perl perl5.\6-9\; do
...
and that's the point at which I gave up.
zw
- [PATCH 0/5] Five mostly unrelated patches, Zack Weinberg, 2022/07/10
- [PATCH 3/5] Remove ancient backward compatibility code from m4/m4.m4., Zack Weinberg, 2022/07/10
- [PATCH 5/5] Fix testsuite failures on Darwin (aka macOS)., Zack Weinberg, 2022/07/10
- [PATCH 1/5] Require Perl 5.10.0 or later., Zack Weinberg, 2022/07/10
- [PATCH 2/5] make fetch, Zack Weinberg, 2022/07/10
- [PATCH 4/5] Make help-extract.pl work with Perl 5.10.x., Zack Weinberg, 2022/07/10