[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: RFC: Changing AC_DEFINE
From: |
Alexandre Oliva |
Subject: |
Re: RFC: Changing AC_DEFINE |
Date: |
17 Jun 2001 19:11:05 -0300 |
User-agent: |
Gnus/5.090003 (Oort Gnus v0.03) XEmacs/21.4 (Academic Rigor) |
On Jun 9, 2001, "Tim Van Holder" <address@hidden> wrote:
Alexandre> IMO, the best way to go is for autoconf to come up with a
Alexandre> safe echo, i.e., one that won't mess up any characters,
Alexandre> will preserve backslashes, etc, in a similar way that
Alexandre> libtool does. In fact, this would help libtool a lot as we
Alexandre> move more of it into m4sh.
>> > Well, why not!
>> Err... Because someone has to do it? :-)
> Well, an easy situation would be if the shell is bash; it's builtin echo
> has a -E option to do just that (i.e. not expand anything). I had to
> use that option in a few changes I made for the DJGPP package, as
> autoconf would otherwise seriously mess up DOS-style paths.
> Not sure if other incarnations of echo are so friendly as to provide
> such a option though.
I'm afraid not even -E is a complete solution. Try, for example:
echo -E -e '\a'
and note that `-e' isn't echoed, and you get a beep, not a literal
`\a'.
That's why libtool always uses:
$echo "X$whatever" | $Xsed
where Xsed is:
sed -e '1s/^X//'
But this is another problem of portable echoing. It's amazing that
something as simple as plain echoing can't be done easily :-(
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer address@hidden, redhat.com}
CS PhD student at IC-Unicamp address@hidden, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me