Skip to content

Commit d4c59da

Browse files
committed
build: Avoid BOOST_NO_CXX98_FUNCTION_BASE macro redefinition
1 parent 114c5ec commit d4c59da

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

configure.ac

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1479,9 +1479,11 @@ if test "$use_boost" = "yes"; then
14791479
BOOST_CPPFLAGS="$BOOST_CPPFLAGS -DBOOST_MULTI_INDEX_DISABLE_SERIALIZATION"
14801480

14811481
dnl Prevent use of std::unary_function, which was removed in C++17,
1482-
dnl and will generate warnings with newer compilers.
1483-
dnl See: https://github.com/boostorg/container_hash/issues/22.
1484-
BOOST_CPPFLAGS="$BOOST_CPPFLAGS -DBOOST_NO_CXX98_FUNCTION_BASE"
1482+
dnl and will generate warnings with newer compilers for Boost
1483+
dnl older than 1.80.
1484+
dnl See: https://github.com/boostorg/config/pull/430.
1485+
AX_CHECK_PREPROC_FLAG([-DBOOST_NO_CXX98_FUNCTION_BASE], [BOOST_CPPFLAGS="$BOOST_CPPFLAGS -DBOOST_NO_CXX98_FUNCTION_BASE"], [], [$CXXFLAG_WERROR],
1486+
[AC_LANG_PROGRAM([[#include <boost/config.hpp>]])])
14851487

14861488
if test "$enable_debug" = "yes" || test "$enable_fuzz" = "yes"; then
14871489
BOOST_CPPFLAGS="$BOOST_CPPFLAGS -DBOOST_MULTI_INDEX_ENABLE_SAFE_MODE"

0 commit comments

Comments
 (0)