diff options
author | Andrew Chow <achow101-github@achow101.com> | 2020-10-19 14:17:58 -0400 |
---|---|---|
committer | Andrew Chow <achow101-github@achow101.com> | 2020-11-18 11:56:12 -0500 |
commit | 99309ab3e96a290359b84f9b657c5115aa3470dd (patch) | |
tree | b846ed9614e7bd309e4e2095730f51b6e6d57eab /configure.ac | |
parent | ee47f11f7399ec3a4330ea1f2fc388c7e32959d6 (diff) |
Allow disabling BDB in configure with --without-bdb
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 0ec7935091..60a3b9f2c8 100644 --- a/configure.ac +++ b/configure.ac @@ -126,7 +126,7 @@ AC_ARG_ENABLE([wallet], [AS_HELP_STRING([--disable-wallet], [disable wallet (enabled by default)])], [enable_wallet=$enableval], - [enable_wallet=yes]) + [enable_wallet=auto]) AC_ARG_WITH([sqlite], [AS_HELP_STRING([--with-sqlite=yes|no|auto], @@ -134,6 +134,12 @@ AC_ARG_WITH([sqlite], [use_sqlite=$withval], [use_sqlite=auto]) +AC_ARG_WITH([bdb], + [AS_HELP_STRING([--without-bdb], + [disable bdb wallet support (default is enabled if wallet is enabled)])], + [use_bdb=$withval], + [use_bdb=auto]) + AC_ARG_WITH([miniupnpc], [AS_HELP_STRING([--with-miniupnpc], [enable UPNP (default is yes if libminiupnpc is found)])], @@ -1248,6 +1254,14 @@ if test x$enable_wallet != xno; then fi fi AC_MSG_RESULT([$use_sqlite]) + + dnl Disable wallet if both --without-bdb and --without-sqlite + if test "x$use_bdb$use_sqlite" = "xnono"; then + if test "x$enable_wallet" = "xyes"; then + AC_MSG_ERROR([wallet functionality requested but no BDB or SQLite support available.]) + fi + enable_wallet=no + fi fi dnl Check for libminiupnpc (optional) @@ -1503,6 +1517,7 @@ AC_MSG_CHECKING([if wallet should be enabled]) if test x$enable_wallet != xno; then AC_MSG_RESULT(yes) AC_DEFINE_UNQUOTED([ENABLE_WALLET],[1],[Define to 1 to enable wallet functions]) + enable_wallet=yes else AC_MSG_RESULT(no) @@ -1602,7 +1617,7 @@ AM_CONDITIONAL([TARGET_LINUX], [test x$TARGET_OS = xlinux]) AM_CONDITIONAL([TARGET_WINDOWS], [test x$TARGET_OS = xwindows]) AM_CONDITIONAL([ENABLE_WALLET],[test x$enable_wallet = xyes]) AM_CONDITIONAL([USE_SQLITE], [test "x$use_sqlite" = "xyes"]) -AM_CONDITIONAL([USE_BDB], [true]) +AM_CONDITIONAL([USE_BDB], [test "x$use_bdb" = "xyes"]) AM_CONDITIONAL([ENABLE_TESTS],[test x$BUILD_TEST = xyes]) AM_CONDITIONAL([ENABLE_FUZZ],[test x$enable_fuzz = xyes]) AM_CONDITIONAL([ENABLE_QT],[test x$bitcoin_enable_qt = xyes]) @@ -1669,6 +1684,7 @@ AC_SUBST(SHANI_CXXFLAGS) AC_SUBST(ARM_CRC_CXXFLAGS) AC_SUBST(LIBTOOL_APP_LDFLAGS) AC_SUBST(USE_SQLITE) +AC_SUBST(USE_BDB) AC_SUBST(USE_UPNP) AC_SUBST(USE_QRCODE) AC_SUBST(BOOST_LIBS) @@ -1746,6 +1762,7 @@ echo " multiprocess = $build_multiprocess" echo " with wallet = $enable_wallet" if test "x$enable_wallet" != "xno"; then echo " with sqlite = $use_sqlite" + echo " with bdb = $use_bdb" fi echo " with gui / qt = $bitcoin_enable_qt" if test x$bitcoin_enable_qt != xno; then |