Verified Commit d2462221 authored by Duncan Macleod's avatar Duncan Macleod
Browse files
parent af7de96b
......@@ -135,17 +135,23 @@ if test x = x"$MPILIBS"; then
AC_CHECK_LIB(mpich, MPI_Init, [MPILIBS="-lmpich"])
fi
dnl We have to use AC_TRY_COMPILE and not AC_CHECK_HEADER because the
dnl We have to use AC_COMPILE_IFELSE and not AC_CHECK_HEADER because the
dnl latter uses $CPP, not $CC (which may be mpicc).
AC_LANG_CASE([C], [if test x != x"$MPILIBS"; then
AC_MSG_CHECKING([for mpi.h])
AC_TRY_COMPILE([#include <mpi.h>],[],[AC_MSG_RESULT(yes)], [MPILIBS=""
AC_MSG_RESULT(no)])
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([[#include <mpi.h>]], [[]])],
[AC_MSG_RESULT(yes)],
[MPILIBS=""
AC_MSG_RESULT(no)])
fi],
[C++], [if test x != x"$MPILIBS"; then
AC_MSG_CHECKING([for mpi.h])
AC_TRY_COMPILE([#include <mpi.h>],[],[AC_MSG_RESULT(yes)], [MPILIBS=""
AC_MSG_RESULT(no)])
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([[#include <mpi.h>]], [[]])],
[AC_MSG_RESULT(yes)],
[MPILIBS=""
AC_MSG_RESULT(no)])
fi],
[Fortran 77], [if test x != x"$MPILIBS"; then
AC_MSG_CHECKING([for mpif.h])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment