[Top][All Lists]

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

Re: Fix for the Cat in the Hat (test 24)

From: Pavel Roskin
Subject: Re: Fix for the Cat in the Hat (test 24)
Date: Sat, 3 Feb 2001 12:56:38 -0500 (EST)

On 3 Feb 2001, Akim Demaille wrote:

> Pavel Roskin <address@hidden> writes:
> > Hello!
> >
> > I believe, it's Ok to require that the commands in multiline
> > AC_TRY_COMMAND are separated by semicolons. If we agree on that, BUGS and
> > autoconf.texi will require some modifications.
> Are you saying it never worked?  Then fine!  I must confess there is
> some sh syntax I'm missing here.

I mean, you write

echo a
echo b >&2

and expect them to work as separate commands, but you write

echo a
| grep a

(note pipe on the second line) and expect them to work as one pipeline,
i.e. the shell must read the second line before executing the first one.

In fact, the argument to AC_TRY_COMMAND is flattened by the shell. That's
why the semicolons are needed. We may want to fix AC_TRY_COMMAND to
interpret the multiline shell code as a shell would do it, but it would be

In fact, I'm not 100% sure that all shells will work with the current
implementation of AC_TRY_COMMAND. We may need to flatten the command by
m4. That's why it's wiser to require the shell code to be safe against

> Sure, install!

Too late :-)

Pavel Roskin

reply via email to

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