From 5ad73d09926591a400e88e426b8dca1ee0d2d132 Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Tue, 19 Aug 2025 14:42:12 +0200 Subject: [PATCH] Fix Boost system lib dependency: it is no longer available since 1.89 To do that, partly sync with upstream boost.m4 Should fix #15972 Signed-off-by: Otto Moerbeek (cherry picked from commit e096f48218dd2ea82fc907ff62e4cbced121ca8b) --- m4/boost.m4 | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/m4/boost.m4 b/m4/boost.m4 index 973c447b0f..5b438bae22 100644 --- a/m4/boost.m4 +++ b/m4/boost.m4 @@ -22,7 +22,7 @@ # along with this program. If not, see . m4_define([_BOOST_SERIAL], [m4_translit([ -# serial 38 +# serial 39 ], [# ], [])]) @@ -226,7 +226,7 @@ AC_LANG_POP([C++])dnl AC_CACHE_CHECK([for Boost's header version], [boost_cv_lib_version], [m4_pattern_allow([^BOOST_LIB_VERSION$])dnl - _BOOST_SED_CPP([[/^boost-lib-version = /{s///;s/[\" ]//g;p;q;}]], + _BOOST_SED_CPP([[/^.*boost-lib-version = /{s///;s/[\" ]//g;p;q;}]], [#include boost-lib-version = BOOST_LIB_VERSION], [boost_cv_lib_version=`cat conftest.i`])]) @@ -1332,11 +1332,16 @@ BOOST_DEFUN([String_Algo], # -------------------------------- # Look for Boost.System. For the documentation of PREFERRED-RT-OPT, see the # documentation of BOOST_FIND_LIB above. This library was introduced in Boost -# 1.35.0. +# 1.35.0 and is header only since 1.70. BOOST_DEFUN([System], -[BOOST_FIND_LIB([system], [$1], +[ +if test $boost_major_version -ge 170; then + BOOST_FIND_HEADER([boost/system/error_code.hpp]) +else + BOOST_FIND_LIB([system], [$1], [boost/system/error_code.hpp], [boost::system::error_code e; e.clear();], [], [], [$2]) +fi ])# BOOST_SYSTEM -- 2.47.3