bug-autoconf
[Top][All Lists]
Advanced

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

Re: ac_vpsub quoting problem


From: Ralf Wildenhues
Subject: Re: ac_vpsub quoting problem
Date: Sat, 28 Feb 2009 18:17:25 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

Hello Bruno,

thanks for the bug report!

* Bruno Haible wrote on Sat, Feb 28, 2009 at 04:34:41PM CET:
> A config.status created for gettext-tools by autoconf 2.63 on normal Linux
> contains these lines:
> 
> ac_sed_extra="/^[      ]*VPATH[        ]*=/{
> s/:*\$(srcdir):*/:/
> s/:*\${srcdir}:*/:/
> s/:address@hidden@:*/:/
> s/^\([^=]*=[   ]*\):*/\1/
> s/:*$//
> s/^[^=]*=[     ]*$//
> }
> ...
> 
> The two lines with (srcdir) are pointless because they can never match:
> the \$ gets transformed to simple $ by the shell's transformation of
> double-quoted strings, and in the regular expression it then denotes the
> end of line.

Indeed.  Gee, this has been broken in 2.59 already!

Before I start digging when this broke, and who else this might need
(I do know that some packages like GCC have specific requirements in
this area): do you need these two lines to work?

Autoconf should have a test to expose this issue, if it still exists
with some make implementations.  Also a test to ensure $extrasub works
as expected.

> This comes from status,m4, around line 660:
> 
> cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
> ac_sed_extra="$ac_vpsub
> $extrasub
> _ACEOF
> 
> Possible fixes are:
> 
>   - Double every backslash in the definition of ac_vpsub,
> 
>   - Enclose the reference to ac_vpsub in single-quotes:
> 
> cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
> ac_sed_extra='$ac_vpsub'"
> $extrasub
> _ACEOF

Well, the extrasub likely has a similar issue (which, if its value
contains "$", is likely going to have worse effect on the outcome).

Thanks,
Ralf




reply via email to

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