[MPlayer-dev-eng] [PATCH] clean up tests in configure

Diego Biurrun diego at biurrun.de
Thu Jun 30 19:08:54 CEST 2005


On Thu, Jun 30, 2005 at 12:44:13PM -0400, Rich Felker wrote:
> On Thu, Jun 30, 2005 at 02:45:44PM +0300, Ivan Kalvachev wrote:
> > On 6/30/05, Diego Biurrun <diego at biurrun.de> wrote:
> > > On Fri, Jun 10, 2005 at 12:28:22AM -0700, Corey Hickey wrote:
> > > > I recently came upon this:
> > > >
> > > > [ "$cc_vendor" = "gnu" ] && ([ "$_cc_major" -gt 3 ] || ( [ "$_cc_major"
> > > > = 3 ] && [ "$_cc_minor" -ge 4 ]))
> > > >
> > > > ...over which I prefer:
> > > >
> > > > test "$cc_vendor" = "gnu" && test "$_cc_major" -gt 3 -o "$_cc_major" -eq
> > > > 3 -a "$_cc_minor" -ge 4
> > > >
> > > > ...but I foolishly decided to make a more substantial patch than a
> > > > one-line change. I found 44 tests in configure that I could clean up
> > > > slightly.
> > > 
> > > I'm tempted to apply this, object quickly or live with the consequences
> > > ;)
> > 
> > Well, as somebody else should have said this new syntax may be faster,
> > consuming less memory but it is more hackinsh and hard to understand
> > and modify (easier to make mistakes).
> > 
> > But if we should choose to have faster configure and to have easy to
> > read&modify configure I choose the second.
> 
> I choose the former. :) It's already too damn slow like autosh*t...

I don't agree in principle but I don't see how -a/-o is less readable than
&&/||.  It's shorter and faster so it should be preferred.

Diego




More information about the MPlayer-dev-eng mailing list