Check for flex version properly in autogen.sh.
authorAndrej Kacian <ticho@claws-mail.org>
Tue, 1 Dec 2015 17:50:29 +0000 (18:50 +0100)
committerAndrej Kacian <ticho@claws-mail.org>
Tue, 1 Dec 2015 17:50:29 +0000 (18:50 +0100)
autogen.sh

index 0b8ff3c..093adb3 100755 (executable)
@@ -24,7 +24,13 @@ else
        flex_major=`echo $flexver|sed "s/\..*//"`
        flex_minor=`echo $flexver|sed "s/$flex_major\.\(.*\)\..*/\1/"`
        flex_micro=`echo $flexver|sed "s/$flex_major\.$flex_minor\.\(.*\)/\1/"`
-       if [ $flex_major -lt 2 -o $flex_minor -lt 5 -o $flex_micro -lt 31 ]; then
+
+       flex_numversion=$(expr \
+               $flex_major \* 10000 + \
+               $flex_minor \* 100 + \
+               $flex_micro)
+
+       if [ $flex_numversion -lt 20531 ]; then
                echo Flex 2.5.31 or greater is needed to compile Claws Mail git
                exit 1
        fi