Permalink
Browse files

correct Erlang version checking

git-svn-id: https://svn.apache.org/repos/asf/incubator/couchdb/trunk@662528 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
1 parent 7e897a2 commit ec24327a4892c115e5941ec93f9dcc01e9050fd2 @nslater nslater committed Jun 2, 2008
Showing with 10 additions and 2 deletions.
  1. +10 −2 configure.ac
View
@@ -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])

0 comments on commit ec24327

Please sign in to comment.