couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From woh...@apache.org
Subject git commit: updated refs/heads/1.3.x to f1472df
Date Wed, 27 Mar 2013 22:33:42 GMT
Updated Branches:
  refs/heads/1.3.x 86fe2a3fb -> f1472dfc1


Add upper bound check on Erlang (<R16A)

Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/f1472dfc
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/f1472dfc
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/f1472dfc

Branch: refs/heads/1.3.x
Commit: f1472dfc122a83086399ba1b88f21feb170dde60
Parents: 86fe2a3
Author: Joan Touzet <wohali@apache.org>
Authored: Wed Mar 27 17:52:27 2013 -0400
Committer: Joan Touzet <wohali@apache.org>
Committed: Wed Mar 27 18:33:12 2013 -0400

----------------------------------------------------------------------
 configure.ac |   25 +++++++++++++++----------
 1 files changed, 15 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/f1472dfc/configure.ac
----------------------------------------------------------------------
diff --git a/configure.ac b/configure.ac
index 91e2d3d..53e23f1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -407,24 +407,29 @@ case "$(uname -s)" in
 esac
 
 
-erlang_version_error="The installed Erlang version is less than 5.7.4 (R13B04)."
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Erlang version compatibility" >&5
+$as_echo_n "checking Erlang version compatibility... " >&6; }
+erlang_version_error="The installed Erlang version must be >= R13B04 (erts-5.7.4) and
< R16A (erts-5.10)"
 
-version="`${ERL} -version 2>&1 | ${SED} 's/[[^0-9]]/ /g'`"
+version="`${ERL} -version 2>&1 | ${SED} 's/[[^0-9]]/ /g'` 0 0 0"
+major_version=`echo $version | ${AWK} "{print \\$1}"`
+minor_version=`echo $version | ${AWK} "{print \\$2}"`
+patch_version=`echo $version | ${AWK} "{print \\$3}"`
 
-if test `echo $version | ${AWK} "{print \\$1}"` -lt 5; then
-    AC_MSG_ERROR([$erlang_version_error])
+if test $major_version -ne 5; then
+    as_fn_error $? "$erlang_version_error" "$LINENO" 5
 fi
 
-if test `echo $version | ${AWK} "{print \\$2}"` -lt 7; then
-    AC_MSG_ERROR([$erlang_version_error])
+if test $minor_version -lt 7 -o $minor_version -gt 9; then
+    as_fn_error $? "$erlang_version_error" "$LINENO" 5
 fi
 
-if test `echo $version | ${AWK} "{print \\$2}"` -eq 7; then
-    if test `echo $version | ${AWK} "{print \\$3}"` -lt 4; then
-        AC_MSG_ERROR([$erlang_version_error])
-    fi
+if test $minor_version -eq 7 -a $patch_version -lt 4; then
+    as_fn_error $? "$erlang_version_error" "$LINENO" 5
 fi
 
+AC_MSG_RESULT(compatible)
+
 otp_release="`\
     ${ERL} -noshell \
     -eval 'io:put_chars(erlang:system_info(otp_release)).' \


Mime
View raw message