mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-09 19:37:27 -03:00
Merge bitcoin/bitcoin#21629: build: fix configuring when building depends with NO_BDB=1
a5491882a0
build: fix configuring when building depends with NO_BDB=1 (fanquake) Pull request description: 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 make -C depends/ NO_QT=1 NO_BDB=1 NO_UPNP=1 NO_ZMQ=1 NO_NATPMP=1 -j8 ... copying packages: native_b2 boost libevent sqlite ./autogen.sh ./configure --prefix=/home/ubuntu/bitcoin/depends/x86_64-pc-linux-gnu ... 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. I think I've tested across most potential configurations. i.e: ```bash ./configure (bdb and sqlite on system) bdb & sqlite are both are available ./configure --without-bdb (bdb and sqlite on system) only sqlite ./configure --without-sqlite (bdb and sqlite on system) only bdb ./configure --disable-wallet (bdb and sqlite on system) neither bdb or sqlite depends NO_WALLET=1 ./configure --prefix=/bitcoin/depends/x86_64-apple-darwin19.6.0 neither bdb or sqlite depends NO_BDB=1 ./configure --prefix=/bitcoin/depends/x86_64-apple-darwin19.6.0 only sqlite depends NO_SQLITE=1 ./configure --prefix=/bitcoin/depends/x86_64-apple-darwin19.6.0 only bdb depends ./configure --prefix=/bitcoin/depends/x86_64-apple-darwin19.6.0 bdb and sqlite ``` ACKs for top commit: laanwj: Code review ACKa5491882a0
jarolrod: ACKa5491882a0
Tree-SHA512: baf7d2543a401db0d846095415ff449c04ecfb4a74c734dc51e79453702f9051210daeef686970f11fcffd32cdfadbc58acd54f0706aceecfb3edb0ff17310d7
This commit is contained in:
commit
cdcf82622d
3 changed files with 16 additions and 2 deletions
|
@ -1326,9 +1326,11 @@ fi
|
|||
|
||||
if test x$enable_wallet != xno; then
|
||||
dnl Check for libdb_cxx only if wallet enabled
|
||||
BITCOIN_FIND_BDB48
|
||||
if test x$suppress_external_warnings != xno ; then
|
||||
if test "x$use_bdb" != "xno"; then
|
||||
BITCOIN_FIND_BDB48
|
||||
if test x$suppress_external_warnings != xno ; then
|
||||
BDB_CPPFLAGS=SUPPRESS_WARNINGS($BDB_CPPFLAGS)
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl Check for sqlite3
|
||||
|
|
|
@ -34,6 +34,8 @@ BASE_CACHE ?= $(BASEDIR)/built
|
|||
SDK_PATH ?= $(BASEDIR)/SDKs
|
||||
NO_QT ?=
|
||||
NO_QR ?=
|
||||
NO_BDB ?=
|
||||
NO_SQLITE ?=
|
||||
NO_WALLET ?=
|
||||
NO_ZMQ ?=
|
||||
NO_UPNP ?=
|
||||
|
@ -233,6 +235,8 @@ $(host_prefix)/share/config.site : config.site.in $(host_prefix)/.stamp_$(final_
|
|||
-e 's|@no_qr@|$(NO_QR)|' \
|
||||
-e 's|@no_zmq@|$(NO_ZMQ)|' \
|
||||
-e 's|@no_wallet@|$(NO_WALLET)|' \
|
||||
-e 's|@no_bdb@|$(NO_BDB)|' \
|
||||
-e 's|@no_sqlite@|$(NO_SQLITE)|' \
|
||||
-e 's|@no_upnp@|$(NO_UPNP)|' \
|
||||
-e 's|@no_natpmp@|$(NO_NATPMP)|' \
|
||||
-e 's|@multiprocess@|$(MULTIPROCESS)|' \
|
||||
|
|
|
@ -38,6 +38,14 @@ if test -z "$enable_wallet" && test -n "@no_wallet@"; then
|
|||
enable_wallet=no
|
||||
fi
|
||||
|
||||
if test -z "$with_bdb" && test -n "@no_bdb@"; then
|
||||
with_bdb=no
|
||||
fi
|
||||
|
||||
if test -z "$with_sqlite" && test -n "@no_sqlite@"; then
|
||||
with_sqlite=no
|
||||
fi
|
||||
|
||||
if test -z "$enable_multiprocess" && test -n "@multiprocess@"; then
|
||||
enable_multiprocess=yes
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue