From e23f6ac1cec17779959e9dd215bd85532ff4404f Mon Sep 17 00:00:00 2001
From: Christian Engwer <christi@dune-project.org>
Date: Mon, 21 Sep 2009 12:16:48 +0000
Subject: [PATCH] recognize InterMPI (kudos to Leonard Kern)

[[Imported from SVN: r5580]]
---
 m4/mpi-config.m4 | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/m4/mpi-config.m4 b/m4/mpi-config.m4
index 59d98248f..2eb171237 100644
--- a/m4/mpi-config.m4
+++ b/m4/mpi-config.m4
@@ -256,6 +256,25 @@ test_ibmmpi() {
   return 1
 }
 
+test_intelmpi() {
+  AC_MSG_CHECKING([for Intel MPI])
+  if $MPICC -v -c conftest.c > /dev/null 2>&1; then
+    mpi_getflags "-v"
+    if (echo $retval | grep 'Intel(R) MPI Library'); then
+      MPI_VERSION="Intel MPI"
+      mpi_getflags "-show"
+      MPI_CPPFLAGS="$retval"
+      MPI_LDFLAGS="$retval"
+      AC_MSG_RESULT([yes])
+      rm -f conftest*
+      return 0
+    fi
+  fi
+
+  AC_MSG_RESULT([no])
+  return 1
+}
+
 get_mpiparameters() {
   AC_MSG_NOTICE([Trying to identify the version of MPI compiler $MPICC])
 
@@ -269,6 +288,7 @@ get_mpiparameters() {
   test_mvapich && return
   test_mpich2 && return
   test_ibmmpi && return
+  test_intelmpi && return
    
   MPI_VERSION="unknown"
   AC_MSG_ERROR([Could not identify MPI-package! Please send a bugreport and tell us what MPI-package you're using.])
-- 
GitLab