Accept flex > 2.5.x in configure.
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 18 Nov 2015 22:45:05 +0000 (17:45 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 18 Nov 2015 22:45:05 +0000 (17:45 -0500)
Per buildfarm member anchovy, 2.6.0 exists in the wild now.
Hopefully it works with Postgres; if not, we'll have to do something
about that, but in any case claiming it's "too old" is pretty silly.

config/programs.m4
configure

index 7ac948d4fd36324b050c2c9bc2faa5309d4d9e75..87f63b6d10c0ac7322c7bc26ead14ab1e3e663af 100644 (file)
@@ -77,7 +77,7 @@ else
         echo '%%'  > conftest.l
         if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
           pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
-          if echo "$pgac_flex_version" | sed ['s/[.a-z]/ /g'] | $AWK '{ if ([$]1 = 2 && [$]2 = 5 && [$]3 >= 31) exit 0; else exit 1;}'
+          if echo "$pgac_flex_version" | sed ['s/[.a-z]/ /g'] | $AWK '{ if ([$]1 = 2 && ([$]2 > 5 || ([$]2 = 5 && [$]3 >= 31))) exit 0; else exit 1;}'
           then
             pgac_cv_path_flex=$pgac_candidate
             break 2
index b771a8355597e4bbbeeb92ef456263cb3d007589..8c61390ca778dbbce56cd60198beb3f6982efbb0 100755 (executable)
--- a/configure
+++ b/configure
@@ -7272,7 +7272,7 @@ else
         echo '%%'  > conftest.l
         if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
           pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
-          if echo "$pgac_flex_version" | sed 's/[.a-z]/ /g' | $AWK '{ if ($1 = 2 && $2 = 5 && $3 >= 31) exit 0; else exit 1;}'
+          if echo "$pgac_flex_version" | sed 's/[.a-z]/ /g' | $AWK '{ if ($1 = 2 && ($2 > 5 || ($2 = 5 && $3 >= 31))) exit 0; else exit 1;}'
           then
             pgac_cv_path_flex=$pgac_candidate
             break 2