-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,
- --with-mpi=DIR root directory path of MPICH installation,
- WITHMPI="yes",WITHMPI="no")
+ [AC_HELP_STRING([--with-mpi=DIR],[root directory path of MPICH installation])],
+ MPIREQUESTED="yes",MPIREQUESTED="no")
MPI_INCLUDES=""
MPI_LIBS=""
-if test "$WITHMPI" = yes; then
+WITHMPI=no
+mpi_ok=no
+if test x"$MPIREQUESTED" = xyes; then
echo
echo ---------------------------------------------
if test "x$withval" != "xyes"; then
MPI_HOME=$withval
MPI_INCLUDES="-I$MPI_HOME/include"
- MPI_LIBS="-L$MPI_HOME/lib"
+ if test "x$MPI_HOME" = "x/usr"
+ then
+ MPI_LIBS=""
+ else
+ MPI_LIBS="-L$MPI_HOME/lib"
+ fi
+ fi
+
+ if test x"$MPILIBREQUESTED" != x; then
+ MPI_LIBS="-L$MPILIBREQUESTED"
fi
CPPFLAGS_old="$CPPFLAGS"
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
fi
+ if test "$WITHLAM" = no; then
+dnl
+dnl ---------------------------------------------
+dnl testing OPENMPI
+dnl ---------------------------------------------
+dnl
+
+ CHECK_OPENMPI
+
+ fi
+
fi
-if test "$WITHMPI2" = "yes";then
+if test x$WITHMPI2 = xyes; then
CPPFLAGS="-DHAVE_MPI2 $CPPFLAGS"
CORBA_IDLCXXFLAGS="-DHAVE_MPI2 $CORBA_IDLCXXFLAGS"
CORBA_IDLPYFLAGS="-DHAVE_MPI2 $CORBA_IDLPYFLAGS"
AC_SUBST(MPI_INCLUDES)
AC_SUBST(MPI_LIBS)
AC_SUBST(mpi_ok)
+AM_CONDITIONAL(MPI_IS_OK, [test x"$mpi_ok" = xyes])
])dnl