File bsc1239810_06-configure.ac-use-mpicc4-to-replace-mpicc1.patch of Package ocfs2-test
From d23b9dcfe858824adced1f391f668cd89be4b35e Mon Sep 17 00:00:00 2001
From: Heming Zhao <heming.zhao@suse.com>
Date: Mon, 24 Mar 2025 14:08:03 +0800
Subject: [PATCH] configure.ac: use mpicc4 to replace mpicc1
mpicc1 is too old to use. This commit update configure.ac to use
mpicc4 to set up $PATH.
Signed-off-by: Heming Zhao <heming.zhao@suse.com>
---
configure.ac | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 019707149edb..9cf80480c9fd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7,7 +7,14 @@ PACKAGE=ocfs2-test
AC_SUBST(PACKAGE)
-MPICC=`PATH=$PATH:/usr/lib64/mpi/gcc/openmpi/bin:/usr/lib64/mpi/gcc/openmpi1/bin which mpicc`
+if command mpicc > /dev/null 2>&1; then
+ MPICC_PATH=$(which mpicc)
+ MPICC_DIR=$(dirname "$mpicc_path")
+ export PATH="$PATH:$MPICC_DIR"
+else
+ MPICC=`PATH=$PATH:/usr/lib64/mpi/gcc/openmpi4/bin:/usr/lib64/mpi/gcc/openmpi/bin`
+fi
+
INSTALLDIR=/usr/local
# Adjust these for the software version.
MAJOR_VERSION=1
--
2.43.0