From ec24327a4892c115e5941ec93f9dcc01e9050fd2 Mon Sep 17 00:00:00 2001 From: Noah Slater Date: Mon, 2 Jun 2008 19:29:19 +0000 Subject: correct Erlang version checking git-svn-id: https://svn.apache.org/repos/asf/incubator/couchdb/trunk@662528 13f79535-47bb-0310-9956-ffa450edef68 --- configure.ac | 12 ++++++++++-- 1 file 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]) -- cgit v1.2.3