[Pvfs2-cvs] commit by pw in pvfs2: Makefile.in configure.in
pvfs2-config.h.in
CVS commit program
cvs at parl.clemson.edu
Tue May 30 16:27:59 EDT 2006
Update of /projects/cvsroot/pvfs2
In directory parlweb1:/tmp/cvs-serv25307
Modified Files:
Makefile.in configure.in pvfs2-config.h.in
Log Message:
build support for openib
Index: Makefile.in
===================================================================
RCS file: /projects/cvsroot/pvfs2/Makefile.in,v
diff -u -p -p -u -r1.214 -r1.215
--- Makefile.in 28 May 2006 16:37:38 -0000 1.214
+++ Makefile.in 30 May 2006 20:27:59 -0000 1.215
@@ -64,6 +64,7 @@ BISON = bison
FLEX = flex
BUILD_GM = @BUILD_GM@
BUILD_IB = @BUILD_IB@
+BUILD_OPENIB = @BUILD_OPENIB@
BUILD_VIS = @BUILD_VIS@
BUILD_KARMA = @BUILD_KARMA@
BUILD_EPOLL = @BUILD_EPOLL@
@@ -207,11 +208,11 @@ GCC_CFLAGS := -pipe -Wall -Wstrict-proto
#GCC_CFLAGS += -Wcast-align -Wbad-function-cast
#GCC_CFLAGS += -Wmissing-prototypes -Wmissing-declarations
#GCC_CFLAGS += -Wundef -Wpointer-arith
+#GCC_CFLAGS += -Wnested-externs
+#GCC_CFLAGS += -Wredundant-decls
# These are very noisy.
#GCC_CFLAGS += -W -Wno-unused -Wno-sign-compare
#GCC_CFLAGS += -Wcast-qual
-#GCC_CFLAGS += -Wnested-externs
-#GCC_CFLAGS += -Wredundant-decls
#GCC_CFLAGS += -Wshadow
#GCC_CFLAGS += -Wwrite-strings
@@ -298,6 +299,15 @@ ifdef BUILD_IB
-lvapi -lmtl_common -lmosal -lmpga -lpthread -ldl
LIBS += $(IBLIBS)
SERVERLIBS += $(IBLIBS)
+endif
+
+ifdef BUILD_OPENIB
+ifndef BUILD_IB
+ CFLAGS += -D__STATIC_METHOD_BMI_IB__
+endif
+ OPENIBLIBS := -L at OPENIB_LIBDIR@ -libverbs
+ LIBS += $(OPENIBLIBS)
+ SERVERLIBS += $(OPENIBLIBS)
endif
# enable mmap-readahead cache (unless disabled by configure)
Index: configure.in
===================================================================
RCS file: /projects/cvsroot/pvfs2/configure.in,v
diff -u -p -p -u -r1.293 -r1.294
--- configure.in 25 May 2006 17:20:06 -0000 1.293
+++ configure.in 30 May 2006 20:27:59 -0000 1.294
@@ -731,7 +731,7 @@ if test -n "$IB_INCDIR$IB_LIBDIR" ; then
AC_CHECK_HEADER(vapi.h,, AC_MSG_ERROR([Header vapi.h not found.]))
dnl Run test is not possible on a machine that does not have an IB NIC,
dnl and link test is hard because we need so many little libraries. Bail
- dnl and just check for existance; full library list is in Makefile.in.
+ dnl and just check for existence; full library list is in Makefile.in.
if test ! -f $IB_LIBDIR/libvapi.so ; then
if test ! -f $IB_LIBDIR/libvapi.a ; then
AC_MSG_ERROR([Infiniband library libvapi.so not found.])
@@ -747,6 +747,84 @@ fi
AC_SUBST(BUILD_IB)
AC_SUBST(IB_INCDIR)
AC_SUBST(IB_LIBDIR)
+
+dnl Configure options for OpenIB install path.
+dnl --with-openib=<dir> is shorthand for
+dnl --with-openib-includes=<dir>/include
+dnl --with-openib-libs=<dir>/lib (or lib64 if that exists)
+openib_home=
+AC_ARG_WITH(openib,
+[ --with-openib=<dir> Location of the OpenIB install (default no OpenIB)],
+ if test -z "$withval" -o "$withval" = yes ; then
+ AC_MSG_ERROR([Option --with-openib requires the path to your OpenIB tree.])
+ elif test "$withval" != no ; then
+ openib_home="$withval"
+ fi
+)
+AC_ARG_WITH(openib-includes,
+[ --with-openib-includes=<dir> Location of the OpenIB includes],
+ if test -z "$withval" -o "$withval" = yes ; then
+ AC_MSG_ERROR([Option --with-openib-includes requires path to OpenIB headers.])
+ elif test "$withval" != no ; then
+ OPENIB_INCDIR="$withval"
+ fi
+)
+AC_ARG_WITH(openib-libs,
+[ --with-openib-libs=<dir> Location of the OpenIB libraries],
+ if test -z "$withval" -o "$withval" = yes ; then
+ AC_MSG_ERROR([Option --with-openib-libs requires path to OpenIB libraries.])
+ elif test "$withval" != no ; then
+ OPENIB_LIBDIR="$withval"
+ fi
+)
+dnl If supplied the incls and libs explicitly, use them, else populate them
+dnl using guesses from the --with-openib dir.
+if test -n "$openib_home" ; then
+ if test -z "$OPENIB_INCDIR"; then
+ OPENIB_INCDIR=$openib_home/include
+ fi
+ if test -z "$OPENIB_LIBDIR"; then
+ OPENIB_LIBDIR=$openib_home/lib64
+ if test ! -d "$OPENIB_LIBDIR" ; then
+ OPENIB_LIBDIR=$openib_home/lib
+ fi
+ fi
+fi
+dnl If anything OpenIB-ish was set, go look for header.
+if test -n "$OPENIB_INCDIR$OPENIB_LIBDIR" ; then
+ CPPFLAGS="$CPPFLAGS -I$OPENIB_INCDIR"
+ AC_CHECK_HEADER(infiniband/verbs.h,,
+ AC_MSG_ERROR([Header infiniband/verbs.h not found.]))
+ dnl Run test is not possible on a machine that does not have an IB NIC.
+ dnl Link test would work, but just check for existence.
+ if test ! -f $OPENIB_LIBDIR/libibverbs.so ; then
+ if test ! -f $OPENIB_LIBDIR/libibverbs.a ; then
+ AC_MSG_ERROR([OpenIB library libibverbs.so not found.])
+ fi
+ fi
+ BUILD_OPENIB=1
+ CPPFLAGS="$CPPFLAGS_OLD"
+fi
+AC_SUBST(BUILD_OPENIB)
+AC_SUBST(OPENIB_INCDIR)
+AC_SUBST(OPENIB_LIBDIR)
+
+if test -n "$BUILD_OPENIB" ; then
+ dnl Check for which version of the ibverbs library, device opening is
+ dnl different. This format is the older one; newer is ibv_get_device_list.
+ save_ldflags="$LDFLAGS"
+ LDFLAGS="-L$OPENIB_LIBDIR -libverbs"
+ AC_MSG_CHECKING(for ibv_get_devices)
+ AC_TRY_LINK([], [
+ ibv_get_devices();
+ ],
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_IBV_GET_DEVICES, 1,
+ Define if libibverbs has ibv_get_devices),
+ AC_MSG_RESULT(no)
+ )
+ LDFLAGS="$save_ldflags"
+fi
dnl
dnl check if fgetxattr takes extra arguments
Index: pvfs2-config.h.in
===================================================================
RCS file: /projects/cvsroot/pvfs2/pvfs2-config.h.in,v
diff -u -p -p -u -r1.72 -r1.73
--- pvfs2-config.h.in 24 May 2006 15:01:57 -0000 1.72
+++ pvfs2-config.h.in 30 May 2006 20:27:59 -0000 1.73
@@ -79,6 +79,9 @@
/* Define if strerror_r is GNU-specific */
#undef HAVE_GNU_STRERROR_R
+/* Define if libibverbs has ibv_get_devices */
+#undef HAVE_IBV_GET_DEVICES
+
/* Define if IB wrap_common.h exists. */
#undef HAVE_IB_WRAP_COMMON_H
More information about the Pvfs2-cvs
mailing list