[MPlayer-dev-eng] [PATCH] clean up tests in configure
Guillaume POIRIER
poirierg at gmail.com
Fri Jun 10 10:04:41 CEST 2005
Hello,
On 6/10/05, Corey Hickey <bugfood-ml at fatooh.org> 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
That's just me, but I really prefer the original version, which is a
lot more readable to me.
> Most of configure uses "test ..." syntax rather than "[ ... ]", so I
> changed the latter to the former on lines I was altering anyway. I left
> the rest alone.
You're right about the fact that the configure script should idealy
use the same kind of syntax for the tests.
> I've tested this by running configure with and without the patch.
> config.mak was identical between each run. Of course, that's just on my
> system, so review by another pair of eyes would be prudent.
If the configure script already uses both syntax, I'd assume that your
version should also work everywhere... But I guess it won't hurt if it
could get some testing on *BSD systems (as AFAIK they use "C shell"
based shells), MacOSX, BeOS, and windows.
Guillaume
--
I should have invented the tape recorder,
that way people would have more quotes of
me to put at the bottom of their e-mails
-- Benjamin Franklin
More information about the MPlayer-dev-eng
mailing list