This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
yap-6.3/library/lammpi/configure.in
2014-02-16 13:03:09 +00:00

78 lines
1.7 KiB
Plaintext

AC_ARG_WITH(mpi,
[ --with-mpi[=DIR] use LAM/MPI library in DIR],
if test "$withval" = yes; then
dnl handle UBUNTU systems
yap_cv_mpi=yes
elif test "$withval" = no; then
yap_cv_mpi=no
else
yap_cv_mpi=$with_mpi
LDFLAGS="$LDFLAGS -L${yap_cv_mpi}/lib"
CPPFLAGS="$CPPFLAGS -I${yap_cv_mpi}/include"
fi,
[yap_cv_mpi=no])
AC_ARG_WITH(mpe,
[ --with-mpe[=DIR] use MPE library in DIR],
if test "$withval" = yes; then
yap_cv_mpe=yes
elif test "$withval" = no; then
yap_cv_mpe=no
else
yap_cv_mpe=$with_mpe
LDFLAGS="$LDFLAGS -L${yap_cv_mpe}/lib"
CPPFLAGS="$CPPFLAGS -I${yap_cv_mpe}/include"
fi,
[yap_cv_mpe=no])
if test "$CC" = icc
then
MPI_CC="$CC"
yap_cv_mpi=no
fi
dnl LAM/MPI interface
if test "$yap_cv_mpi" != "no" -a "$INSTALL_DLLS" != "no"; then
if test "$yap_cv_mpi" != "yes"; then
AC_PATH_PROG(MPI_CC,mpicc,true,$PATH:/sbin:/usr/sbin:/usr/etc:/usr/local/sbin)
else
AC_PATH_PROG(MPI_CC,mpicc,true,$yap_cv_mpi/bin:$PATH:/sbin:/usr/sbin:/usr/etc:/usr/local/sbin)
fi
MPILDF=`"$MPI_CC" --showme:link`
MPICF=`"$MPI_CC" --showme:compile`
LIBS="$LIBS $MPILDF"
PKG_MPI="library/mpi"
OLD_CC=${CC}
CC=${MPI_CC}
AC_CHECK_HEADERS(mpi.h)
CC=${OLD_CC}
if test "$yap_cv_mpe" != "no"
then
OLD_CC=${CC}
CC=${MPI_CC}
AC_CHECK_LIB(mpe,MPE_Init_log,
[AC_DEFINE(HAVE_LIBMPE, 1, [MPI Debugging on])],
[AC_DEFINE(HAVE_LIBMPE, 0, [MPI Debugging off])])
if test "$ac_cv_lib_mpe_MPE_Init_log" = yes
then
MPI_1LIBS="-lmpe"
MPI_OBJS="$MPI_OBJS mpe.o"
fi
AC_CHECK_HEADERS(mpe.h)
CC=${OLD_CC}
fi
else
PKG_MPI=""
MPI_CC=${CC}
fi
AC_SUBST(PKG_MPI)
AC_SUBST(YAPMPILIB)
AC_SUBST(MPILDF)
AC_SUBST(MPICF)
mkdir -p library/lammpi