From da5b433909a4ee2a8730f0e38dc99e71363d4f6c Mon Sep 17 00:00:00 2001 From: Kittywhiskers Van Gogh <63189531+kwvg@users.noreply.github.com> Date: Sat, 28 Jan 2023 17:07:52 +0000 Subject: [PATCH] merge bitcoin#26952: Avoid `BOOST_NO_CXX98_FUNCTION_BASE` macro redefinition --- configure.ac | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 4cafe5ae00..975936501c 100644 --- a/configure.ac +++ b/configure.ac @@ -1471,9 +1471,11 @@ if test x$want_boost = xno; then fi 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 ]])]) dnl Opt-in to Boost Process if test "x$boost_process" != xno; then