You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ga...@apache.org on 2013/05/09 16:01:10 UTC
[13/50] git commit: updated refs/heads/route-events to c33e390
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/78bf001a
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/78bf001a
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/78bf001a
Branch: refs/heads/route-events
Commit: 78bf001a1dbab9739fea5e538e242472629c05c5
Parents: 8f1b5fa
Author: Joan Touzet <wo...@apache.org>
Authored: Wed Mar 27 17:52:27 2013 -0400
Committer: Garren Smith <ga...@gmail.com>
Committed: Thu May 9 09:59:54 2013 +0200
----------------------------------------------------------------------
configure.ac | 25 +++++++++++++++----------
1 files changed, 15 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb/blob/78bf001a/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)).' \