diff --git a/build-aux/m4/bitcoin_find_bdb48.m4 b/build-aux/m4/bitcoin_find_bdb53.m4 rename from build-aux/m4/bitcoin_find_bdb48.m4 rename to build-aux/m4/bitcoin_find_bdb53.m4 --- a/build-aux/m4/bitcoin_find_bdb48.m4 +++ b/build-aux/m4/bitcoin_find_bdb53.m4 @@ -2,7 +2,7 @@ dnl Distributed under the MIT software license, see the accompanying dnl file COPYING or http://www.opensource.org/licenses/mit-license.php. -AC_DEFUN([BITCOIN_FIND_BDB48],[ +AC_DEFUN([BITCOIN_FIND_BDB53],[ AC_ARG_VAR(BDB_CFLAGS, [C compiler flags for BerkeleyDB, bypasses autodetection]) AC_ARG_VAR(BDB_LIBS, [Linker flags for BerkeleyDB, bypasses autodetection]) @@ -10,9 +10,8 @@ AC_MSG_CHECKING([for Berkeley DB C++ headers]) BDB_CPPFLAGS= bdbpath=X - bdb48path=X bdbdirlist= - for _vn in 4.8 48 4 5 ''; do + for _vn in 5.3 6.0 6.1 6.2 ''; do for _pfx in b lib ''; do bdbdirlist="$bdbdirlist ${_pfx}db${_vn}" done @@ -22,8 +21,8 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <${searchpath}db_cxx.h> ]],[[ - #if !((DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 8) || DB_VERSION_MAJOR > 4) - #error "failed to find bdb 4.8+" + #if !((DB_VERSION_MAJOR == 5 && DB_VERSION_MINOR >= 3) || DB_VERSION_MAJOR > 5) + #error "failed to find bdb 5.3+" #endif ]])],[ if test "x$bdbpath" = "xX"; then @@ -32,39 +31,21 @@ ],[ continue ]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #include <${searchpath}db_cxx.h> - ]],[[ - #if !(DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR == 8) - #error "failed to find bdb 4.8" - #endif - ]])],[ - bdb48path="${searchpath}" - break - ],[]) done if test "x$bdbpath" = "xX"; then AC_MSG_RESULT([no]) AC_MSG_ERROR([libdb_cxx headers missing, ]AC_PACKAGE_NAME[ requires this library for wallet functionality (--disable-wallet to disable wallet functionality)]) - elif test "x$bdb48path" = "xX"; then - BITCOIN_SUBDIR_TO_INCLUDE(BDB_CPPFLAGS,[${bdbpath}],db_cxx) - AC_ARG_WITH([incompatible-bdb],[AS_HELP_STRING([--with-incompatible-bdb], [allow using a bdb version other than 4.8])],[ - AC_MSG_WARN([Found Berkeley DB other than 4.8; wallets opened by this build will not be portable!]) - ],[ - AC_MSG_ERROR([Found Berkeley DB other than 4.8, required for portable wallets (--with-incompatible-bdb to ignore or --disable-wallet to disable wallet functionality)]) - ]) else - BITCOIN_SUBDIR_TO_INCLUDE(BDB_CPPFLAGS,[${bdb48path}],db_cxx) - bdbpath="${bdb48path}" + BITCOIN_SUBDIR_TO_INCLUDE(BDB_CPPFLAGS,[${bdbpath}],db_cxx) fi else BDB_CPPFLAGS=${BDB_CFLAGS} fi AC_SUBST(BDB_CPPFLAGS) - + if test "x$BDB_LIBS" = "x"; then # TODO: Ideally this could find the library version and make sure it matches the headers being used - for searchlib in db_cxx-4.8 db_cxx; do + for searchlib in db_cxx-5.3 db_cxx; do AC_CHECK_LIB([$searchlib],[main],[ BDB_LIBS="-l${searchlib}" break diff --git a/configure.ac b/configure.ac --- a/configure.ac +++ b/configure.ac @@ -751,7 +751,7 @@ if test x$enable_wallet != xno; then dnl Check for libdb_cxx only if wallet enabled - BITCOIN_FIND_BDB48 + BITCOIN_FIND_BDB53 fi dnl Check for libminiupnpc (optional) diff --git a/depends/packages/bdb.mk b/depends/packages/bdb.mk --- a/depends/packages/bdb.mk +++ b/depends/packages/bdb.mk @@ -1,8 +1,8 @@ package=bdb -$(package)_version=4.8.30 +$(package)_version=5.3.28 $(package)_download_path=http://download.oracle.com/berkeley-db $(package)_file_name=db-$($(package)_version).NC.tar.gz -$(package)_sha256_hash=12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef +$(package)_sha256_hash=76a25560d9e52a198d37a31440fd07632b5f1f8f9f2b6d5438f4bc3e7c9013ef $(package)_build_subdir=build_unix define $(package)_set_vars @@ -13,8 +13,11 @@ endef define $(package)_preprocess_cmds + cd src &&\ sed -i.old 's/__atomic_compare_exchange/__atomic_compare_exchange_db/' dbinc/atomic.h && \ sed -i.old 's/atomic_init/atomic_init_db/' dbinc/atomic.h mp/mp_region.c mp/mp_mvcc.c mp/mp_fget.c mutex/mut_method.c mutex/mut_tas.c && \ + sed -i.old 's/WinIoCtl.h/winioctl.h/' dbinc/win_db.h &&\ + cd .. &&\ cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub dist endef @@ -23,7 +26,7 @@ endef define $(package)_build_cmds - $(MAKE) libdb_cxx-4.8.a libdb-4.8.a + $(MAKE) libdb_cxx-5.3.a libdb-5.3.a endef define $(package)_stage_cmds