Skip to content

Commit 07a4e3d

Browse files
committed
build: set minimum required Boost to 1.58.0
Ref: bitcoin/bitcoin#19667 Update configure.ac
1 parent 175f734 commit 07a4e3d

File tree

2 files changed

+3
-61
lines changed

2 files changed

+3
-61
lines changed

configure.ac

+3-56
Original file line numberDiff line numberDiff line change
@@ -844,9 +844,9 @@ fi
844844
if test x$use_boost = xyes; then
845845

846846
dnl Minimum required Boost version
847-
define(MINIMUM_REQUIRED_BOOST, 1.47.0)
847+
define(MINIMUM_REQUIRED_BOOST, 1.58.0)
848848

849-
dnl Check for boost libs
849+
dnl Check for Boost libs
850850
AX_BOOST_BASE([MINIMUM_REQUIRED_BOOST])
851851
AX_BOOST_SYSTEM
852852
AX_BOOST_FILESYSTEM
@@ -861,25 +861,7 @@ dnl counter implementations. In 1.63 and later the std::atomic approach is defau
861861
m4_pattern_allow(DBOOST_AC_USE_STD_ATOMIC) dnl otherwise it's treated like a macro
862862
BOOST_CPPFLAGS="-DBOOST_SP_USE_STD_ATOMIC -DBOOST_AC_USE_STD_ATOMIC $BOOST_CPPFLAGS"
863863

864-
if test x$use_reduce_exports = xyes; then
865-
AC_MSG_CHECKING([for working boost reduced exports])
866-
TEMP_CPPFLAGS="$CPPFLAGS"
867-
CPPFLAGS="$BOOST_CPPFLAGS $CPPFLAGS"
868-
AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[
869-
@%:@include <boost/version.hpp>
870-
]], [[
871-
#if BOOST_VERSION >= 104900
872-
// Everything is okay
873-
#else
874-
# error Boost version is too old
875-
#endif
876-
]])],[
877-
AC_MSG_RESULT(yes)
878-
],[
879-
AC_MSG_ERROR([boost versions < 1.49 are known to be broken with reduced exports. Use --disable-reduce-exports.])
880-
])
881-
CPPFLAGS="$TEMP_CPPFLAGS"
882-
fi
864+
BOOST_LIBS="$BOOST_LDFLAGS $BOOST_SYSTEM_LIB $BOOST_FILESYSTEM_LIB $BOOST_THREAD_LIB"
883865
fi
884866

885867
if test x$use_reduce_exports = xyes; then
@@ -923,41 +905,6 @@ if test x$use_boost = xyes; then
923905

924906
BOOST_LIBS="$BOOST_LDFLAGS $BOOST_SYSTEM_LIB $BOOST_FILESYSTEM_LIB $BOOST_ZLIB_LIB $BOOST_IOSTREAMS_LIB $BOOST_PROGRAM_OPTIONS_LIB $BOOST_THREAD_LIB $BOOST_CHRONO_LIB $BOOST_ZLIB_LIB"
925907

926-
dnl If boost (prior to 1.57) was built without c++11, it emulated scoped enums
927-
dnl using c++98 constructs. Unfortunately, this implementation detail leaked into
928-
dnl the abi. This was fixed in 1.57.
929-
930-
dnl When building against that installed version using c++11, the headers pick up
931-
dnl on the native c++11 scoped enum support and enable it, however it will fail to
932-
dnl link. This can be worked around by disabling c++11 scoped enums if linking will
933-
dnl fail.
934-
dnl BOOST_NO_SCOPED_ENUMS was changed to BOOST_NO_CXX11_SCOPED_ENUMS in 1.51.
935-
936-
TEMP_LIBS="$LIBS"
937-
LIBS="$BOOST_LIBS $LIBS"
938-
TEMP_CPPFLAGS="$CPPFLAGS"
939-
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
940-
AC_MSG_CHECKING([for mismatched boost c++11 scoped enums])
941-
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
942-
#include "boost/config.hpp"
943-
#include "boost/version.hpp"
944-
#if !defined(BOOST_NO_SCOPED_ENUMS) && !defined(BOOST_NO_CXX11_SCOPED_ENUMS) && BOOST_VERSION < 105700
945-
#define BOOST_NO_SCOPED_ENUMS
946-
#define BOOST_NO_CXX11_SCOPED_ENUMS
947-
#define CHECK
948-
#endif
949-
#include "boost/filesystem.hpp"
950-
]],[[
951-
#if defined(CHECK)
952-
boost::filesystem::copy_file("foo", "bar");
953-
#else
954-
choke;
955-
#endif
956-
]])],
957-
[AC_MSG_RESULT(mismatched); BOOST_CPPFLAGS="$BOOST_CPPFLAGS -DBOOST_NO_SCOPED_ENUMS -DBOOST_NO_CXX11_SCOPED_ENUMS"], [AC_MSG_RESULT(ok)])
958-
LIBS="$TEMP_LIBS"
959-
CPPFLAGS="$TEMP_CPPFLAGS"
960-
961908
dnl Boost >= 1.50 uses sleep_for rather than the now-deprecated sleep, however
962909
dnl it was broken from 1.50 to 1.52 when backed by nanosleep. Use sleep_for if
963910
dnl a working version is available, else fall back to sleep. sleep was removed

gridcoinresearch.pro

-5
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,6 @@ win32 {
2121
# use: BOOST_THREAD_LIB_SUFFIX=_win32-...
2222
# or when linking against a specific BerkelyDB version: BDB_LIB_SUFFIX=-4.8
2323

24-
# boost-1.55 has a bug where building with C++11 causes undefined references to
25-
# copy_file. This is fixed in boost-1.57 and backported to 1.56. This workaround
26-
# can be removed once boost is upgraded.
27-
DEFINES += BOOST_NO_CXX11_SCOPED_ENUMS
28-
2924
# Dependency library locations can be customized with:
3025
# BOOST_INCLUDE_PATH, BOOST_LIB_PATH, BDB_INCLUDE_PATH,
3126
# BDB_LIB_PATH, OPENSSL_INCLUDE_PATH and OPENSSL_LIB_PATH

0 commit comments

Comments
 (0)