Skip to contentSkip to conversation

configure: Fix logic for flex version check

PATCH New Shivani Bhardwaj 1 participant 1 message Jun 17, 2016 netfilter

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 configure: Fix logic for flex version check

According to the previous logic of version check for flex, anything greater than 2.5.33 but within 2.5.x was acceptable. The issue was observed when a false warning generated for flex version 2.6.0. New logic works for basically everything greater than 2.5.33.

---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
configure.ac +1 -1
index b170add..0040f0b 100644
@@ -164,7 +164,7 @@ if test "x$enable_nftables" = "xyes"; then
 	flex_minor=`echo $flex_version| cut -d . -f 2`
 	flex_rev=`echo $flex_version| cut -d . -f 3`
 
-	if test "$flex_major" -eq "2" && test "$flex_minor" -eq "5" && test "$flex_rev" -ge "33"; then
+	if (test "$flex_major" -eq "2" && test "$flex_minor" -eq "5" && test "$flex_rev" -ge "33") || (test "$flex_major" -eq "2" && test "$flex_minor" -gt "5") || test "$flex_major" -gt "2"; then
 		AC_MSG_RESULT([$flex_version. OK])
 	else
 		AC_MSG_WARN([flex version $flex_version found.
Signature · 1 line
2.7.4