Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Gerwitz <mike.gerwitz@ryansg.com>2020-03-03 11:29:37 -0500
committerMike Gerwitz <mike.gerwitz@ryansg.com>2020-03-03 11:32:49 -0500
commit777494a6026e6eabff9ca9f05f00aa92e2f58c3d (patch)
tree1a71897b93da29feb2113896d60ce84b8e485796 /tamer/configure.ac
parente1076ce3880f5533cad311543f551a50be58c53e (diff)
parent6ac764108768e85db597c478ef7a754be416076b (diff)
downloadtame-777494a6026e6eabff9ca9f05f00aa92e2f58c3d.tar.gz
tame-777494a6026e6eabff9ca9f05f00aa92e2f58c3d.tar.bz2
tame-777494a6026e6eabff9ca9f05f00aa92e2f58c3d.zip
TAMER linker (still partly proof-of-concept)
We will continue to finalize this as we go. It is currently used in production, both for performance and because it fixes a bug in the XSLT-based linker.
Diffstat (limited to 'tamer/configure.ac')
-rw-r--r--tamer/configure.ac43
1 files changed, 41 insertions, 2 deletions
diff --git a/tamer/configure.ac b/tamer/configure.ac
index 9ed3526..06a30fe 100644
--- a/tamer/configure.ac
+++ b/tamer/configure.ac
@@ -43,18 +43,57 @@ AC_CHECK_PROGS(CARGO, [cargo])
test -n "$CARGO" || AC_MSG_ERROR([cargo not found])
-rustc_ver_req=1.39.0
+rustc_ver_req=1.41.0
AC_CHECK_PROGS(RUSTC, [rustc])
AC_MSG_CHECKING([rustc version >= $rustc_ver_req])
rustc_version=$("$RUSTC" --version | cut -d' ' -f2)
AX_COMPARE_VERSION([$rustc_version], [ge], [$rustc_ver_req],
[AC_MSG_RESULT([yes ($rustc_version)])],
- [AC_MSG_ERROR([no ($rustc_version)])])
+ [AC_MSG_RESULT([no ($rustc_version)])
+ AC_MSG_ERROR([If using rustup, run `rustup update'])])
AC_ARG_VAR([CARGO_BUILD_FLAGS],
[Flags to be passed to `cargo build' when invoked via Make])
+# The `intra_rustdoc_links` feature is required for building
+# documentation. If unavailable, then it's still an unstable feature and
+# we'll need to use nightly. We don't check for nightly here, though---if
+# it's missing, then cargo will tell the user what to do.
+AC_MSG_CHECKING([`intra_rustdoc_links_check` feature support])
+AS_IF(["$RUSTC" --crate-type lib build_aux/intra_rustdoc_links_check.rs &>/dev/null],
+ [AC_MSG_RESULT(available)],
+ [AC_MSG_RESULT([no (nightly required)])
+ AC_SUBST([CARGO_DOC_FLAGS], [+nightly])])
+
+# The `test` feature is required for benchmarking. If unavailable, then
+# it's still an unstable feature and we'll need to use nightly. We don't
+# check for nightly here, though---if it's missing, then cargo will tell the
+# user what to do.
+AC_MSG_CHECKING([`test` feature support])
+AS_IF(["$RUSTC" --crate-type lib build_aux/bench_check.rs &>/dev/null],
+ [AC_MSG_RESULT(available)],
+ [AC_MSG_RESULT([no (nightly required)])
+ AC_SUBST([CARGO_BENCH_FLAGS], [+nightly])])
+
+# Cargo commands may be available but not necessarily installed for the
+# active toolchain. Let's check that.
+AC_MSG_CHECKING([whether cargo-fmt is available for active toolchain])
+AS_IF([cargo fmt --help &>/dev/null],
+ [AC_MSG_RESULT(yes)],
+ [AC_MSG_RESULT(no)
+ cargo fmt --help # run again so user can see output
+ AC_MSG_ERROR([missing cargo-fmt for active toolchain])])
+
+# Cargo commands may be available but not necessarily installed for the
+# active toolchain. Let's check that.
+AC_MSG_CHECKING([whether cargo-doc is available for toolchain])
+AS_IF([cargo $CARGO_DOC_FLAGS doc --help &>/dev/null],
+ [AC_MSG_RESULT(yes)],
+ [AC_MSG_RESULT(no)
+ cargo $CARGO_DOC_FLAGS doc --help # run again so user can see output
+ AC_MSG_ERROR([missing cargo-doc for toolchain])])
+
AC_CONFIG_FILES([Makefile])
AC_OUTPUT