]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Fix Boost system lib dependency: it is no longer available since 1.89 16160/head
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Tue, 19 Aug 2025 12:42:12 +0000 (14:42 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Tue, 23 Sep 2025 08:06:25 +0000 (10:06 +0200)
To do that, partly sync with upstream boost.m4

Should fix #15972

Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
(cherry picked from commit e096f48218dd2ea82fc907ff62e4cbced121ca8b)

m4/boost.m4

index 973c447b0fa50756385aed91ef6ed25b6a06dfe2..5b438bae228a00c7726041d18e442c93eaa35233 100644 (file)
@@ -22,7 +22,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 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/version.hpp>
 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