diff options
author | Isis Lovecruft <isis@torproject.org> | 2017-12-13 02:20:14 +0000 |
---|---|---|
committer | Isis Lovecruft <isis@torproject.org> | 2017-12-13 02:27:02 +0000 |
commit | c7dc65e033a63c6ba4d4f8e195265cb845f8e05f (patch) | |
tree | 50eb92524ff07eb8af7d2685217ca5315cc34e28 /configure.ac | |
parent | 426110dfa2e27f134e7bf44341e5df6f454e49a3 (diff) | |
download | tor-c7dc65e033a63c6ba4d4f8e195265cb845f8e05f.tar.gz tor-c7dc65e033a63c6ba4d4f8e195265cb845f8e05f.zip |
build: Add pretty printing of results of rust autoconf checks.
* ADDS several `AC_MSG_RESULT`s which print the result of our checks
for our rust dependencies and a check for a suitable rustc compiler
version.
* FIXES #24612: https://bugs.torproject.org/24612
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 4a6dc80a90..e471f8f914 100644 --- a/configure.ac +++ b/configure.ac @@ -439,16 +439,21 @@ if test "x$enable_rust" = "xyes"; then fi if test ! -d "$TOR_RUST_DEPENDENCIES"; then AC_MSG_ERROR([Rust dependency directory $TOR_RUST_DEPENDENCIES does not exist. Specify a dependency directory using the TOR_RUST_DEPENDENCIES variable or allow cargo to fetch crates using --enable-cargo-online-mode.]) + ERRORED=1 fi for dep in $rust_crates; do if test ! -d "$TOR_RUST_DEPENDENCIES"/"$dep"; then AC_MSG_ERROR([Failure to find rust dependency $TOR_RUST_DEPENDENCIES/$dep. Specify a dependency directory using the TOR_RUST_DEPENDENCIES variable or allow cargo to fetch crates using --enable-cargo-online-mode.]) + ERRORED=1 fi done if test "x$NEED_MOD" = "x1"; then dnl When looking for dependencies from cargo, pick right directory TOR_RUST_DEPENDENCIES="../../src/ext/rust" fi + if test "x$ERRORED" = "x"; then + AC_MSG_RESULT([yes]) + fi fi dnl For now both MSVC and MinGW rust libraries will output static libs with @@ -465,6 +470,7 @@ if test "x$enable_rust" = "xyes"; then dnl Let's check the rustc version, too AC_MSG_CHECKING([rust version]) + RUSTC_VERSION=`$RUSTC --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 @@ -473,6 +479,7 @@ if test "x$enable_rust" = "xyes"; then 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 + AC_MSG_RESULT([$RUSTC_VERSION]) fi AC_SEARCH_LIBS(socket, [socket network]) |