[MOAB-dev] r1728 - in MOAB/trunk: . test

kraftche at mcs.anl.gov kraftche at mcs.anl.gov
Mon Mar 31 15:15:32 CDT 2008


Author: kraftche
Date: 2008-03-31 15:15:32 -0500 (Mon, 31 Mar 2008)
New Revision: 1728

Modified:
   MOAB/trunk/configure.in
   MOAB/trunk/test/Makefile.am
Log:
autodetect the need for-DMPICH_IGNORE_CXX_SEEK

Modified: MOAB/trunk/configure.in
===================================================================
--- MOAB/trunk/configure.in	2008-03-31 18:03:49 UTC (rev 1727)
+++ MOAB/trunk/configure.in	2008-03-31 20:15:32 UTC (rev 1728)
@@ -103,6 +103,21 @@
 
 if test "x$WITH_MPI" != "xno"; then
   DEFINES="$DEFINES -DUSE_MPI"
+  AC_CHECK_HEADER([mpi.h],[],[AC_MSG_ERROR([mpi.h not found or not working])])
+  AC_MSG_CHECKING([If -DMPICH_IGNORE_CXX_SEEK is necessary])
+  AC_LANG_SAVE
+  AC_LANG_CPLUSPLUS
+  AC_PREPROC_IFELSE([AC_LANG_PROGRAM( [[#include <stdio.h>
+     #include <mpi.h>]],[])],
+    [AC_MSG_RESULT([no])],
+    [save_CPPFLAGS="$CPPFLAGS"
+     CPPFLAGS="$CPPFLAGS -DMPICH_IGNORE_CXX_SEEK"
+     AC_PREPROC_IFELSE([AC_LANG_PROGRAM( [[#include <stdio.h>
+         #include <mpi.h>]],[])],
+         [AC_MSG_RESULT([yes]); AM_CPPFLAGS="$AM_CPPLFLAGS -DMPICH_IGNORE_CXX_SEEK" ],
+         [AC_MSG_ERROR([mpi.h is not usable])]),
+     CPPFLAGS="$save_CPPFLAGS"])
+  AC_LANG_RESTORE
 fi
 AM_CONDITIONAL(USE_MPI, [test "xno" != "x$WITH_MPI"])
 

Modified: MOAB/trunk/test/Makefile.am
===================================================================
--- MOAB/trunk/test/Makefile.am	2008-03-31 18:03:49 UTC (rev 1727)
+++ MOAB/trunk/test/Makefile.am	2008-03-31 20:15:32 UTC (rev 1728)
@@ -40,3 +40,9 @@
                    tri_mid_edge_face_nodes.g \
                    mb_stress_out.g \
                    merge_test.ncdf
+
+check_PROGRAMS = big_mesh_test
+TESTS = $(check_PROGRAMS)
+LDADD = ../libMOAB.la
+AM_CPPFLAGS += -I$(top_srcdir)
+big_mesh_test_SOURCES = big_mesh_test.cc




More information about the moab-dev mailing list