Skip to content

Instantly share code, notes, and snippets.

@danielgustafsson
Created May 2, 2016 07:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danielgustafsson/e24b097a483825cdbfee0de78e0cab2b to your computer and use it in GitHub Desktop.
Save danielgustafsson/e24b097a483825cdbfee0de78e0cab2b to your computer and use it in GitHub Desktop.
diff --git a/config/programs.m4 b/config/programs.m4
index 358e4e9..8ccae8c 100644
--- a/config/programs.m4
+++ b/config/programs.m4
@@ -69,7 +69,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/[^0-9]/ /g'] | $AWK '{ if ([$]1 = 2 && [$]2 = 5 && [$]3 >= 4) exit 0; else exit 1;}'
+ if echo "$pgac_flex_version" | sed ['s/[.a-z]/ /g'] | $AWK '{ if ([$]1 == 2 && ([$]2 > 5 || ([$]2 == 5 && [$]3 >= 4))) exit 0; else exit 1;}'
then
pgac_cv_path_flex=$pgac_candidate
break 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment