1 dnl Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
3 dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 dnl This library is free software; you can redistribute it and/or
7 dnl modify it under the terms of the GNU Lesser General Public
8 dnl License as published by the Free Software Foundation; either
9 dnl version 2.1 of the License.
11 dnl This library is distributed in the hope that it will be useful,
12 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
13 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 dnl Lesser General Public License for more details.
16 dnl You should have received a copy of the GNU Lesser General Public
17 dnl License along with this library; if not, write to the Free Software
18 dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 AC_DEFUN([CHECK_MPICH],[
24 AC_REQUIRE([AC_PROG_CC])dnl
27 [AC_HELP_STRING([--with-mpich=DIR],[root directory path of MPICH installation])],
28 WITHMPICH="yes",WITHMPICH="no")
32 if test "$WITHMPICH" = yes; then
36 echo ---------------------------------------------
38 echo ---------------------------------------------
42 if test "$MPICH_HOME"; then
43 MPI_INCLUDES="-I$MPICH_HOME/include"
44 if test "x$MPICH_HOME" = "x/usr"
48 MPI_LIBS="-L$MPICH_HOME/lib"
52 CPPFLAGS_old="$CPPFLAGS"
53 CPPFLAGS="$MPI_INCLUDES $CPPFLAGS"
54 AC_CHECK_HEADER(mpi.h,WITHMPICH="yes",WITHMPICH="no")
55 CPPFLAGS="$CPPFLAGS_old"
57 if test "$WITHMPICH" = "yes";then
58 LDFLAGS_old="$LDFLAGS"
59 LDFLAGS="$MPI_LIBS $LDFLAGS"
60 AC_CHECK_LIB(mpich,MPI_Init,WITHMPICH="yes",WITHMPICH="no")
61 AC_CHECK_LIB(mpich,MPI_Publish_name,WITHMPI2="yes",WITHMPI2="no")
62 LDFLAGS="$LDFLAGS_old"
65 if test "$WITHMPICH" = "yes";then
68 MPI_LIBS="$MPI_LIBS -lmpich"