blob: d00748a584fcfe3b3eae400cb0e70034d08bdda7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
--- 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 <leveldb/cache.h>
#include <leveldb/env.h>
#include <leveldb/filter_policy.h>
-#include <memenv.h>
+#include <leveldb/helpers/memenv.h>
#include <stdint.h>
#include <algorithm>
|