[librsvg: 1/2] gitlab#205 - configure.ac: Check the minimum version of rustc (1.20)
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 1/2] gitlab#205 - configure.ac: Check the minimum version of rustc (1.20)
- Date: Sat, 24 Feb 2018 00:03:43 +0000 (UTC)
commit c1d93ead0270f217650493805ba2fe3efb1f5b6f
Author: Federico Mena Quintero <federico gnome org>
Date: Fri Feb 23 17:54:34 2018 -0600
gitlab#205 - configure.ac: Check the minimum version of rustc (1.20)
https://gitlab.gnome.org/GNOME/librsvg/issues/205
configure.ac | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
---
diff --git a/configure.ac b/configure.ac
index 71e94ffa..15b26b2d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -78,6 +78,22 @@ AS_IF(test x$RUSTC = xno,
AC_MSG_ERROR([rustc is required. Please install the Rust toolchain from https://www.rust-lang.org/])
)
+dnl Minimum version of rustc that we support
+MINIMUM_RUST_MAJOR=1
+MINIMUM_RUST_MINOR=20
+
+rust_version=`rustc --version`
+version=`echo "$rust_version" | sed -e 's/^rustc //g'`
+major=`echo "$version" | cut -d. -f1`
+minor=`echo "$version" | cut -d. -f2`
+
+MINIMUM_RUST_MAJOR=1
+MINIMUM_RUST_MINOR=20
+
+AS_IF(test "$major" -lt "$MINIMUM_RUST_MAJOR" -o "$minor" -lt "$MINIMUM_RUST_MINOR",
+ AC_MSG_ERROR([librsvg needs at rustc version at least $MINIMUM_RUST_MAJOR.$MINIMUM_RUST_MINOR])
+)
+
dnl ===========================================================================
#AC_CANONICAL_HOST
@@ -357,7 +373,8 @@ echo "
librsvg-$VERSION
prefix: ${prefix}
- compiler: ${CC}
+ C compiler: ${CC}
+ rustc: ${rust_version}
Debugging information for Rust: ${debug_release}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]