--- a/configure.ac +++ b/configure.ac @@ -894,10 +894,22 @@ [AC_MSG_ERROR([Cannot set default symbol visibility. Use --disable-reduce-exports.])]) fi +dnl Check for leveldb, only if explicitly requested LEVELDB_CPPFLAGS= LIBLEVELDB= LIBMEMENV= -AM_CONDITIONAL([EMBEDDED_LEVELDB],[true]) +AC_ARG_WITH([system-leveldb], + [AS_HELP_STRING([--with-system-leveldb], + [Build with system LevelDB (default is no; DANGEROUS; NOT SUPPORTED)])], + [system_leveldb=$withval], + [system_leveldb=no] +) +if test x$system_leveldb != xno; then + LEVELDB_CPPFLAGS= + LIBLEVELDB=-lleveldb + LIBMEMENV=-lmemenv +fi +AM_CONDITIONAL([EMBEDDED_LEVELDB],[test x$system_leveldb = xno]) AC_SUBST(LEVELDB_CPPFLAGS) AC_SUBST(LIBLEVELDB) AC_SUBST(LIBMEMENV) --- a/src/dbwrapper.cpp +++ b/src/dbwrapper.cpp @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #include