mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
do lexical comparison on version parts
Original commit message from CVS: do lexical comparison on version parts
This commit is contained in:
parent
d5564a0557
commit
8e99797103
1 changed files with 10 additions and 11 deletions
21
autogen.sh
21
autogen.sh
|
@ -27,6 +27,7 @@ version_check ()
|
||||||
MINOR=$4
|
MINOR=$4
|
||||||
MICRO=$5
|
MICRO=$5
|
||||||
|
|
||||||
|
|
||||||
debug "major $MAJOR minor $MINOR micro $MICRO"
|
debug "major $MAJOR minor $MINOR micro $MICRO"
|
||||||
VERSION=$MAJOR
|
VERSION=$MAJOR
|
||||||
if test ! -z $MINOR; then VERSION=$VERSION.$MINOR; else MINOR=0; fi
|
if test ! -z $MINOR; then VERSION=$VERSION.$MINOR; else MINOR=0; fi
|
||||||
|
@ -53,25 +54,23 @@ version_check ()
|
||||||
|
|
||||||
debug "found major $pkg_major minor $pkg_minor micro $pkg_micro"
|
debug "found major $pkg_major minor $pkg_minor micro $pkg_micro"
|
||||||
|
|
||||||
#if test -z "$pkg_micro"; then
|
|
||||||
# pkg_micro=0
|
|
||||||
#fi
|
|
||||||
|
|
||||||
#start checking the version
|
#start checking the version
|
||||||
debug echo "version check"
|
debug "version check"
|
||||||
if [ $pkg_major -le $MAJOR ]; then
|
|
||||||
if [ $pkg_major -lt $MAJOR ]; then
|
if [ "$pkg_major" \< "$MAJOR -o "$pkg_major" = $MAJOR" ]; then
|
||||||
|
debug "$pkg_major <= $MAJOR"
|
||||||
|
if [ "$pkg_major" \< "$MAJOR" ]; then
|
||||||
WRONG=1
|
WRONG=1
|
||||||
elif [ $pkg_minor -le $MINOR ]; then
|
elif [ "$pkg_minor" \< "$MINOR -o $pkg_minor = $MINOR" ]; then
|
||||||
if [ $pkg_minor -lt $MINOR ]; then
|
if [ "$pkg_minor" \< "$MINOR" ]; then
|
||||||
WRONG=1
|
WRONG=1
|
||||||
elif [ $pkg_micro -lt $MICRO ]; then
|
elif [ "$pkg_micro" \< "$MICRO" ]; then
|
||||||
WRONG=1
|
WRONG=1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$WRONG" = 1; then
|
if test ! -z $WRONG; then
|
||||||
echo
|
echo
|
||||||
echo "You must have $PACKAGE $VERSION or greater to compile $package."
|
echo "You must have $PACKAGE $VERSION or greater to compile $package."
|
||||||
echo "Get the latest version from $URL"
|
echo "Get the latest version from $URL"
|
||||||
|
|
Loading…
Reference in a new issue