[COMMITTED] Sync toplevel configure fixup

Message ID 12db6ae4452b322312ae74f06d754ede1a978b35.1732309057.git.sam@gentoo.org
State New
Headers
Series [COMMITTED] Sync toplevel configure fixup |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_binutils_build--master-arm fail Patch failed to apply
linaro-tcwg-bot/tcwg_binutils_build--master-aarch64 fail Patch failed to apply

Commit Message

Sam James Nov. 22, 2024, 8:57 p.m. UTC
  Apparently I missed that we needed to sync config/acx.m4. I only
noticed this because our packaging has a grep for certain messages
post-merge.

```
work/binutils/configure: 5814: ACX_PROG_CARGO: not found
```

Fix that by syncing the macro too, which I missed in 987db70acefd0b223a8df2240d4e5ca544cc0a91.
---
Committed as obvious. Sorry for missing that.

 config/acx.m4 | 10 ++++++++++
 configure     | 50 +++++++++++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 59 insertions(+), 1 deletion(-)


base-commit: ab8c2180a3de1461f361c75c420e4d37ac709e0b
  

Patch

diff --git a/config/acx.m4 b/config/acx.m4
index 69f4bfa4d76..db54ccf1c7c 100644
--- a/config/acx.m4
+++ b/config/acx.m4
@@ -424,6 +424,16 @@  else
 fi
 ])
 
+# Test for Rust
+# We require cargo and rustc for some parts of the rust compiler.
+AC_DEFUN([ACX_PROG_CARGO],
+[AC_CHECK_PROGS(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])
diff --git a/configure b/configure
index bdff1f559a4..d6b4ea5094a 100755
--- a/configure
+++ b/configure
@@ -716,6 +716,7 @@  PGO_BUILD_GEN_CFLAGS
 HAVE_CXX14_FOR_BUILD
 HAVE_CXX14
 do_compare
+CARGO
 GDC
 GNATMAKE
 GNATBIND
@@ -5811,7 +5812,54 @@  else
   have_gdc=no
 fi
 
-ACX_PROG_CARGO
+for ac_prog in cargo
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CARGO+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CARGO"; then
+  ac_cv_prog_CARGO="$CARGO" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CARGO="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CARGO=$ac_cv_prog_CARGO
+if test -n "$CARGO"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CARGO" >&5
+$as_echo "$CARGO" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$CARGO" && break
+done
+test -n "$CARGO" || CARGO="no"
+
+if test "x$CARGO" != xno; then
+  have_cargo=yes
+else
+  have_cargo=no
+fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to compare bootstrapped objects" >&5
 $as_echo_n "checking how to compare bootstrapped objects... " >&6; }
 if ${gcc_cv_prog_cmp_skip+:} false; then :