summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac12
1 files changed, 10 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 2bf9e5a8..1a853635 100644
--- a/configure.ac
+++ b/configure.ac
@@ -104,8 +104,16 @@ if test x${ERL} = x; then
AC_MSG_ERROR([Could not find the `erl' executable. Is Erlang installed?])
fi
-if test $(${ERL} -version 2>&1 | sed "s/[[^0-9]]//g") -le 550; then
- AC_MSG_ERROR([The installed Erlang version is less than 5.5.0 (R11B).])
+erlang_version_error="The installed Erlang version is less than 5.5.0 (R11B)."
+
+version=$(${ERL} -version 2>&1 | ${SED} "s/[[^0-9]]/ /g")
+
+if test $(echo $version | ${AWK} "{print \$1}") -lt 5; then
+ AC_MSG_ERROR([$erlang_version_error])
+fi
+
+if test $(echo $version | ${AWK} "{print \$2}") -lt 5; then
+ AC_MSG_ERROR([$erlang_version_error])
fi
AC_PATH_PROG([ERLC], [erlc])