aboutsummaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>2024-04-08 18:33:38 +0200
committerThomas Schwinge <tschwinge@baylibre.com>2024-04-15 13:03:35 +0200
commit3e1e73fc99584440e5967577f2049573eeaf4596 (patch)
tree93d83541e76e625f388ad305c7c7c77dee82499e /config
parente3fda76af4f342ad1ba8bd901a72d811e8357e99 (diff)
downloadgcc-3e1e73fc99584440e5967577f2049573eeaf4596.zip
gcc-3e1e73fc99584440e5967577f2049573eeaf4596.tar.gz
gcc-3e1e73fc99584440e5967577f2049573eeaf4596.tar.bz2
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 <pierre-emmanuel.patry@embecosm.com>
Diffstat (limited to 'config')
-rw-r--r--config/acx.m411
1 files changed, 11 insertions, 0 deletions
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])