From: prascle Date: Mon, 12 Dec 2005 18:36:18 +0000 (+0000) Subject: PR: from bernard Secher X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a6c8f341a52eeb340b51675183cdecd14b2134b6;p=modules%2Fkernel.git PR: from bernard Secher --- diff --git a/salome_adm/unix/config_files/check_lam.m4 b/salome_adm/unix/config_files/check_lam.m4 index ae21b56fe..9d9619a9c 100644 --- a/salome_adm/unix/config_files/check_lam.m4 +++ b/salome_adm/unix/config_files/check_lam.m4 @@ -62,27 +62,26 @@ if test "$WITHLAM" = yes; then fi if test "$WITHLAM" = "yes";then - WITHLAM="no" - - if test "$WITHLAM" = "no";then - CPPFLAGS="$MPI_INCLUDES $CPPFLAGS" - LIBS="$LIBS -lmpi++" - AC_TRY_LINK([ - #include - ], [int argc=0; char **argv=0; MPI_Init(&argc,&argv);], - WITHLAM="yes",WITHLAM="no") - if test "$WITHLAM" = "yes";then - MPI_LIBS="$MPI_LIBS -lmpi++" - fi - LIBS="$LIBS_old" - CPPFLAGS="$CPPFLAGS_old" + CPPFLAGS="$MPI_INCLUDES $CPPFLAGS" + LIBS="$LIBS -lmpi++" + AC_MSG_CHECKING(for MPI_Init in -lmpi++) + AC_TRY_LINK([ + #include + ], [int argc=0; char **argv=0; MPI_Init(&argc,&argv);], + WITHLAM="yes",WITHLAM="no") + + CPPFLAGS="$CPPFLAGS_old" + if test "$WITHLAM" = "yes";then + + AC_MSG_RESULT(yes) + MPI_LIBS="$MPI_LIBS -lmpi++" AC_CHECK_LIB(mpi++,MPI_Publish_name,WITHMPI2="yes",WITHMPI2="no") - LDFLAGS="$LDFLAGS_old" - LIBS="$LIBS_old" - fi - if test "$WITHLAM" = "no";then + else + AC_MSG_RESULT(no) + + LIBS="$LIBS_old" AC_CHECK_LIB(lam,lam_mp_init,WITHLAM="yes",WITHLAM="no") if test "$WITHLAM" = "yes";then MPI_LIBS="$MPI_LIBS -llam" @@ -91,15 +90,17 @@ if test "$WITHLAM" = yes; then AC_CHECK_LIB(mpi,MPI_Init,WITHLAM="yes",WITHLAM="no") if test "$WITHLAM" = "yes";then - MPI_LIBS="$MPI_LIBS -lmpi" + MPI_LIBS="-lmpi $MPI_LIBS" fi AC_CHECK_LIB(mpi,MPI_Publish_name,WITHMPI2="yes",WITHMPI2="no") - LDFLAGS="$LDFLAGS_old" - LIBS="$LIBS_old" + fi fi + LDFLAGS="$LDFLAGS_old" + LIBS="$LIBS_old" + if test "$WITHLAM" = "yes";then WITHMPI="yes" mpi_ok=yes