Commit e4f946de authored by Matthieu Dorier's avatar Matthieu Dorier
Browse files

replacing --enable-berkeleydb with --with-berkeleydb to allow the user to provide the path

parent 91df5c23
......@@ -100,11 +100,11 @@ bwtree_backend=yes
leveldb_backend=no
berkelydb_backend=no
AC_ARG_ENABLE([berkeleydb],
AS_HELP_STRING([--enable-berkeleydb], [Select "berkeleydb" as
storage backend (default is no)]),
[berkelydb_backend=${enableval}]
)
#AC_ARG_ENABLE([berkeleydb],
# AS_HELP_STRING([--enable-berkeleydb], [Select "berkeleydb" as
# storage backend (default is no)]),
# [berkelydb_backend=${enableval}]
#)
AC_ARG_ENABLE([leveldb],
AS_HELP_STRING([--enable-leveldb], [Select "leveldb" as storage
backend (default is no)]),
......@@ -117,15 +117,32 @@ AC_ARG_ENABLE([bwtree],
)
if test "x${berkelydb_backend}" == xyes ; then
#if test "x${berkelydb_backend}" == xyes ; then
# AC_LANG_PUSH([C++])
# AC_CHECK_HEADERS([db_cxx.h], ,
# AC_ERROR("Could not find Berkely DB C++ headers"))
# AC_CHECK_HEADERS([dbstl_map.h],,
# AC_ERROR("Could not find Berkely DB STL headers"))
# AC_DEFINE([USE_BDB], 1, [Use Berkely DB backend])
# SERVER_LIBS_EXT="${SERVER_LIBS_EXT} -ldb_cxx -ldb_stl"
# AC_LANG_POP
#fi
AC_ARG_WITH([berkeleydb],[AS_HELP_STRING([--with-berkeleydb@<:@=DIR@:>@],
[location of BerkeleyDB installation])])
if test "x${with_berkeleydb}" != "x" ; then
AC_LANG_PUSH([C++])
CPPFLAGS="$CPPFLAGS -I${with_berkeleydb}/include"
CXXFLAGS="$CXXFLAGS -I${with_berkeleydb}/include"
LIBS="$LIBS -L${with_berkeleydb}/lib/ -ldb_cxx -ldb_stl"
AC_CHECK_HEADERS([db_cxx.h], ,
AC_ERROR("Could not find Berkely DB C++ headers"))
AC_ERROR("Could not find Berkely DB C++ headers"))
AC_CHECK_HEADERS([dbstl_map.h],,
AC_ERROR("Could not find Berkely DB STL headers"))
AC_ERROR("Could not find Berkely DB STL headers"))
AC_DEFINE([USE_BDB], 1, [Use Berkely DB backend])
SERVER_LIBS_EXT="${SERVER_LIBS_EXT} -ldb_cxx -ldb_stl"
AC_LANG_POP
berkelydb_backend=yes
fi
if test "x${leveldb_backend}" == xyes ; then
......
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