Bug 1167222 - don't warn about out-of-date rustc when --enable-rust is not specified, r=ted-self-review-because-gps-said-so
--- a/configure.in
+++ b/configure.in
@@ -426,17 +426,17 @@ MOZ_ARG_ENABLE_BOOL([rust],
[ --enable-rust Include rust language sources],
[MOZ_RUST=1],
[MOZ_RUST= ])
if test -z "$RUSTC" -a -n "$MOZ_RUST"; then
AC_MSG_ERROR([Rust compiler not found.
To compile rust language sources, you must have 'rustc' in your path.
See http://www.rust-lang.org/ for more information.])
fi
-if test -n "$MOZ_RUST" -a -z "$_RUSTC_MAJOR_VERSION" -o \
+if test -n "$MOZ_RUST" && test -z "$_RUSTC_MAJOR_VERSION" -o \
"$_RUSTC_MAJOR_VERSION" -lt 1; then
AC_MSG_ERROR([Rust compiler ${RUSTC_VERSION} is too old.
To compile rust language sources please install at least
version 1.0 of the 'rustc' toolchain and make sure it is
first in your path.
You can verify this by typing 'rustc --version'.])
fi
AC_SUBST(MOZ_RUST)