aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2023-01-28 17:07:52 +0000
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2023-01-28 17:07:52 +0000
commitd4c59da8d6e3aac14306249aa12332fed55efebd (patch)
treec72be5fbf569cb7b447d7ca8eb98e3c9257b16cf /configure.ac
parent114c5eca77fc3d4b4af812358ed471e7e5166e9d (diff)
downloadbitcoin-d4c59da8d6e3aac14306249aa12332fed55efebd.tar.xz
build: Avoid `BOOST_NO_CXX98_FUNCTION_BASE` macro redefinition
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac8
1 files changed, 5 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 5bc51eb9e3..c4cd91365b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1479,9 +1479,11 @@ if test "$use_boost" = "yes"; then
BOOST_CPPFLAGS="$BOOST_CPPFLAGS -DBOOST_MULTI_INDEX_DISABLE_SERIALIZATION"
dnl Prevent use of std::unary_function, which was removed in C++17,
- dnl and will generate warnings with newer compilers.
- dnl See: https://github.com/boostorg/container_hash/issues/22.
- BOOST_CPPFLAGS="$BOOST_CPPFLAGS -DBOOST_NO_CXX98_FUNCTION_BASE"
+ dnl and will generate warnings with newer compilers for Boost
+ dnl older than 1.80.
+ dnl See: https://github.com/boostorg/config/pull/430.
+ AX_CHECK_PREPROC_FLAG([-DBOOST_NO_CXX98_FUNCTION_BASE], [BOOST_CPPFLAGS="$BOOST_CPPFLAGS -DBOOST_NO_CXX98_FUNCTION_BASE"], [], [$CXXFLAG_WERROR],
+ [AC_LANG_PROGRAM([[#include <boost/config.hpp>]])])
if test "$enable_debug" = "yes" || test "$enable_fuzz" = "yes"; then
BOOST_CPPFLAGS="$BOOST_CPPFLAGS -DBOOST_MULTI_INDEX_ENABLE_SAFE_MODE"