]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix test for Trilinos MPI.
authorMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Fri, 3 Sep 2010 16:49:28 +0000 (16:49 +0000)
committerMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Fri, 3 Sep 2010 16:49:28 +0000 (16:49 +0000)
git-svn-id: https://svn.dealii.org/trunk@21856 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/aclocal.m4

index 6920838b56627b15686255fe2ee4c5875aea7ff0..3acbd2ee35bafd1ece439442dd3d9105f0350800 100644 (file)
@@ -6086,54 +6086,64 @@ dnl
 dnl -------------------------------------------------------------
 AC_DEFUN(DEAL_II_CHECK_TRILINOS_MPI_CONSISTENCY, dnl
 [
-  if test "x$USE_CONTRIB_TRILINOS" = "xyes" ; then
-    AC_MSG_CHECKING(for consistency of Trilinos and deal.II MPI settings)
-    AC_LANG(C++)
+  dnl Check for presence of Epetra_config.h that we need to detect MPI 
+  dnl settings 
+  AC_MSG_CHECKING(Epetra_config.h presence)
+  if test -f $DEAL_II_TRILINOS_INCDIR/Epetra_config.h ; then
+    AC_MSG_RESULT(yes)
+  else
+    AC_MSG_RESULT(no)
+    exit 1;
+  fi
 
-    CXXFLAGS="$CXXFLAGSG $INCLUDE -I$DEAL_II_TRILINOS_INCDIR"
+  AC_MSG_CHECKING(for consistency of Trilinos and deal.II MPI settings)
+  AC_LANG(C++)
 
-    if test "x$DEAL_II_USE_MPI" = "xyes" ; then
-      dnl So we support MPI. Check that our Trilinos installation
-      dnl does too. Epetra sets the variable HAVE_MPI to 1 in case
-      dnl supports MPI, and does not set it otherwise, so just read
-      dnl out that information.
-      AC_TRY_COMPILE(
-       [
-          #include <Epetra_config.h>
-        ],
-       [
-         #ifndef HAVE_MPI
-           compile error;
-         #endif
-       ],
-       [
-         AC_MSG_RESULT(yes)
-       ],
-        [
-          AC_MSG_ERROR([Trilinos was not built for MPI, but deal.II is!])
-          exit 1;
-        ])
-    else
-      dnl So we don't support MPI. Check that our Trilinos installation
-      dnl doesn't either.
-      AC_TRY_COMPILE(
-       [
-         #include <Epetra_config.h>
-       ],
-       [
-         #ifdef HAVE_MPI
-           compile error;
-         #endif
-       ],
-       [
-         AC_MSG_RESULT(yes)
-       ],
-       [
-         AC_MSG_ERROR([Trilinos was built for MPI, but deal.II is not!])
-          exit 1;
-       ])
-    fi
+  OLD_CXXFLAGS="$CXXFLAGS"
+  CXXFLAGS="$CXXFLAGS -I$DEAL_II_TRILINOS_INCDIR"
+
+  if test "x$DEAL_II_USE_MPI" = "xyes" ; then
+    dnl So we support MPI. Check that our Trilinos installation
+    dnl does too. Epetra sets the variable HAVE_MPI to 1 in case
+    dnl supports MPI, and does not set it otherwise, so just read
+    dnl out that information.
+    AC_TRY_COMPILE(
+      [
+       #include <Epetra_config.h>
+      ],
+      [
+       #ifndef HAVE_MPI
+         compile error;
+       #endif
+      ],
+      [
+        AC_MSG_RESULT(yes)
+      ],
+      [
+        AC_MSG_ERROR([Trilinos was not built for MPI, but deal.II is!])
+        exit 1;
+      ])
+  else
+    dnl So we don't support MPI. Check that our Trilinos installation
+    dnl doesn't either.
+    AC_TRY_COMPILE(
+      [
+        #include <Epetra_config.h>
+      ],
+      [
+        #ifdef HAVE_MPI
+         compile error;
+       #endif
+      ],
+      [
+        AC_MSG_RESULT(yes)
+      ],
+      [
+       AC_MSG_ERROR([Trilinos was built for MPI, but deal.II is not!])
+       exit 1;
+      ])
   fi
+  CXXFLAGS="${OLD_CXXFLAGS}"
 ])
 
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.