[cig-commits] r22938 - cs/autoconf/trunk
elliott.sales.de.andrade at geodynamics.org
elliott.sales.de.andrade at geodynamics.org
Tue Oct 8 00:11:31 PDT 2013
Author: elliott.sales.de.andrade
Date: 2013-10-08 00:11:30 -0700 (Tue, 08 Oct 2013)
New Revision: 22938
Modified:
cs/autoconf/trunk/cit_mpi.m4
Log:
Move MPI include directory test to common files.
At some point, I should recheck all the other macros in this file. They
don't seem to all be up-to-date.
Modified: cs/autoconf/trunk/cit_mpi.m4
===================================================================
--- cs/autoconf/trunk/cit_mpi.m4 2013-10-08 07:11:25 UTC (rev 22937)
+++ cs/autoconf/trunk/cit_mpi.m4 2013-10-08 07:11:30 UTC (rev 22938)
@@ -486,4 +486,37 @@
AC_DEFUN([CIT_SKIP_MPICXX_DEFINES], ["-DMPICH_SKIP_MPICXX" "-UHAVE_MPI_CPP" "-DLAM_WANT_MPI2CPP=0" "-DLAM_BUILDING=1" "-DOMPI_WANT_CXX_BINDINGS=0" "-DOMPI_BUILDING=1"])
+# CIT_MPI_INCDIR(COMMAND)
+# --------------
+# Check for MPI C++ header used by COMMAND
+# User may set MPI_INC to these directories or else it's auto-detected.
+# Result is stored in MPI_INCLUDES.
+AC_DEFUN([CIT_MPI_INCDIR], [
+ AC_ARG_VAR(MPI_INC, [Location of MPI include mpi.h, needed by CUDA/VTK (default: auto-detect)])
+ AC_LANG_PUSH([C++])
+ AC_REQUIRE_CPP
+ CPPFLAGS_save="$CPPFLAGS"
+
+ if test "x$MPI_INC" = "x"; then
+ MPI_INC=`$1 -showme:incdirs`
+ fi
+ if test "x$MPI_INC" != "x"; then
+ dnl showme:incdirs may return multiple directories:
+ for i in $MPI_INC
+ do
+ MPI_INCLUDES="$MPI_INCLUDES -I$i"
+ done
+ CPPFLAGS="$MPI_INCLUDES $CPPFLAGS"
+ fi
+ AC_CHECK_HEADER([mpi.h], [], [
+ AC_MSG_ERROR([MPI header not found; try setting MPI_INC.])
+ ])
+
+ CPPFLAGS="$CPPFLAGS_save"
+ AC_LANG_POP([C++])
+
+ AC_SUBST([MPI_INCLUDES])
+])
+
+
dnl end of file
More information about the CIG-COMMITS
mailing list