bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: warn-on-use.m4 bug


From: Eric Blake
Subject: Re: warn-on-use.m4 bug
Date: Tue, 23 Feb 2010 11:07:38 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666

According to Bruno Haible on 2/20/2010 7:48 PM:
> Hi Eric,
> 
> There seems to be a bug in warn-on-use.m4 when used with autoconf-2.60.
> No problem with autoconf-2.61 and newer.

Thanks for the report.

> 
> How to reproduce:
>   - Put autoconf 2.60 binaries in PATH.
>   - Use automake 1.10 or 1.9.6.
>   - $ ./gnulib-tool --create-testdir --dir=/tmp/testdir sys_stat
>   - $ cd /tmp/testdir
>   - $ ./configure

>      if test x"$$as_gl_Symbol" = x""yes; then
<====== BUG
>
> As you can see, all uses of $as_gl_Symbol are broken.

Especially nice to give a formula.  It's due to what I would describe as a
bug fix in 2.61 semantics of AS_VAR_PUSHDEF (back then, the AS_VAR_*
interfaces were undocumented).  Newer autoconf auto-dereferences the
argument given to AS_LITERAL_IF (that is, it uses enough m4 black magic to
see through quoted macro names, so that clients can follow normal
rule-of-thumb quoting), but older autoconf required that you under-quote
the argument.  In general, pre-expansion is risky if the macro contents
contain m4 metacharacters or other macro names, but in the case of
AS_VAR_*, the macro contents are safe and do not cause further expansion
issues.

If you didn't understand any of that, all you need to know is that this
patch has been tested with both autoconf 2.59 and 2.65; the resulting
configure files use proper eval statements in all cases where gl_Symbol is
used.

-- 
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden

Attachment: gnulib.patch345
Description: Text document

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]