From 8f459665e80f640539fd2d2d153b30c578a51053 Mon Sep 17 00:00:00 2001 From: grev Date: Fri, 1 Aug 2008 14:14:53 +0000 Subject: [PATCH] b=15266 i=Adilger integrate mdsrate to acc-sm; configure and make mpi tests --- lustre/autoconf/lustre-core.m4 | 36 ++++++++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 index cef2aaa..cb77937 100644 --- a/lustre/autoconf/lustre-core.m4 +++ b/lustre/autoconf/lustre-core.m4 @@ -1457,11 +1457,39 @@ if test x$enable_liblustre_acl = xyes ; then AC_DEFINE(LIBLUSTRE_POSIX_ACL, 1, Liblustre Support ACL-enabled MDS) fi +# +# check --with-mpi option +# +AC_ARG_WITH([mpi], + AC_HELP_STRING([--with-mpi=path], + [set path to mpi install (default=/opt/mpich)]), + [ + case $with_mpi in + [[\\/$]]* | ?:[[\\/]]* ) + ;; + *) + AC_MSG_ERROR([expected absolute directory name for --with-mpi]) + ;; + esac + + MPI_ROOT=$with_mpi + LDFLAGS="$LDFLAGS -L$with_mpi/lib" + CFLAGS="$CFLAGS -I$with_mpi/include" + ], + [ + MPI_ROOT=/opt/mpich + LDFLAGS="$LDFLAGS -L$MPI_ROOT/ch-p4/lib -L$MPI_ROOT/ch-p4/lib64" + CFLAGS="$CFLAGS -I$MPI_ROOT/include" + ]) +AC_SUBST(MPI_ROOT) + +# +# check mpi's includes and library +# AC_MSG_CHECKING([whether to build mpitests]) -AC_ARG_ENABLE([mpitests], - AC_HELP_STRING([--enable-mpitests], - [build liblustre mpi tests]), - [],[enable_mpitests=no]) +AC_CHECK_FILE([$MPI_ROOT/include/mpi.h], + [AC_CHECK_LIB([mpich],[MPI_Start],[enable_mpitests=yes],[enable_mpitests=no])], + [enable_mpitests=no]) AC_MSG_RESULT([$enable_mpitests]) AC_MSG_NOTICE([Enabling Lustre configure options for libsysio]) -- 1.8.3.1