[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: AC_PACKAGE_VERSION visibility slightly changed in autoconf-2.69c. Bu
From: |
Nick Bowler |
Subject: |
Re: AC_PACKAGE_VERSION visibility slightly changed in autoconf-2.69c. Bug or feature? |
Date: |
Thu, 22 Oct 2020 12:18:01 -0400 |
On 22/10/2020, Zack Weinberg <zackw@panix.com> wrote:
> On Thu, Oct 22, 2020 at 11:53 AM Nick Bowler <nbowler@draconx.ca> wrote:
>> On 2020-10-22, Zack Weinberg <zackw@panix.com> wrote:
>> > On Wed, Oct 21, 2020 at 10:25 PM Paul Eggert <eggert@cs.ucla.edu>
>> > wrote:
>> >>
>> >> On 10/21/20 6:15 AM, Zack Weinberg wrote:
>> >> > We*could* add a special case in AC_INIT where, if any of the third,
>> >> > fourth, or fifth arguments contain the literal strings
>> >> > `AC_PACKAGE_NAME` or `AC_PACKAGE_VERSION`, those are replaced with
>> >> > the
>> >> > values of the first and second argument, respectively. This would
>> >> > keep the GHC code working as-is. I'm not sure whether that's a good
>> >> > idea; cc:ing Paul and Eric for their thoughts.
>> >>
>> >> I'm not following all the details here
>> >
>> > The concrete problem is that, without the hack I described, we cannot
>> > support both
>> >
>> > AC_INIT([foo], [1.0], [foo-bug@foo.org], [foo-AC_PACKAGE_VERSION])
>> >
>> > and
>> >
>> > AC_INIT([bar], [1.0], [foo-bug@[192.0.2.1]])
>>
>> I think this is missing the point. The m4 way is that such an
>> email address should simply be double quoted to avoid the unwanted
>> m4 expansion, for example:
>>
>> AC_INIT([bar], [1.0], [[foo-bug@[192.0.2.1]]])
>
> I tried that and it doesn't work. No amount of extra quotation (ok, I
> only went up to four levels before I gave up) will prevent the square
> brackets from being lost, if I don't have autoconf use m4_defn to set
> the value of the shell variable PACKAGE_BUGREPORT.
It works perfectly fine for me with Autoconf-2.69...
% cat >configure.ac <<'EOF'
AC_INIT([bar], [1.0], [[foo-bug@[192.0.2.1]]])
AS_ECHO(["AC_PACKAGE_BUGREPORT"])
AS_ECHO(["$PACKAGE_BUGREPORT"])
AC_OUTPUT
EOF
% autoconf-2.69
% ./configure
2.69
foo-bug@[192.0.2.1]
foo-bug@[192.0.2.1]
configure: creating ./config.status
And it also works as expected with the zack/ac-init-quoting branch if I
simply revert the patch hunks identified earlier in this thread:
% autoconf-zack-patched
% ./configure
2.69c.10-6487-dirty
foo-bug@[192.0.2.1]
foo-bug@[192.0.2.1]
configure: creating ./config.status
If the hunks are not reverted, quotation problems are readily apparent:
% autoconf-zack-unpatched
2.69c.10-6487
foo-bug@[192.0.2.1]
[foo-bug@[192.0.2.1]]
configure: creating ./config.status
(those patch hunks are not the only instances of overquotation added by the
patch, I see that the patch also overquotes the bugreport address in the
configure --help text)
Cheers,
Nick
- AC_PACKAGE_VERSION visibility slightly changed in autoconf-2.69c. Bug or feature?, Sergei Trofimovich, 2020/10/20
- Re: AC_PACKAGE_VERSION visibility slightly changed in autoconf-2.69c. Bug or feature?, Nick Bowler, 2020/10/20
- Re: AC_PACKAGE_VERSION visibility slightly changed in autoconf-2.69c. Bug or feature?, Sergei Trofimovich, 2020/10/20
- Re: AC_PACKAGE_VERSION visibility slightly changed in autoconf-2.69c. Bug or feature?, Zack Weinberg, 2020/10/21
- Re: AC_PACKAGE_VERSION visibility slightly changed in autoconf-2.69c. Bug or feature?, Nick Bowler, 2020/10/21
- Re: AC_PACKAGE_VERSION visibility slightly changed in autoconf-2.69c. Bug or feature?, Sergei Trofimovich, 2020/10/21
- Re: AC_PACKAGE_VERSION visibility slightly changed in autoconf-2.69c. Bug or feature?, Paul Eggert, 2020/10/21
- Re: AC_PACKAGE_VERSION visibility slightly changed in autoconf-2.69c. Bug or feature?, Zack Weinberg, 2020/10/22
- Re: AC_PACKAGE_VERSION visibility slightly changed in autoconf-2.69c. Bug or feature?, Nick Bowler, 2020/10/22
- Re: AC_PACKAGE_VERSION visibility slightly changed in autoconf-2.69c. Bug or feature?, Zack Weinberg, 2020/10/22
- Re: AC_PACKAGE_VERSION visibility slightly changed in autoconf-2.69c. Bug or feature?,
Nick Bowler <=
- Re: AC_PACKAGE_VERSION visibility slightly changed in autoconf-2.69c. Bug or feature?, Nick Bowler, 2020/10/22
- Re: AC_PACKAGE_VERSION visibility slightly changed in autoconf-2.69c. Bug or feature?, Zack Weinberg, 2020/10/22
- Re: AC_PACKAGE_VERSION visibility slightly changed in autoconf-2.69c. Bug or feature?, Nick Bowler, 2020/10/22
- Re: AC_PACKAGE_VERSION visibility slightly changed in autoconf-2.69c. Bug or feature?, Paul Eggert, 2020/10/22