From: Matt Benjamin Date: Mon, 21 Apr 2014 18:47:09 +0000 (-0400) Subject: Accelio Autotools glue. X-Git-Tag: v0.93~265^2~8 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=dcfb80a8db06a0fe52158a43795661168d622904;p=ceph.git Accelio Autotools glue. Add Accelio to build process with --enable-xio is provided. Signed-off-by: Matt Benjamin --- diff --git a/README.xio b/README.xio new file mode 100644 index 000000000000..e01d575d5fcd --- /dev/null +++ b/README.xio @@ -0,0 +1,14 @@ + + +Building + +The Accelio XioMessenger is built conditionally only, when --enable-xio is +provided to configure. + +Accelio depends on OpenFabrics verbs development headers/libraries. + +If either the Accelio or OFED development environments are in non-standard locations, +include and library paths must be added to both CFLAGS and CXXFLAGS, in the Autotools +build as of 1/1/2015. + +-Matt diff --git a/configure.ac b/configure.ac index 1b09d115f817..782e5bb70587 100644 --- a/configure.ac +++ b/configure.ac @@ -521,6 +521,27 @@ if test "x$enable_cephfs_java" = "xyes"; then fi AM_CONDITIONAL(HAVE_JUNIT4, [test "$have_junit4" = "1"]) +# +# Accelio and OFED +# +AC_ARG_ENABLE(xio, + [AC_HELP_STRING([--enable-xio], [build Ceph Accelio transport])], + [], [enable_xio=no]) + +AM_CONDITIONAL(ENABLE_XIO, [test "x$enable_xio" = "xyes"]) + +if test "x$enable_xio" = x"yes"; then + AC_CHECK_HEADER([libxio.h], [], AC_MSG_ERROR([Cannot find header 'libxio.h'.])) + AC_CHECK_LIB([xio], [xio_init], [], AC_MSG_FAILURE([Accelio not found])) + AC_CHECK_LIB([ibverbs], [ibv_query_device], [], AC_MSG_FAILURE([OFED not found])) + AC_CHECK_LIB([rdmacm], [rdma_connect], [], AC_MSG_FAILURE([OFED not found])) + + AC_DEFINE([HAVE_XIO], [1], [Accelio conditional compilation]) + + XIO_LIBS="-lxio -libverbs -lrdmacm" + AC_SUBST(XIO_LIBS) +fi + # # FreeBSD has it in base. # @@ -727,6 +748,11 @@ AC_CHECK_LIB(boost_system-mt, main, [], [AC_CHECK_LIB(boost_system, main, [], AC_MSG_NOTICE(["Boost system library not found."]))]) +# Also regex, used in address_helper +AC_CHECK_LIB(boost_regex, main, [], + [AC_CHECK_LIB(boost_regex, main, [], + AC_MSG_NOTICE(["Boost regex library not found."]))]) + # Find the right boost_thread library. BOOST_THREAD_LIBS="" saved_LIBS="${LIBS}" diff --git a/src/common/Makefile.am b/src/common/Makefile.am index 28881945357c..1223ccf1ae03 100644 --- a/src/common/Makefile.am +++ b/src/common/Makefile.am @@ -61,6 +61,7 @@ libcommon_internal_la_SOURCES = \ common/ceph_json.cc \ common/ipaddr.cc \ common/pick_address.cc \ + common/address_helper.cc \ common/util.cc \ common/TextTable.cc \ common/ceph_fs.cc \ diff --git a/src/msg/Makefile.am b/src/msg/Makefile.am index 5a0001d09f9a..3d6ee10337c2 100644 --- a/src/msg/Makefile.am +++ b/src/msg/Makefile.am @@ -61,4 +61,25 @@ if FREEBSD libmsg_la_SOURCES += msg/async/EventKqueue.h endif +if ENABLE_XIO +libmsg_la_SOURCES += \ + msg/xio/QueueStrategy.cc \ + msg/xio/XioConnection.cc \ + msg/xio/XioMessenger.cc \ + msg/xio/XioMsg.cc \ + msg/xio/XioPortal.cc \ + msg/xio/XioPool.cc + +noinst_HEADERS += \ + msg/xio/DispatchStrategy.h \ + msg/xio/FastStrategy.h \ + msg/xio/QueueStrategy.h \ + msg/xio/XioConnection.h \ + msg/xio/XioInSeq.h \ + msg/xio/XioMessenger.h \ + msg/xio/XioMsg.h \ + msg/xio/XioPool.h \ + msg/xio/XioPortal.h +endif + noinst_LTLIBRARIES += libmsg.la diff --git a/src/test/messenger/Makefile.am b/src/test/messenger/Makefile.am index 7f7251a16b6b..27a4b68dc61a 100644 --- a/src/test/messenger/Makefile.am +++ b/src/test/messenger/Makefile.am @@ -3,60 +3,64 @@ simple_server_SOURCES = \ test/messenger/simple_server.cc \ test/messenger/simple_dispatcher.cc -simple_server_CFLAGS = ${AM_CFLAGS} -simple_server_CXXFLAGS = ${AM_CXXFLAGS} +simple_server_CFLAGS = $(AM_CFLAGS) +simple_server_CXXFLAGS = $(AM_CXXFLAGS) simple_server_LDADD = \ - $(LIBOS) $(CEPH_GLOBAL) $(LIBCOMMON) $(EXTRALIBS) + $(LIBOS) $(LIBCOMMON) $(CEPH_GLOBAL) $(PTHREAD_LIBS) $(EXTRALIBS) if LINUX - simple_server_LDADD += -ldl +simple_server_LDADD += -ldl endif simple_client_SOURCES = \ test/messenger/simple_client.cc \ test/messenger/simple_dispatcher.cc -simple_client_CFLAGS = ${AM_CFLAGS} -simple_client_CXXFLAGS = ${AM_CXXFLAGS} +simple_client_CFLAGS = $(AM_CFLAGS) +simple_client_CXXFLAGS = $(AM_CXXFLAGS) simple_client_LDADD = \ - $(LIBOS) $(CEPH_GLOBAL) $(LIBCOMMON) $(EXTRALIBS) + $(LIBOS) $(LIBCOMMON) $(CEPH_GLOBAL) $(PTHREAD_LIBS) $(EXTRALIBS) if LINUX - simple_client_LDADD += -ldl +simple_client_LDADD += -ldl endif +noinst_PROGRAMS += \ + simple_server \ + simple_client + +if ENABLE_XIO xio_server_SOURCES = \ test/messenger/xio_server.cc \ test/messenger/xio_dispatcher.cc -xio_server_CFLAGS = ${AM_CFLAGS} -xio_server_CXXFLAGS = ${AM_CXXFLAGS} +xio_server_CFLAGS = $(AM_CFLAGS) +xio_server_CXXFLAGS = $(AM_CXXFLAGS) xio_server_LDADD = \ - $(LIBOS) $(CEPH_GLOBAL) $(LIBCOMMON) $(EXTRALIBS) + $(LIBOS) $(CEPH_GLOBAL) $(LIBCOMMON) $(PTHREAD_LIBS) $(EXTRALIBS) if LINUX - xio_server_LDADD += -ldl +xio_server_LDADD += -ldl endif xio_client_SOURCES = \ test/messenger/xio_client.cc \ test/messenger/xio_dispatcher.cc -xio_client_CFLAGS = ${AM_CFLAGS} -xio_client_CXXFLAGS = ${AM_CXXFLAGS} +xio_client_CFLAGS = $(AM_CFLAGS) +xio_client_CXXFLAGS = $(AM_CXXFLAGS) xio_client_LDADD = \ - $(LIBOS) $(CEPH_GLOBAL) $(LIBCOMMON) $(EXTRALIBS) + $(LIBOS) $(CEPH_GLOBAL) $(LIBCOMMON) $(PTHREAD_LIBS) $(EXTRALIBS) if LINUX - xio_client_LDADD += -ldl +xio_client_LDADD += -ldl endif noinst_PROGRAMS += \ - simple_server \ - simple_client \ xio_server \ xio_client +endif