[MPlayer-users] [PATCH] ./configure syntax error

Cameron Hutchison camh+mp at xdna.net
Sat Jan 4 02:23:29 CET 2003


Once upon a time D Richard Felker III said...
> On Fri, Jan 03, 2003 at 11:22:58PM +1100, Cameron Hutchison wrote:
> > Once upon a time Steven M. Schultz said...
> > > 
> > > > > -if x86 && ! cygwin; then
> > > > > +if test x86 -a ! cygwin; then
> > > > 
> > > > I don't think so. x86 and cygwin are function calls, not variables.
> > > 
> > > 	Right.  And the shell will evaluate them as function calls _before_
> > > 	invoking 'test' - won't it?
> > 
> > No. They're just arguments to 'test'. The shell will just pass them as
> > strings.
> 
> I don't think so; that's total nonsense. If that were the case you'd
> be running test on a constant string which would always evaluate to
> true!!

No. Read it more carefully. In one case, there is:

if <command1> && ! <command2> ; then

In the other it is

if test <string1> -a ! <string2> ; then

In this second case, the only command executed is test(1). In the first
case, both <commands> are executed.

The fact that <command1> == <string1> and <command2> == <string2> does
not mean they will be executed when in a string/argument context.

> > if x86 ; then if cygwin ; then : ; else <stuff goes here> ; fi ; fi
> 
> This should work, but it contradicts what you said before. 

Not at all. I'm not using test(1). There is no contradiction.

> Also silly to have two ifs. Use if x86 && cygwin ; then : ...

I think you need to draw up some truth tables. Your form is not
equivalent to mine. Your code will be executed if x86 evaulates to
false.



More information about the MPlayer-users mailing list