From: Pieter Lexis Date: Wed, 31 Aug 2016 14:22:57 +0000 (+0200) Subject: Rec: support boost's fcontext in boost 1.61+ X-Git-Tag: dnsdist-1.1.0-beta2~163^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a30361f9f07cb3c4f9ad32dc83555bc593aa3311;p=thirdparty%2Fpdns.git Rec: support boost's fcontext in boost 1.61+ --- diff --git a/pdns/mtasker_fcontext.cc b/pdns/mtasker_fcontext.cc index 1b2a11be26..bc37e769f1 100644 --- a/pdns/mtasker_fcontext.cc +++ b/pdns/mtasker_fcontext.cc @@ -23,7 +23,11 @@ #include #include #include +#if BOOST_VERSION > 106100 +#include +#else #include +#endif #include using boost::context::make_fcontext; diff --git a/pdns/recursordist/configure.ac b/pdns/recursordist/configure.ac index 19ad1133c8..1d1500f0f3 100644 --- a/pdns/recursordist/configure.ac +++ b/pdns/recursordist/configure.ac @@ -54,9 +54,15 @@ AC_DEFUN([PDNS_SELECT_CONTEXT_IMPL], [ LDFLAGS="$LDFLAGS $BOOST_THREAD_LDFLAGS" fi AC_MSG_NOTICE([checking whether the Boost context library actually links...]) - BOOST_FIND_HEADER([boost/context/fcontext.hpp], [ : ], [ - BOOST_FIND_LIB([context], [$1], [boost/context/fcontext.hpp], [[]]) - ]) + if test $boost_major_version -ge 161; then + BOOST_FIND_HEADER([boost/context/detail/fcontext.hpp], [ : ], [ + BOOST_FIND_LIB([context], [$1], [boost/context/detail/fcontext.hpp], [[]]) + ]) + else + BOOST_FIND_HEADER([boost/context/fcontext.hpp], [ : ], [ + BOOST_FIND_LIB([context], [$1], [boost/context/fcontext.hpp], [[]]) + ]) + fi case $boost_cv_lib_context in (yes) AC_MSG_NOTICE([MTasker will use the Boost context library for context switching])