configure: Add micro version support to check_version

This commit is contained in:
Jonathan G Rennison
2019-10-14 18:51:25 +01:00
parent 67a725e813
commit c45d963b0f

View File

@@ -2704,8 +2704,21 @@ check_version() {
got_minor=`echo $2 | cut -d. -f2` got_minor=`echo $2 | cut -d. -f2`
if [ $got_minor -lt $req_minor ]; then if [ $got_minor -lt $req_minor ]; then
return 0 return 0
fi elif [ $got_minor -gt $req_minor ]; then
return 1 return 1
fi
req_micro=`echo $1 | cut -d. -f3`
got_micro=`echo $2 | cut -d. -f3`
if [ -z "$req_micro" ]; then
return 1
elif [ -z "$got_micro" ]; then
return 0
elif [ $got_micro -lt $req_micro ]; then
return 0
else
return 1
fi
} }
detect_awk() { detect_awk() {