From 4ce10da36ff4c29dbf2cc40ebfcbcd260b635e05 Mon Sep 17 00:00:00 2001 From: "Erlend E. Aasland" Date: Fri, 12 Apr 2024 16:33:29 +0200 Subject: gh-96398: Detect emcc and mpicc in compiler names in configure (#117819) - emcc defines __EMSCRIPTEN__ - mpicc doesn't define anything in particular; detect it using basename --- configure | 7 ++++++- configure.ac | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 65210e8..027ef83 100755 --- a/configure +++ b/configure @@ -6110,7 +6110,9 @@ then : else $as_nop cat > conftest.c <conftest.out 2>/dev/null; then ac_cv_cc_name=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '` + if $(expr "//$CC" : '.*/\(.*\)') = "mpicc"; then + ac_cv_cc_name="mpicc" + fi else ac_cv_cc_name="unknown" fi diff --git a/configure.ac b/configure.ac index ece3fe7..35b3a4e 100644 --- a/configure.ac +++ b/configure.ac @@ -992,7 +992,9 @@ dnl check for GCC last, other compilers set __GNUC__, too. dnl msvc is listed for completeness. AC_CACHE_CHECK([for CC compiler name], [ac_cv_cc_name], [ cat > conftest.c <conftest.out 2>/dev/null; then ac_cv_cc_name=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '` + if $(expr "//$CC" : '.*/\(.*\)') = "mpicc"; then + ac_cv_cc_name="mpicc" + fi else ac_cv_cc_name="unknown" fi -- cgit v0.12