1180
1180
if test x$use_boost = xyes; then
1181
1181
1182
1182
dnl Minimum required Boost version
1183
- define ( MINIMUM_REQUIRED_BOOST , 1.47 .0 )
1183
+ define ( MINIMUM_REQUIRED_BOOST , 1.58 .0 )
1184
1184
1185
- dnl Check for boost libs
1185
+ dnl Check for Boost libs
1186
1186
AX_BOOST_BASE ( [ MINIMUM_REQUIRED_BOOST] )
1187
1187
if test x$want_boost = xno; then
1188
1188
AC_MSG_ERROR ( [ [ only libbitcoinconsensus can be built without boost] ] )
@@ -1196,25 +1196,7 @@ dnl counter implementations. In 1.63 and later the std::atomic approach is defau
1196
1196
m4_pattern_allow ( DBOOST_AC_USE_STD_ATOMIC ) dnl otherwise it's treated like a macro
1197
1197
BOOST_CPPFLAGS="-DBOOST_SP_USE_STD_ATOMIC -DBOOST_AC_USE_STD_ATOMIC $BOOST_CPPFLAGS"
1198
1198
1199
- if test x$use_reduce_exports = xyes; then
1200
- AC_MSG_CHECKING ( [ for working boost reduced exports] )
1201
- TEMP_CPPFLAGS="$CPPFLAGS"
1202
- CPPFLAGS="$BOOST_CPPFLAGS $CPPFLAGS"
1203
- AC_PREPROC_IFELSE ( [ AC_LANG_PROGRAM ( [ [
1204
- @%:@ include <boost/version.hpp>
1205
- ] ] , [ [
1206
- #if BOOST_VERSION >= 104900
1207
- // Everything is okay
1208
- #else
1209
- # error Boost version is too old
1210
- #endif
1211
- ] ] ) ] ,[
1212
- AC_MSG_RESULT ( yes )
1213
- ] ,[
1214
- AC_MSG_ERROR ( [ boost versions < 1.49 are known to be broken with reduced exports. Use --disable-reduce-exports.] )
1215
- ] )
1216
- CPPFLAGS="$TEMP_CPPFLAGS"
1217
- fi
1199
+ BOOST_LIBS="$BOOST_LDFLAGS $BOOST_SYSTEM_LIB $BOOST_FILESYSTEM_LIB $BOOST_THREAD_LIB"
1218
1200
fi
1219
1201
1220
1202
if test x$use_reduce_exports = xyes; then
@@ -1228,7 +1210,6 @@ if test x$use_tests = xyes; then
1228
1210
AC_MSG_ERROR ( hexdump is required for tests )
1229
1211
fi
1230
1212
1231
-
1232
1213
if test x$use_boost = xyes; then
1233
1214
1234
1215
AX_BOOST_UNIT_TEST_FRAMEWORK
@@ -1254,48 +1235,6 @@ if test x$use_tests = xyes; then
1254
1235
fi
1255
1236
fi
1256
1237
1257
- if test x$use_boost = xyes; then
1258
-
1259
- BOOST_LIBS="$BOOST_LDFLAGS $BOOST_SYSTEM_LIB $BOOST_FILESYSTEM_LIB $BOOST_THREAD_LIB"
1260
-
1261
-
1262
- dnl If boost (prior to 1.57) was built without c++11, it emulated scoped enums
1263
- dnl using c++98 constructs. Unfortunately, this implementation detail leaked into
1264
- dnl the abi. This was fixed in 1.57.
1265
-
1266
- dnl When building against that installed version using c++11, the headers pick up
1267
- dnl on the native c++11 scoped enum support and enable it, however it will fail to
1268
- dnl link. This can be worked around by disabling c++11 scoped enums if linking will
1269
- dnl fail.
1270
- dnl BOOST_NO_SCOPED_ENUMS was changed to BOOST_NO_CXX11_SCOPED_ENUMS in 1.51.
1271
-
1272
- TEMP_LIBS="$LIBS"
1273
- LIBS="$BOOST_LIBS $LIBS"
1274
- TEMP_CPPFLAGS="$CPPFLAGS"
1275
- CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
1276
- AC_MSG_CHECKING ( [ for mismatched boost c++11 scoped enums] )
1277
- AC_LINK_IFELSE ( [ AC_LANG_PROGRAM ( [ [
1278
- #include <boost/config.hpp>
1279
- #include <boost/version.hpp>
1280
- #if !defined(BOOST_NO_SCOPED_ENUMS) && !defined(BOOST_NO_CXX11_SCOPED_ENUMS) && BOOST_VERSION < 105700
1281
- #define BOOST_NO_SCOPED_ENUMS
1282
- #define BOOST_NO_CXX11_SCOPED_ENUMS
1283
- #define CHECK
1284
- #endif
1285
- #include <boost/filesystem.hpp>
1286
- ] ] ,[ [
1287
- #if defined(CHECK)
1288
- boost::filesystem::copy_file("foo", "bar");
1289
- #else
1290
- choke;
1291
- #endif
1292
- ] ] ) ] ,
1293
- [ AC_MSG_RESULT ( mismatched ) ; BOOST_CPPFLAGS="$BOOST_CPPFLAGS -DBOOST_NO_SCOPED_ENUMS -DBOOST_NO_CXX11_SCOPED_ENUMS"] , [ AC_MSG_RESULT ( ok ) ] )
1294
- LIBS="$TEMP_LIBS"
1295
- CPPFLAGS="$TEMP_CPPFLAGS"
1296
-
1297
- fi
1298
-
1299
1238
dnl libevent check
1300
1239
1301
1240
if test x$build_bitcoin_cli$build_bitcoind$bitcoin_enable_qt$use_tests$use_bench != xnonononono; then
0 commit comments