From 3e1e73fc99584440e5967577f2049573eeaf4596 Mon Sep 17 00:00:00 2001 From: Pierre-Emmanuel Patry Date: Mon, 8 Apr 2024 18:33:38 +0200 Subject: build: Check for cargo when building rust language Prevent rust language from building when cargo is missing. config/ChangeLog: * acx.m4: Add a macro to check for rust components. ChangeLog: * configure: Regenerate. * configure.ac: Emit an error message when cargo is missing. Signed-off-by: Pierre-Emmanuel Patry --- config/acx.m4 | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'config') diff --git a/config/acx.m4 b/config/acx.m4 index 7efe98a..3c5fe67 100644 --- a/config/acx.m4 +++ b/config/acx.m4 @@ -424,6 +424,17 @@ else fi ]) +# Test for Rust +# We require cargo and rustc for some parts of the rust compiler. +AC_DEFUN([ACX_PROG_CARGO], +[AC_REQUIRE([AC_CHECK_TOOL_PREFIX]) +AC_CHECK_TOOL(CARGO, cargo, no) +if test "x$CARGO" != xno; then + have_cargo=yes +else + have_cargo=no +fi]) + # Test for D. AC_DEFUN([ACX_PROG_GDC], [AC_REQUIRE([AC_CHECK_TOOL_PREFIX]) -- cgit v1.1