[Top][All Lists]

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

Re: Last configure args

From: Ralf Wildenhues
Subject: Re: Last configure args
Date: Thu, 26 May 2005 01:26:59 +0200
User-agent: Mutt/1.5.9i

Hi Paul,

Thanks for the review.

* Paul Eggert wrote on Fri, May 20, 2005 at 09:18:46PM CEST:
> Ralf Wildenhues <address@hidden> writes:
> > +eval `./config.status --config`
> > +./config.status --recheck && ./config.status
> This doesn't look right to me.  Shouldn't the argument to eval be
> quoted?  E.g., 
>   eval "`./config.status --config`"
> Otherwise, if the output of config.status contains (say) a "*", it
> might get expanded.  (However, perhaps I'm wrong: please see below.)

Yes, that is correct.  Quoting does not work with the next intended use,
however (I suppose that is what you hinted at as well, just mention it
for completeness):

> > +set x `./config.status --config`
> > +shift; shift
> > +./configure "$@@" CFLAGS='-g'
> Hmm, this won't work in general if the output contains "*".
> Perhaps it would be better to leave the documentation alone and
> fix the code, as follows:
> > +ac_cs_configure="$[0]"
> > +ac_cs_config="`echo "$ac_configure_args" | sed 's/[[\\""\`\$]]/\\\\&/g'`"
> Quote all shell metacharacters, not just \"\$.  Hmm, but how will you
> handle newlines?

Hmm.  OK, there is more than one problem here.

Let's first get the common ground straight:  config.status does not work
with newlines (in substitutions) at all without Dan Manthey's patch[1].
Were you thinking of this?  It does not work with newlines in #define's

Second, (even with that patch), backslashes are mistreated, even without
my patch, iff `echo' interprets backslashes.

cat > <<EOF
AC_INIT(a, 1, b)
echo @FOO@ >
CONFIG_SHELL=/bin/ash /bin/ash ./configure FOO='\ \\'
cat foo
\ \
./configure FOO='\ \\'
cat foo
\ \\

This failure happens already in _AC_INIT_PARSE_ARGS.

Depending on whether that is/should be fixed, the line setting
as_cs_config above needs to be fixed as well.


[1] The latest version I found was in but
unfortunately the online archive garbles it irreparably.  For
subscribers, the message ID is
<address@hidden>.  Maybe there should be
a way to force the archive to not munge certain attachments?  I don't
know whether packing (gzip, bzip2) would prevent it, and whether it
would be acceptable on this list.

reply via email to

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