summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorSebastian Hahn <sebastian@torproject.org>2017-05-02 06:46:41 +0200
committerNick Mathewson <nickm@torproject.org>2017-05-19 08:47:11 -0400
commitaeba64efad02e596dc3f15832d4bb96184c366a3 (patch)
tree4e814f5c75607ec2affc4b2777c5dddc20bb46ac /configure.ac
parentd6f9a4f11acdfc8efea19a1644f355cdb90bfbb5 (diff)
downloadtor-aeba64efad02e596dc3f15832d4bb96184c366a3.tar.gz
tor-aeba64efad02e596dc3f15832d4bb96184c366a3.zip
Detect rustc version
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac11
1 files changed, 11 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 1a780d3c3b..c5d3d44514 100644
--- a/configure.ac
+++ b/configure.ac
@@ -275,6 +275,17 @@ if test "x$enable_rust" = "xyes"; then
CARGO_ONLINE=--frozen
fi
AC_SUBST(CARGO_ONLINE)
+
+dnl Let's check the rustc version, too
+ AC_MSG_CHECKING([rust version])
+ RUSTC_VERSION_MAJOR=`$RUSTC --version | cut -d ' ' -f 2 | cut -d '.' -f 1`
+ RUSTC_VERSION_MINOR=`$RUSTC --version | cut -d ' ' -f 2 | cut -d '.' -f 2`
+ if test "x$RUSTC_VERSION_MAJOR" = "x" -o "x$RUSTC_VERSION_MINOR" = "x"; then
+ AC_MSG_ERROR([rustc version couldn't be identified])
+ fi
+ if test "$RUSTC_VERSION_MAJOR" -lt 2 -a "$RUSTC_VERSION_MINOR" -lt 14; then
+ AC_MSG_ERROR([rustc must be at least version 1.14])
+ fi
fi
ifdef([AC_C_FLEXIBLE_ARRAY_MEMBER], [