From: Jason Ish Date: Tue, 27 Aug 2019 16:15:14 +0000 (-0600) Subject: rust: check for minimum Rust version of 1.33.0. X-Git-Tag: suricata-5.0.0-rc1~109 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c9d569f410d4c187bc334bd31637d6c2b1f03ccc;p=thirdparty%2Fsuricata.git rust: check for minimum Rust version of 1.33.0. Related Redmine ticket: https://redmine.openinfosecfoundation.org/issues/2629 --- diff --git a/configure.ac b/configure.ac index b087c4e042..61253e2e10 100644 --- a/configure.ac +++ b/configure.ac @@ -2379,12 +2379,26 @@ fi enable_rust="yes" rust_compiler_version=$($RUSTC --version) + rustc_version=$(echo "$rust_compiler_version" | sed 's/^.*[[^0-9]]\([[0-9]]*\.[[0-9]]*\.[[0-9]]*\).*$/\1/') rust_cargo_version=$($CARGO --version) + MIN_RUSTC_VERSION="1.33.0" + AC_MSG_CHECKING(for Rust version $MIN_RUSTC_VERSION or newer) + AS_VERSION_COMPARE([$rustc_version], [$MIN_RUSTC_VERSION], + [ + echo "" + echo "ERROR: Rust $MIN_RUSTC_VERSION or newer required." + echo "" + echo "Rust version ${rustc_version} was found." + echo "" + exit 1 + ], + [], + []) + AC_MSG_RESULT(yes) + rust_vendor_comment="# " have_rust_vendor="no" - rust_compiler_version="not set" - rust_cargo_version="not set" # We may require Python if the Rust header stubs are not already # generated. @@ -2416,9 +2430,6 @@ fi rust_vendor_comment="" fi - rust_compiler_version=$(rustc --version) - rust_cargo_version=$(cargo --version) - AC_SUBST(rust_vendor_comment) AM_CONDITIONAL([HAVE_RUST_VENDOR], [test "x$have_rust_vendor" = "xyes"]) @@ -2600,8 +2611,10 @@ SURICATA_BUILD_CONF="Suricata Configuration: Rust support: ${enable_rust} Rust strict mode: ${enable_rust_strict} - Rust compiler: ${rust_compiler_version} - Rust cargo: ${rust_cargo_version} + Rust compiler path: ${RUSTC} + Rust compiler version: ${rust_compiler_version} + Cargo path: ${CARGO} + Cargo version: ${rust_cargo_version} Python support: ${enable_python} Python path: ${python_path}