Add Accelio to build process with --enable-xio is provided.
Signed-off-by: Matt Benjamin <matt@cohortfs.com>
--- /dev/null
+
+
+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
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.
#
[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}"
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 \
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
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