From fe941f71852edb089033770112db2b2997d9b5a2 Mon Sep 17 00:00:00 2001 From: Jonathan Moore Liles Date: Sun, 8 Jun 2008 17:44:25 -0500 Subject: [PATCH] configure: Pull version test fix from Non-Sequencer. --- scripts/config-funcs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/config-funcs b/scripts/config-funcs index d000533..07c4586 100644 --- a/scripts/config-funcs +++ b/scripts/config-funcs @@ -265,20 +265,20 @@ require_package () _test_version () { - [ $1 $4 $5 ] && [ $2 $4 $6 ] && [ $3 $4 $7 ] + [ $1 -gt $4 ] && return 0 + [ $1 -eq $4 ] && [ $2 -gt $5 ] && return 0 + [ $1 -eq $4 ] && [ $2 -eq $5 ] && [ $3 -gt $6 ] && return 0 + [ $1 -eq $4 ] && [ $2 -eq $5 ] && [ $3 -eq $6 ] && return 0 + return 1 } +# return true if #1 is greater than or equal to $2 test_version () { local IFS IFS='.' - if [ $2 != -ge ] && [ $2 != -le ] - then - fatal "Syntax error" - fi - - _test_version $1 $2 $3 + _test_version $1 $2 } version_of () @@ -294,7 +294,7 @@ require_FLTK () FLTK_VERSION=`fltk-config --version` - if ! test_version $FLTK_VERSION -ge $1 + if ! test_version $FLTK_VERSION $1 then failed fatal "The installed FLTK version ($FLTK_VERSION) is too old."