#! /bin/sh # /*@@ # @file LAM # @date Wed Jul 21 13:27:07 1999 # @author Tom Goodale # @desc # Configure Cactus to compile with the LAM version of MPI. # @enddesc # @version $Header: /mnt/data2/cvs2svn/cvs-repositories/Cactus/lib/make/extras/MPI/LAM,v 1.10 2004-11-14 11:55:10 tradke Exp $ # @@*/ echo ' LAM selected' if test -z "$LAM_LIB_DIR" -o -z "$LAM_INC_DIR" ; then if test -z "$LAM_DIR" ; then echo ' LAM selected but no LAM_DIR set. Checking some places...' if test -d '/usr/include/lam' -a -d '/usr/lib/lam' ; then lam_libs='/usr/lib/lam' lam_includes='/usr/include/lam' elif test -d '/usr/local/include/lam' -a -d '/usr/local/lib/lam' ; then lam_libs='/usr/local/lib/lam' lam_includes='/usr/local/include/lam' else CCTK_Search LAM_DIR "/usr /usr/local /usr/local/lam /usr/local/packages/lam /usr/local/apps/lam $HOME" include/lam_config.h if test -z "$LAM_DIR" ; then echo ' Unable to locate LAM installation - please set LAM_DIR or {LAM_INC_DIR, LAM_LIB_DIR}' exit 2 fi fi fi # set LAM_INC_DIR if not already set if test -z "$LAM_INC_DIR" ; then : ${lam_includes="$LAM_DIR/include"} # search for mpi++.h which might be in an include subdirectory if test ! -r "$lam_includes/mpi++.h" ; then if test -r "$lam_includes/mpi2c++/mpi++.h" ; then lam_cxx_includes="$lam_includes/mpi2c++" elif test -r "$lam_includes/../mpi2c++/mpi++.h" ; then lam_cxx_includes="$lam_includes/../mpi2c++" fi fi # don't explicitely add standard include search paths if test "$lam_includes" != '/usr/include' -a "$lam_includes" != '/usr/local/include'; then LAM_INC_DIR="$lam_includes" fi if test -n "$lam_cxx_includes"; then LAM_INC_DIR="$LAM_INC_DIR $lam_cxx_includes" fi fi # set LAM_LIB_DIR if not already set if test -z "$LAM_LIB_DIR" ; then lam_libs="$LAM_DIR/lib" # don't add standard library search paths if test "$lam_libs" != '/usr/lib' -a "$lam_libs" != '/usr/local/lib'; then LAM_LIB_DIR="$lam_libs" fi fi if test -z "$LAM_INC_DIR"; then echo ' Using no explicit LAM include path' else echo " Using \"$LAM_INC_DIR\" as LAM include path" fi if test -z "$LAM_LIB_DIR"; then echo ' Using no explicit LAM library path' else echo " Using \"$LAM_LIB_DIR\" as LAM library path" fi fi # LAM libs changed in versions newer than 6.4 if test -r "$LAM_LIB_DIR/libtrillium.a" ; then MPI_LIBS='mpi tstdio args t trillium' else MPI_LIBS='mpi lam dl pthread' fi MPI_INC_DIRS="$LAM_INC_DIR" MPI_LIB_DIRS="$LAM_LIB_DIR"