Salome HOME
To see which hdf5 we're using in configure log
[modules/kernel.git] / salome_adm / unix / config_files / check_mpi.m4
index 57b796b729d46a609821b9e5c0134ef5f76d9a8b..57bedb985f596c70752e0ca692a87ea9eb27cfc1 100644 (file)
@@ -1,29 +1,32 @@
-dnl  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-dnl  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
-dnl 
-dnl  This library is free software; you can redistribute it and/or 
-dnl  modify it under the terms of the GNU Lesser General Public 
-dnl  License as published by the Free Software Foundation; either 
-dnl  version 2.1 of the License. 
-dnl 
-dnl  This library is distributed in the hope that it will be useful, 
-dnl  but WITHOUT ANY WARRANTY; without even the implied warranty of 
-dnl  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
-dnl  Lesser General Public License for more details. 
-dnl 
-dnl  You should have received a copy of the GNU Lesser General Public 
-dnl  License along with this library; if not, write to the Free Software 
-dnl  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
-dnl 
-dnl  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+dnl  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
 dnl
+dnl  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+dnl  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
 dnl
+dnl  This library is free software; you can redistribute it and/or
+dnl  modify it under the terms of the GNU Lesser General Public
+dnl  License as published by the Free Software Foundation; either
+dnl  version 2.1 of the License.
+dnl
+dnl  This library is distributed in the hope that it will be useful,
+dnl  but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+dnl  Lesser General Public License for more details.
+dnl
+dnl  You should have received a copy of the GNU Lesser General Public
+dnl  License along with this library; if not, write to the Free Software
+dnl  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+dnl
+dnl  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 dnl
-
 AC_DEFUN([CHECK_MPI],[
 
 AC_REQUIRE([AC_PROG_CC])dnl
 
+AC_ARG_WITH(mpi_lib,
+   [AC_HELP_STRING([--with-mpi_lib=DIR],[directory path of MPICH lib installation])],
+   MPILIBREQUESTED="$withval")
+
 AC_ARG_WITH(mpi,
    [AC_HELP_STRING([--with-mpi=DIR],[root directory path of MPICH installation])],
    MPIREQUESTED="yes",MPIREQUESTED="no")
@@ -51,6 +54,10 @@ if test x"$MPIREQUESTED" = xyes; then
     fi
   fi
 
+  if test x"$MPILIBREQUESTED" != x; then
+    MPI_LIBS="-L$MPILIBREQUESTED"
+  fi
+
   CPPFLAGS_old="$CPPFLAGS"
   CPPFLAGS="$MPI_INCLUDES $CPPFLAGS"
   AC_CHECK_HEADER(mpi.h,WITHMPI="yes",WITHMPI="no")
@@ -69,7 +76,7 @@ if test x"$MPIREQUESTED" = xyes; then
 
   if test "$WITHMPI" = "yes";then
     mpi_ok=yes
-    MPI_LIBS="$MPI_LIBS -lmpi"
+    MPI_LIBS="$MPI_LIBS -lmpi -lmpio -lmpiCC"
   else
     mpi_ok=no
   fi
@@ -96,6 +103,17 @@ dnl
 
   fi
 
+  if test "$WITHLAM" = no; then
+dnl
+dnl ---------------------------------------------
+dnl testing OPENMPI
+dnl ---------------------------------------------
+dnl
+
+    CHECK_OPENMPI
+
+  fi
+
 fi
 
 if test x$WITHMPI2 = xyes; then