Browse Source

Turn enable_mpi=maybe to yes/no dependending whether mpicc is found

Samuel Thibault 5 years ago
parent
commit
8eafb9d9a2
1 changed files with 8 additions and 0 deletions
  1. 8 0
      configure.ac

+ 8 - 0
configure.ac

@@ -365,6 +365,14 @@ AC_ARG_ENABLE(mpi, [AS_HELP_STRING([--disable-mpi],
             [enable_mpi=$enableval],
             [enable_mpi=$default_enable_mpi])
 
+if test x$enable_mpi = xmaybe ; then
+    if test -x "$mpicc_path"; then
+	enable_mpi=yes
+    else
+	enable_mpi=no
+    fi
+fi
+
 # in case MPI was explicitely required, but mpicc is not available, this is an error
 if test x$enable_mpi = xyes -a ! -x "$mpicc_path"; then
    AC_MSG_ERROR([Compiler MPI '$mpicc_path' not valid])