Skip to content

Commit a549188

Browse files
committed
build: fix configuring when building depends with NO_BDB=1
Currently, if you build depends using `NO_BDB=1` (only sqlite wallets), ./configure will fail as it still tries to find bdb. i.e: ```bash checking for Berkeley DB C++ headers... default configure: error: Found Berkeley DB other than 4.8, required for portable BDB wallets (--with-incompatible-bdb to ignore or --without-bdb to disable BDB wallet support) ``` This PR fixes the build such that you can build depends, opting out of bdb without opting out of wallets entirely, and still configure successfully.
1 parent aa69471 commit a549188

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

configure.ac

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1326,9 +1326,11 @@ fi
13261326

13271327
if test x$enable_wallet != xno; then
13281328
dnl Check for libdb_cxx only if wallet enabled
1329-
BITCOIN_FIND_BDB48
1330-
if test x$suppress_external_warnings != xno ; then
1329+
if test "x$use_bdb" != "xno"; then
1330+
BITCOIN_FIND_BDB48
1331+
if test x$suppress_external_warnings != xno ; then
13311332
BDB_CPPFLAGS=SUPPRESS_WARNINGS($BDB_CPPFLAGS)
1333+
fi
13321334
fi
13331335

13341336
dnl Check for sqlite3

depends/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ BASE_CACHE ?= $(BASEDIR)/built
3434
SDK_PATH ?= $(BASEDIR)/SDKs
3535
NO_QT ?=
3636
NO_QR ?=
37+
NO_BDB ?=
38+
NO_SQLITE ?=
3739
NO_WALLET ?=
3840
NO_ZMQ ?=
3941
NO_UPNP ?=
@@ -233,6 +235,8 @@ $(host_prefix)/share/config.site : config.site.in $(host_prefix)/.stamp_$(final_
233235
-e 's|@no_qr@|$(NO_QR)|' \
234236
-e 's|@no_zmq@|$(NO_ZMQ)|' \
235237
-e 's|@no_wallet@|$(NO_WALLET)|' \
238+
-e 's|@no_bdb@|$(NO_BDB)|' \
239+
-e 's|@no_sqlite@|$(NO_SQLITE)|' \
236240
-e 's|@no_upnp@|$(NO_UPNP)|' \
237241
-e 's|@no_natpmp@|$(NO_NATPMP)|' \
238242
-e 's|@multiprocess@|$(MULTIPROCESS)|' \

depends/config.site.in

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,14 @@ if test -z "$enable_wallet" && test -n "@no_wallet@"; then
3838
enable_wallet=no
3939
fi
4040

41+
if test -z "$with_bdb" && test -n "@no_bdb@"; then
42+
with_bdb=no
43+
fi
44+
45+
if test -z "$with_sqlite" && test -n "@no_sqlite@"; then
46+
with_sqlite=no
47+
fi
48+
4149
if test -z "$enable_multiprocess" && test -n "@multiprocess@"; then
4250
enable_multiprocess=yes
4351
fi

0 commit comments

Comments
 (0)