summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in14
1 files changed, 12 insertions, 2 deletions
diff --git a/configure.in b/configure.in
index 28ace27..cbc127a 100644
--- a/configure.in
+++ b/configure.in
@@ -2033,15 +2033,25 @@ AC_ARG_ENABLE([parallel],
dnl The --enable-parallel flag is not compatible with --enable-cxx.
dnl If the user tried to specify both flags, throw an error.
-if test "${enable_cxx}" = "yes" -a "$enable_parallel" = "yes"; then
+if test "X${HDF_CXX}" = "Xyes" -a "X${enable_parallel}" = "Xyes"; then
AC_MSG_ERROR([--enable-cxx and --enable-parallel flags are incompatible])
fi
dnl --enable-parallel is also incompatible with --enable-threadsafe.
-if test "${enable_threadsafe}" = "yes" -a "$enable_parallel" = "yes"; then
+if test "X${THREADSAFE}" = "Xyes" -a "X${enable_parallel}" = "Xyes"; then
AC_MSG_ERROR([--enable-threadsafe and --enable-parallel flags are incompatible])
fi
+dnl It's possible to build in parallel by specifying a parallel compiler
+dnl without using the --enable-parallel flag. This isn't allowed with
+dnl C++ or threadsafe, either.
+if test "X${PARALLEL}" != "X" -a "X${enable_cxx}" = "Xyes" ; then
+ AC_MSG_ERROR([An MPI compiler is being used; --enable-cxx is not allowed])
+fi
+if test "X${PARALLEL}" != "X" -a "X${THREADSAFE}" = "Xyes"; then
+ AC_MSG_ERROR([An MPI compiler is being used; --enable-threadsafe is not allowed])
+fi
+
AC_MSG_CHECKING([for parallel support files])
case "X-$enable_parallel" in
X-|X-no|X-none)