Commit e0ae7ebc authored by Rob Latham's avatar Rob Latham
Browse files

better management and publication of server-side libs

server-oriented code needs a few more libraries than client-side.
Should fix Matthieu's build problem where boost was not propigated up to
mobject.
parent 61569e50
ACLOCAL_AMFLAGS="-Im4"
SERVER_LIBS=@SERVER_LIBS@
bin_PROGRAMS = test/bench-client \
test/test-client \
test/test-server
......@@ -62,7 +64,7 @@ test_test_client_LDFLAGS = -Llib -lkvclient
test_test_server_SOURCES = test/test-server.cc
test_test_server_CPPFLAGS = ${CPPFLAGS} -I${srcdir}/src
test_test_server_DEPENDENCIES = lib/libkvserver.la
test_test_server_LDFLAGS = -Llib -lkvserver -lssg -lboost_filesystem -lboost_system
test_test_server_LDFLAGS = -Llib -lkvserver ${SERVER_LIBS}
test_test_mpi_SOURCES = test/test-mpi.cc
......@@ -70,12 +72,12 @@ test_test_mpi_CPPFLAGS = ${CPPFLAGS} -I${srcdir}/src
test_test_mpi_DEPENDENCIES = lib/libkvserver.la lib/libkvclient.la
test_test_mpi_LDFLAGS = -Llib -lkvclient -lkvserver -lssg -lboost_filesystem -lboost_system
test_test_mpi_LDFLAGS = -Llib -lkvclient -lkvserver ${SERVER_LIBS}
test_test_mpi_group_SOURCES = test/test-mpi-group.cc
test_test_mpi_group_CPPFLAGS = ${CPPFLAGS} -I${srcdir}/src
test_test_mpi_group_DEPENDENCIES = lib/libkvgroupserver.la lib/libkvgroupclient.la lib/libkvserver.la lib/libkvclient.la
test_test_mpi_group_LDFLAGS = -Llib -lkvgroupserver -lkvgroupclient -lkvclient -lkvserver -lssg -lch-placement -lleveldb -ldb_cxx -lboost_filesystem -lboost_system
test_test_mpi_group_LDFLAGS = -Llib -lkvgroupserver -lkvgroupclient -lkvclient -lkvserver ${SERVER_LIBS}
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = maint/kv-server.pc \
......
......@@ -45,6 +45,19 @@ LIBS="$MARGO_LIBS $LIBS"
CPPFLAGS="$MARGO_CFLAGS $CPPFLAGS"
CFLAGS="$MARGO_CFLAGS $CFLAGS"
PKG_CHECK_MODULES([SSG], [ssg], [],
AC_MSG_ERROR([Could not find ssg]) )
CFLAGS="$SSG_CFLAGS $CFLAGS"
SERVER_LIBS="$SSG_LIBS $SERVER_LIBS"
PKG_CHECK_MODULES([CHPLACEMENT], [ch-placement], [],
AC_MSG_ERROR([Could not find ch-placement]) )
CFLAGS="$CHPLACEMENT_CFLAGS $CFLAGS"
SERVER_LIBS="$CHPLAEMENT_LIBS $SERVER_LIBS"
# todo: proper configure checks for boost
SERVER_LIBS="$SERVER_LIBS -lboost_filesystem -lboost_system"
# we have three possible backends for our datastore. If none are selected,
# then nothing will initialize the class and well that doesn't make any sense
# anyway. Set BwTree as a default option as it's self-contained to the tree.
......@@ -80,7 +93,7 @@ if test "x${berkelydb_backend}" == xyes ; then
AC_DEFINE([USE_BDB], 1, [Use Berkely DB backend])
bwtree_backend=no
leveldb_backend=no
LIBS="${LIBS} -ldb_cxx -ldb_stl"
SERVER_LIBS="${SERVER_LIBS} -ldb_cxx -ldb_stl"
AC_LANG_POP
fi
......@@ -90,7 +103,7 @@ if test "x${leveldb_backend}" == xyes ; then
AC_CHECK_HEADERS([leveldb/c.h], ,
AC_ERROR("Could not find leveldb headers"))
AC_DEFINE([USE_LEVELDB], 1, [use leveldb backend])
LIBS="${LIBS} -lleveldb"
SERVER_LIBS="${SERVER_LIBS} -lleveldb"
berkelydb_backend=no
bwtree_backend=no
fi
......@@ -106,6 +119,7 @@ fi
AM_CONDITIONAL([BUILD_BWTREE], [test "x${bwtree_backend}" == xyes])
AC_SUBST(SERVER_LIBS)
AC_CONFIG_FILES([Makefile maint/kv-client.pc maint/kv-server.pc])
AC_OUTPUT
......@@ -8,5 +8,5 @@ Description: services-based keyval server
Version: 0.1
URL: https://xgitlab.cels.anl.gov/sds/sds-keyval
Requires: margo
Libs: -L${libdir} -lkvserver
Libs: -L${libdir} -lkvserver @SERVER_LIBS@
Cflags: -I${includedir}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment