Changeset 6dde30


Ignore:
Timestamp:
Jan 24, 2024, 12:09:57 AM (21 months ago)
Author:
Frederik Heber <frederik.heber@…>
Branches:
Candidate_v1.7.0, stable
Children:
d083cc
Parents:
44ce58
git-author:
Frederik Heber <frederik.heber@…> (01/23/24 22:18:58)
git-committer:
Frederik Heber <frederik.heber@…> (01/24/24 00:09:57)
Message:

Copying updates boost over to CodePatterns, JobMarket.

Location:
ThirdParty
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ThirdParty/CodePatterns/m4/boost.m4

    r44ce58 r6dde30  
    2323
    2424m4_define([_BOOST_SERIAL], [m4_translit([
    25 # serial 26
     25# serial 36
    2626], [#
    2727], [])])
     
    289289# BOOST_FIND_LIBS([COMPONENT-NAME], [CANDIDATE-LIB-NAMES],
    290290#                 [PREFERRED-RT-OPT], [HEADER-NAME], [CXX-TEST],
    291 #                 [CXX-PROLOGUE])
     291#                 [CXX-PROLOGUE], [CXX-POST-INCLUDE-PROLOGUE],
     292#                 [ERROR_ON_UNUSABLE])
    292293# --------------------------------------------------------------
    293294# Look for the Boost library COMPONENT-NAME (e.g., `thread', for
     
    296297# libboost_LIB-NAME can link with the code CXX-TEST.  The optional
    297298# argument CXX-PROLOGUE can be used to include some C++ code before
    298 # the `main' function.
     299# the `main' function. The CXX-POST-INCLUDE-PROLOGUE can be used to
     300# include some code before the `main' function, but after the
     301# `#include <HEADER-NAME>'.
    299302#
    300303# Invokes BOOST_FIND_HEADER([HEADER-NAME]) (see above).
     
    310313# ...  If you want to make sure you have a specific version of Boost
    311314# (eg, >= 1.33) you *must* invoke BOOST_REQUIRE before this macro.
     315#
     316# ERROR_ON_UNUSABLE can be set to "no" if the caller does not want their
     317# configure to fail
    312318AC_DEFUN([BOOST_FIND_LIBS],
    313319[AC_REQUIRE([BOOST_REQUIRE])dnl
     
    318324  AC_MSG_NOTICE([Boost not available, not searching for the Boost $1 library])
    319325else
    320 dnl The else branch is huge and wasn't intended on purpose.
     326dnl The else branch is huge and wasn't indented on purpose.
    321327AC_LANG_PUSH([C++])dnl
    322328AS_VAR_PUSHDEF([Boost_lib], [boost_cv_lib_$1])dnl
     
    324330AS_VAR_PUSHDEF([Boost_lib_LDPATH], [boost_cv_lib_$1_LDPATH])dnl
    325331AS_VAR_PUSHDEF([Boost_lib_LIBS], [boost_cv_lib_$1_LIBS])dnl
    326 BOOST_FIND_HEADER([$4])
     332AS_IF([test x"$8" = "xno"], [not_found_header='true'])
     333BOOST_FIND_HEADER([$4], [$not_found_header])
    327334boost_save_CPPFLAGS=$CPPFLAGS
    328335CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
     
    330337               [_BOOST_FIND_LIBS($@)])
    331338case $Boost_lib in #(
     339  (yes) _AC_MSG_LOG_CONFTEST
     340    AC_DEFINE(AS_TR_CPP([HAVE_BOOST_$1]), [1], [Defined if the Boost $1 library is available])dnl
     341    AC_SUBST(AS_TR_CPP([BOOST_$1_LDFLAGS]), [$Boost_lib_LDFLAGS])dnl
     342    AC_SUBST(AS_TR_CPP([BOOST_$1_LDPATH]), [$Boost_lib_LDPATH])dnl
     343    AC_SUBST([BOOST_LDPATH], [$Boost_lib_LDPATH])dnl
     344    AC_SUBST(AS_TR_CPP([BOOST_$1_LIBS]), [$Boost_lib_LIBS])dnl
     345    ;;
    332346  (no) _AC_MSG_LOG_CONFTEST
    333     AC_MSG_ERROR([cannot find the flags to link with Boost $1])
     347    AS_IF([test x"$8" != "xno"], [
     348      AC_MSG_ERROR([cannot find flags to link with the Boost $1 library (libboost-$1)])
     349    ])
    334350    ;;
    335351esac
    336 AC_SUBST(AS_TR_CPP([BOOST_$1_LDFLAGS]), [$Boost_lib_LDFLAGS])dnl
    337 AC_SUBST(AS_TR_CPP([BOOST_$1_LDPATH]), [$Boost_lib_LDPATH])dnl
    338 AC_SUBST([BOOST_LDPATH], [$Boost_lib_LDPATH])dnl
    339 AC_SUBST(AS_TR_CPP([BOOST_$1_LIBS]), [$Boost_lib_LIBS])dnl
    340352CPPFLAGS=$boost_save_CPPFLAGS
    341353AS_VAR_POPDEF([Boost_lib])dnl
     
    350362# BOOST_FIND_LIB([LIB-NAME],
    351363#                [PREFERRED-RT-OPT], [HEADER-NAME], [CXX-TEST],
    352 #                [CXX-PROLOGUE])
     364#                [CXX-PROLOGUE], [CXX-POST-INCLUDE-PROLOGUE],
     365#                [ERROR_ON_UNUSABLE])
    353366# --------------------------------------------------------------
    354367# Backward compatibility wrapper for BOOST_FIND_LIBS.
     368# ERROR_ON_UNUSABLE can be set to "no" if the caller does not want their
     369# configure to fail
    355370AC_DEFUN([BOOST_FIND_LIB],
    356371[BOOST_FIND_LIBS([$1], $@)])
     
    359374# _BOOST_FIND_LIBS([LIB-NAME], [CANDIDATE-LIB-NAMES],
    360375#                 [PREFERRED-RT-OPT], [HEADER-NAME], [CXX-TEST],
    361 #                 [CXX-PROLOGUE])
     376#                 [CXX-PROLOGUE], [CXX-POST-INCLUDE-PROLOGUE],
     377#                 [ERROR_ON_UNUSABLE])
    362378# --------------------------------------------------------------
    363379# Real implementation of BOOST_FIND_LIBS: rely on these local macros:
     
    371387# to enforce -mt (for instance on MacOSX, libboost_thread.dylib
    372388# doesn't exist but there's -obviously- libboost_thread-mt.dylib).
     389#
     390# ERROR_ON_UNUSABLE can be set to "no" if the caller does not want their
     391# configure to fail
    373392AC_DEFUN([_BOOST_FIND_LIBS],
    374393[Boost_lib=no
    375394  case "$3" in #(
    376     (mt | mt-) boost_mt=-mt; boost_rtopt=;; #(
    377     (mt* | mt-*) boost_mt=-mt; boost_rtopt=`expr "X$3" : 'Xmt-*\(.*\)'`;; #(
     395    (mt | mt- | mt-x64) boost_mt=-mt-x64; boost_rtopt=;; #(
     396    (mt* | mt-*) boost_mt=-mt-x64; boost_rtopt=`expr "X$3" : 'Xmt-*\(.*\)'`;; #(
    378397    (*) boost_mt=; boost_rtopt=$3;;
    379398  esac
     
    397416  boost_save_ac_objext=$ac_objext
    398417  # Generate the test file.
    399   AC_LANG_CONFTEST([AC_LANG_PROGRAM([#include <$4>
     418  AC_LANG_CONFTEST([AC_LANG_PROGRAM([$7
     419#include <$4>
    400420$6], [$5])])
    401421dnl Optimization hacks: compiling C++ is slow, especially with Boost.  What
     
    417437  AC_COMPILE_IFELSE([],
    418438    [ac_objext=do_not_rm_me_plz],
    419     [AC_MSG_ERROR([cannot compile a test that uses Boost $1])])
     439    [AS_IF([test x"$8" != x"no"], [
     440       AC_MSG_ERROR([cannot compile a test that uses Boost $1])
     441     ])
     442    ])
    420443  ac_objext=$boost_save_ac_objext
    421444  boost_failed_libs=
     
    425448for boost_tag_ in -$boost_cv_lib_tag ''; do
    426449for boost_ver_ in -$boost_cv_lib_version ''; do
    427 for boost_mt_ in $boost_mt -mt ''; do
     450for boost_mt_ in $boost_mt -mt -mt-x64 ''; do
    428451for boost_rtopt_ in $boost_rtopt '' -d; do
    429   for boost_lib in \
    430     boost_$boost_lib_$boost_tag_$boost_mt_$boost_rtopt_$boost_ver_ \
    431     boost_$boost_lib_$boost_tag_$boost_rtopt_$boost_ver_ \
    432     boost_$boost_lib_$boost_tag_$boost_mt_$boost_ver_ \
    433     boost_$boost_lib_$boost_tag_$boost_ver_
     452  for boost_full_suffix in \
     453    $boost_last_suffix \
     454    x$boost_tag_$boost_mt_$boost_rtopt_$boost_ver_ \
     455    x$boost_tag_$boost_rtopt_$boost_ver_ \
     456    x$boost_tag_$boost_mt_$boost_ver_ \
     457    x$boost_tag_$boost_ver_
    434458  do
     459    boost_real_suffix=`echo "$boost_full_suffix" | sed 's/^x//'`
     460    boost_lib="boost_$boost_lib_$boost_real_suffix"
    435461    # Avoid testing twice the same lib
    436462    case $boost_failed_libs in #(
     
    481507            for boost_cv_rpath_link_ldflag in -Wl,-R, -Wl,-rpath,; do
    482508              LDFLAGS="$boost_save_LDFLAGS -L$boost_ldpath $boost_cv_rpath_link_ldflag$boost_ldpath"
    483               LIBS="$boost_save_LIBS $Boost_lib_LIBS"
     509              LIBS="$Boost_lib_LIBS $boost_save_LIBS"
    484510              _BOOST_AC_LINK_IFELSE([],
    485511                [boost_rpath_link_ldflag_found=yes
     
    497523          Boost_lib_LDFLAGS="-L$boost_ldpath $boost_cv_rpath_link_ldflag$boost_ldpath"
    498524        Boost_lib_LDPATH="$boost_ldpath"
     525        boost_last_suffix="$boost_full_suffix"
    499526        break 7
    500527      else
     
    571598
    572599
     600# BOOST_ATOMIC([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE])
     601# -------------------------------
     602# Look for Boost.Atomic.  For the documentation of PREFERRED-RT-OPT, see the
     603# documentation of BOOST_FIND_LIB above.
     604BOOST_DEFUN([Atomic],
     605[BOOST_FIND_LIB([atomic], [$1],
     606                [boost/atomic.hpp],
     607                [boost::atomic<int> a;],
     608                [ ],
     609                [#ifdef HAVE_UNISTD_H
     610#include <unistd.h>
     611#endif
     612#ifdef HAVE_STDINT_H
     613#include <stdint.h>
     614#endif], [$2])
     615])# BOOST_ATOMIC
     616
     617
    573618# BOOST_BIND()
    574619# ------------
     
    585630
    586631
    587 # BOOST_CHRONO()
     632# BOOST_CHRONO([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE])
    588633# --------------
    589634# Look for Boost.Chrono.
     
    593638# find Boost.System as it didn't exist by then.
    594639if test $boost_major_version -ge 135; then
    595   BOOST_SYSTEM([$1])
     640  BOOST_SYSTEM([$1], [$2])
    596641fi # end of the Boost.System check.
    597642boost_filesystem_save_LIBS=$LIBS
     
    602647BOOST_FIND_LIB([chrono], [$1],
    603648                [boost/chrono.hpp],
    604                 [boost::chrono::thread_clock d;])
     649                [boost::chrono::thread_clock d;], [], [], [$2])
    605650if test $enable_static_boost = yes && test $boost_major_version -ge 135; then
    606651  BOOST_CHRONO_LIBS="$BOOST_CHRONO_LIBS $BOOST_SYSTEM_LIBS"
     
    611656
    612657
    613 # BOOST_CONTEXT([PREFERRED-RT-OPT])
     658# BOOST_CONTEXT([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE])
    614659# -----------------------------------
    615660# Look for Boost.Context.  For the documentation of PREFERRED-RT-OPT, see the
     
    619664# * The signatures of make_fcontext() and jump_fcontext were changed in 1.56.0
    620665# * A dependency on boost_thread appears in 1.57.0
     666# * The implementation details were moved to boost::context::detail in 1.61.0
     667# * 1.61 also introduces execution_context_v2, which is the "lowest common
     668#   denominator" for boost::context presence since then.
     669# * boost::context::fiber was introduced in 1.69 and execution_context_v2 was
     670#   removed in 1.72
    621671BOOST_DEFUN([Context],
    622672[boost_context_save_LIBS=$LIBS
    623673 boost_context_save_LDFLAGS=$LDFLAGS
    624674if test $boost_major_version -ge 157; then
    625   BOOST_THREAD([$1])
     675  BOOST_THREAD([$1], [$2])
    626676  m4_pattern_allow([^BOOST_THREAD_(LIBS|LDFLAGS)$])dnl
    627677  LIBS="$LIBS $BOOST_THREAD_LIBS"
    628678  LDFLAGS="$LDFLAGS $BOOST_THREAD_LDFLAGS"
    629679fi
     680
     681if test $boost_major_version -ge 169; then
     682
    630683BOOST_FIND_LIB([context], [$1],
    631                 [boost/context/all.hpp],[[
     684                [boost/context/fiber.hpp], [[
     685namespace ctx=boost::context;
     686int a;
     687ctx::fiber source{[&a](ctx::fiber&& sink){
     688    a=0;
     689    int b=1;
     690    for(;;){
     691        sink=std::move(sink).resume();
     692        int next=a+b;
     693        a=b;
     694        b=next;
     695    }
     696    return std::move(sink);
     697}};
     698for (int j=0;j<10;++j) {
     699    source=std::move(source).resume();
     700}
     701return a == 34;
     702]], [], [], [$2])
     703
     704elif test $boost_major_version -ge 161; then
     705
     706BOOST_FIND_LIB([context], [$1],
     707                [boost/context/execution_context_v2.hpp], [[
     708namespace ctx=boost::context;
     709int res=0;
     710int n=35;
     711ctx::execution_context<int> source(
     712    [n, &res](ctx::execution_context<int> sink, int) mutable {
     713        int a=0;
     714        int b=1;
     715        while(n-->0){
     716            auto result=sink(a);
     717            sink=std::move(std::get<0>(result));
     718            auto next=a+b;
     719            a=b;
     720            b=next;
     721        }
     722        return sink;
     723    });
     724for(int i=0;i<10;++i){
     725    auto result=source(i);
     726    source=std::move(std::get<0>(result));
     727    res = std::get<1>(result);
     728}
     729return res == 34;
     730]], [], [], [$2])
     731
     732else
     733
     734BOOST_FIND_LIB([context], [$1],
     735                [boost/context/fcontext.hpp],[[
    632736
    633737// creates a stack
     
    684788}
    685789#endif
    686 ])
     790], [], [], [$2])
     791
     792fi
     793
    687794LIBS=$boost_context_save_LIBS
    688795LDFLAGS=$boost_context_save_LDFLAGS
     
    699806
    700807
    701 # BOOST_COROUTINE([PREFERRED-RT-OPT])
     808# BOOST_COROUTINE([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE])
    702809# -----------------------------------
    703810# Look for Boost.Coroutine.  For the documentation of PREFERRED-RT-OPT, see the
     
    709816boost_coroutine_save_LDFLAGS=$LDFLAGS
    710817# Link-time dependency from coroutine to context
    711 BOOST_CONTEXT([$1])
     818BOOST_CONTEXT([$1], [$2])
    712819# Starting from Boost 1.55 a dependency on Boost.System is added
    713820if test $boost_major_version -ge 155; then
    714   BOOST_SYSTEM([$1])
     821  BOOST_SYSTEM([$1], [$2])
    715822fi
    716823m4_pattern_allow([^BOOST_(CONTEXT|SYSTEM)_(LIBS|LDFLAGS)])
     
    720827# in 1.53 coroutine was a header only library
    721828if test $boost_major_version -eq 153; then
    722   BOOST_FIND_HEADER([boost/coroutine/coroutine.hpp])
     829  AS_IF([test x"$2" = "xno"], [not_found_header='true'])
     830  BOOST_FIND_HEADER([boost/coroutine/coroutine.hpp], [$not_found_header])
    723831else
    724832  BOOST_FIND_LIB([coroutine], [$1],
     
    731839  boost::coroutines::asymmetric_coroutine<int>::pull_type coro; coro.get();
    732840  #endif
    733   ])
     841  ], [], [], [$2])
    734842fi
    735843# Link-time dependency from coroutine to context, existed only in 1.53, in 1.54
     
    756864
    757865
    758 # BOOST_DATE_TIME([PREFERRED-RT-OPT])
     866# BOOST_DATE_TIME([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE])
    759867# -----------------------------------
    760868# Look for Boost.Date_Time.  For the documentation of PREFERRED-RT-OPT, see the
     
    763871[BOOST_FIND_LIB([date_time], [$1],
    764872                [boost/date_time/posix_time/posix_time.hpp],
    765                 [boost::posix_time::ptime t;])
     873                [boost::posix_time::ptime t;], [], [], [$2])
    766874])# BOOST_DATE_TIME
    767875
     
    774882
    775883
    776 # BOOST_FILESYSTEM([PREFERRED-RT-OPT])
     884# BOOST_FILESYSTEM([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE])
    777885# ------------------------------------
    778886# Look for Boost.Filesystem.  For the documentation of PREFERRED-RT-OPT, see
     
    785893# find Boost.System as it didn't exist by then.
    786894if test $boost_major_version -ge 135; then
    787   BOOST_SYSTEM([$1])
     895  BOOST_SYSTEM([$1], [$2])
    788896fi # end of the Boost.System check.
    789897boost_filesystem_save_LIBS=$LIBS
     
    793901LDFLAGS="$LDFLAGS $BOOST_SYSTEM_LDFLAGS"
    794902BOOST_FIND_LIB([filesystem], [$1],
    795                 [boost/filesystem/path.hpp], [boost::filesystem::path p;])
     903                [boost/filesystem/path.hpp], [boost::filesystem::path p;],
     904                [], [], [$2])
    796905if test $enable_static_boost = yes && test $boost_major_version -ge 135; then
    797906  BOOST_FILESYSTEM_LIBS="$BOOST_FILESYSTEM_LIBS $BOOST_SYSTEM_LIBS"
     
    853962
    854963
    855 # BOOST_GRAPH([PREFERRED-RT-OPT])
     964# BOOST_GRAPH([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE])
    856965# -------------------------------
    857966# Look for Boost.Graphs.  For the documentation of PREFERRED-RT-OPT, see the
     
    862971# Link-time dependency from graph to regex was added as of 1.40.0.
    863972if test $boost_major_version -ge 140; then
    864   BOOST_REGEX([$1])
     973  BOOST_REGEX([$1], [$2])
    865974  m4_pattern_allow([^BOOST_REGEX_(LIBS|LDFLAGS)$])dnl
    866975  LIBS="$LIBS $BOOST_REGEX_LIBS"
     
    868977fi
    869978BOOST_FIND_LIB([graph], [$1],
    870                 [boost/graph/adjacency_list.hpp], [boost::adjacency_list<> g;])
     979                [boost/graph/adjacency_list.hpp], [boost::adjacency_list<> g;],
     980                [], [], [$2])
    871981LIBS=$boost_graph_save_LIBS
    872982LDFLAGS=$boost_graph_save_LDFLAGS
     
    881991
    882992
    883 # BOOST_IOSTREAMS([PREFERRED-RT-OPT])
     993# BOOST_IOSTREAMS([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE])
    884994# -----------------------------------
    885995# Look for Boost.IOStreams.  For the documentation of PREFERRED-RT-OPT, see the
     
    888998[BOOST_FIND_LIB([iostreams], [$1],
    889999                [boost/iostreams/device/file_descriptor.hpp],
    890                 [boost::iostreams::file_descriptor fd; fd.close();])
     1000                [boost::iostreams::file_descriptor fd; fd.close();],
     1001                [], [], [$2])
    8911002])# BOOST_IOSTREAMS
    8921003
     
    9061017
    9071018
    908 # BOOST_LOCALE()
     1019# BOOST_LOCALE([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE])
    9091020# --------------
    9101021# Look for Boost.Locale
     
    9151026# require SYSTEM for boost-1.50.0 and up
    9161027if test $boost_major_version -ge 150; then
    917   BOOST_SYSTEM([$1])
     1028  BOOST_SYSTEM([$1], [$2])
    9181029  m4_pattern_allow([^BOOST_SYSTEM_(LIBS|LDFLAGS)$])dnl
    9191030  LIBS="$LIBS $BOOST_SYSTEM_LIBS"
     
    9221033BOOST_FIND_LIB([locale], [$1],
    9231034    [boost/locale.hpp],
    924     [[boost::locale::generator gen; std::locale::global(gen(""));]])
     1035    [[boost::locale::generator gen; std::locale::global(gen(""));]], [], [], [$2])
    9251036LIBS=$boost_locale_save_LIBS
    9261037LDFLAGS=$boost_locale_save_LDFLAGS
    9271038])# BOOST_LOCALE
    9281039
    929 # BOOST_LOG([PREFERRED-RT-OPT])
     1040# BOOST_LOG([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE])
    9301041# -----------------------------
    9311042# Look for Boost.Log.  For the documentation of PREFERRED-RT-OPT, see the
     
    9341045[boost_log_save_LIBS=$LIBS
    9351046boost_log_save_LDFLAGS=$LDFLAGS
    936 BOOST_SYSTEM([$1])
    937 BOOST_FILESYSTEM([$1])
    938 BOOST_DATE_TIME([$1])
     1047BOOST_SYSTEM([$1], [$2])
     1048BOOST_FILESYSTEM([$1], [$2])
     1049BOOST_DATE_TIME([$1], [$2])
    9391050m4_pattern_allow([^BOOST_(SYSTEM|FILESYSTEM|DATE_TIME)_(LIBS|LDFLAGS)$])dnl
    9401051LIBS="$LIBS $BOOST_DATE_TIME_LIBS $BOOST_FILESYSTEM_LIBS $BOOST_SYSTEM_LIBS"
     
    9421053BOOST_FIND_LIB([log], [$1],
    9431054    [boost/log/core/core.hpp],
    944     [boost::log::attribute a; a.get_value();])
     1055    [boost::log::attribute a; a.get_value();], [], [], [$2])
    9451056LIBS=$boost_log_save_LIBS
    9461057LDFLAGS=$boost_log_save_LDFLAGS
     
    9481059
    9491060
    950 # BOOST_LOG_SETUP([PREFERRED-RT-OPT])
     1061# BOOST_LOG_SETUP([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE])
    9511062# -----------------------------------
    9521063# Look for Boost.Log.  For the documentation of PREFERRED-RT-OPT, see the
     
    9611072BOOST_FIND_LIB([log_setup], [$1],
    9621073    [boost/log/utility/setup/from_settings.hpp],
    963     [boost::log::basic_settings<char> bs; bs.empty();])
     1074    [boost::log::basic_settings<char> bs; bs.empty();], [], [], [$2])
    9641075LIBS=$boost_log_setup_save_LIBS
    9651076LDFLAGS=$boost_log_setup_save_LDFLAGS
     
    9791090
    9801091
    981 # BOOST_MPI([PREFERRED-RT-OPT])
     1092# BOOST_MPI([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE])
    9821093# -------------------------------
    9831094# Look for Boost MPI.  For the documentation of PREFERRED-RT-OPT, see the
     
    9961107               [int argc = 0;
    9971108                char **argv = 0;
    998                 boost::mpi::environment env(argc,argv);])
     1109                boost::mpi::environment env(argc,argv);],
     1110               [], [], [$2])
    9991111CXX=${boost_save_CXX}
    10001112CXXCPP=${boost_save_CXXCPP}
     
    10391151
    10401152
     1153# BOOST_NUMPY([PREFERRED-RT-OPT])
     1154# --------------------------------
     1155# Look for Boost.Python.Numpy.  For the documentation of PREFERRED-RT-OPT,
     1156# see the documentation of BOOST_FIND_LIB above.
     1157BOOST_DEFUN([Numpy],
     1158[m4_pattern_allow([^BOOST_PYTHON_(LIBS|LDFLAGS)$])dnl
     1159LIBS="$LIBS $BOOST_PYTHON_LIBS $BOOST_PYTHON_LIB"
     1160LDFLAGS="$LDFLAGS $BOOST_PYTHON_LDFLAGS"
     1161CPPFLAGS="$CPPFLAGS $BOOST_PYTHON_CPPFLAGS"
     1162BOOST_FIND_LIBS([numpy], [numpy numpy3], [$1],
     1163                [boost/python/numpy.hpp],
     1164                [ boost::python::numpy::initialize();], [])
     1165CPPFLAGS=$boost_numpy_save_CPPFLAGS
     1166LDFLAGS=$boost_numpy_save_LDFLAGS
     1167LIBS=$boost_numpy_save_LIBS
     1168])# BOOST_NUMPY
     1169
     1170
    10411171# BOOST_OPTIONAL()
    10421172# ----------------
     
    10531183
    10541184
    1055 # BOOST_PROPERTY_TREE([PREFERRED-RT-OPT])
     1185# BOOST_PROPERTY_TREE([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE])
    10561186# -----------------------------------------
    10571187# Look for Boost.Property_Tree.  For the documentation of PREFERRED-RT-OPT,
     
    10601190[BOOST_FIND_LIB([property_tree], [$1],
    10611191                [boost/property_tree/ptree.hpp],
    1062                 [boost::property_tree::ptree pt; boost::property_tree::read_xml d("test", pt);])
     1192                [boost::property_tree::ptree pt; boost::property_tree::read_xml d("test", pt);],
     1193                [], [], [$2])
    10631194])# BOOST_PROPERTY_TREE
    10641195
     
    10911222
    10921223
    1093 # BOOST_PROGRAM_OPTIONS([PREFERRED-RT-OPT])
     1224# BOOST_PROGRAM_OPTIONS([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE])
    10941225# -----------------------------------------
    10951226# Look for Boost.Program_options.  For the documentation of PREFERRED-RT-OPT,
     
    10981229[BOOST_FIND_LIB([program_options], [$1],
    10991230                [boost/program_options.hpp],
    1100                 [boost::program_options::options_description d("test");])
     1231                [boost::program_options::options_description d("test");],
     1232                [], [], [$2])
    11011233])# BOOST_PROGRAM_OPTIONS
    11021234
    11031235
    11041236
    1105 # _BOOST_PYTHON_CONFIG(VARIABLE, FLAG)
     1237# _BOOST_PYTHON_CONFIG(VARIABLE, FLAG, OPT)
    11061238# ------------------------------------
    11071239# Save VARIABLE, and define it via `python-config --FLAG`.
     
    11091241m4_define([_BOOST_PYTHON_CONFIG],
    11101242[AC_SUBST([BOOST_PYTHON_$1],
    1111           [`python-config --$2 2>/dev/null`])dnl
     1243          [$3`python-config --$2 2>/dev/null`])dnl
    11121244boost_python_save_$1=$$1
    11131245$1="$$1 $BOOST_PYTHON_$1"])
    11141246
    11151247
    1116 # BOOST_PYTHON([PREFERRED-RT-OPT])
     1248# BOOST_PYTHON([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE])
    11171249# --------------------------------
    11181250# Look for Boost.Python.  For the documentation of PREFERRED-RT-OPT,
     
    11211253[_BOOST_PYTHON_CONFIG([CPPFLAGS], [includes])
    11221254_BOOST_PYTHON_CONFIG([LDFLAGS],   [ldflags])
    1123 _BOOST_PYTHON_CONFIG([LIBS],      [libs])
     1255_BOOST_PYTHON_CONFIG([LIBS],      [libs], [""])
     1256AC_SUBST([BOOST_PYTHON_LIB], [$BOOST_PYTHON_LIBS])
    11241257m4_pattern_allow([^BOOST_PYTHON_MODULE$])dnl
    11251258BOOST_FIND_LIBS([python], [python python3], [$1],
    11261259                [boost/python.hpp],
    1127                 [], [BOOST_PYTHON_MODULE(empty) {}])
     1260                [], [BOOST_PYTHON_MODULE(empty) {}], [], [$2])
    11281261CPPFLAGS=$boost_python_save_CPPFLAGS
    11291262LDFLAGS=$boost_python_save_LDFLAGS
     
    11391272
    11401273
    1141 # BOOST_REGEX([PREFERRED-RT-OPT])
     1274# BOOST_REGEX([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE])
    11421275# -------------------------------
    11431276# Look for Boost.Regex.  For the documentation of PREFERRED-RT-OPT, see the
     
    11461279[BOOST_FIND_LIB([regex], [$1],
    11471280                [boost/regex.hpp],
    1148                 [boost::regex exp("*"); boost::regex_match("foo", exp);])
     1281                [boost::regex exp("*"); boost::regex_match("foo", exp);],
     1282                [], [], [$2])
    11491283])# BOOST_REGEX
    11501284
    11511285
    1152 # BOOST_SERIALIZATION([PREFERRED-RT-OPT])
     1286# BOOST_SCOPE_EXIT()
     1287# ------------
     1288# Look for Boost.ScopeExit.
     1289BOOST_DEFUN([SCOPE_EXIT],
     1290[BOOST_FIND_HEADER([boost/scope_exit.hpp])])
     1291
     1292
     1293# BOOST_SERIALIZATION([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE])
    11531294# ---------------------------------------
    11541295# Look for Boost.Serialization.  For the documentation of PREFERRED-RT-OPT, see
     
    11581299                [boost/archive/text_oarchive.hpp],
    11591300                [std::ostream* o = 0; // Cheap way to get an ostream...
    1160                 boost::archive::text_oarchive t(*o);])
     1301                boost::archive::text_oarchive t(*o);],
     1302                [], [], [$2])
    11611303])# BOOST_SERIALIZATION
    11621304
    11631305
    1164 # BOOST_SIGNALS([PREFERRED-RT-OPT])
     1306# BOOST_SIGNALS([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE])
    11651307# ---------------------------------
    11661308# Look for Boost.Signals.  For the documentation of PREFERRED-RT-OPT, see the
     
    11691311[BOOST_FIND_LIB([signals], [$1],
    11701312                [boost/signal.hpp],
    1171                 [boost::signal<void ()> s;])
     1313                [boost::signal<void ()> s;],
     1314                [], [], [$2])
    11721315])# BOOST_SIGNALS
    11731316
     
    12051348
    12061349
    1207 # BOOST_SYSTEM([PREFERRED-RT-OPT])
     1350# BOOST_SYSTEM([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE])
    12081351# --------------------------------
    12091352# Look for Boost.System.  For the documentation of PREFERRED-RT-OPT, see the
     
    12131356[BOOST_FIND_LIB([system], [$1],
    12141357                [boost/system/error_code.hpp],
    1215                 [boost::system::error_code e; e.clear();])
     1358                [boost::system::error_code e; e.clear();], [], [], [$2])
    12161359])# BOOST_SYSTEM
    12171360
    12181361
    1219 # BOOST_TEST([PREFERRED-RT-OPT])
     1362# BOOST_TEST([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE])
    12201363# ------------------------------
    12211364# Look for Boost.Test.  For the documentation of PREFERRED-RT-OPT, see the
     
    12271370               [using boost::unit_test::test_suite;
    12281371               test_suite* init_unit_test_suite(int argc, char ** argv)
    1229                { return NULL; }])
     1372               { return NULL; }], [], [$2])
    12301373])# BOOST_TEST
    12311374
    12321375
    1233 # BOOST_THREAD([PREFERRED-RT-OPT])
     1376# BOOST_THREAD([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE])
    12341377# ---------------------------------
    12351378# Look for Boost.Thread.  For the documentation of PREFERRED-RT-OPT, see the
     
    12451388# Link-time dependency from thread to system was added as of 1.49.0.
    12461389if test $boost_major_version -ge 149; then
    1247 BOOST_SYSTEM([$1])
     1390BOOST_SYSTEM([$1], [$2])
    12481391fi # end of the Boost.System check.
    12491392m4_pattern_allow([^BOOST_SYSTEM_(LIBS|LDFLAGS)$])dnl
     
    12641407BOOST_FIND_LIBS([thread], [thread$boost_thread_lib_ext],
    12651408                [$1],
    1266                 [boost/thread.hpp], [boost::thread t; boost::mutex m;])
     1409                [boost/thread.hpp], [boost::thread t; boost::mutex m;], [], [], [$2])
    12671410
    12681411case $host_os in
     
    13401483
    13411484
    1342 # BOOST_WAVE([PREFERRED-RT-OPT])
     1485# BOOST_WAVE([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE])
    13431486# ------------------------------
    13441487# NOTE: If you intend to use Wave/Spirit with thread support, make sure you
     
    13581501BOOST_FIND_LIB([wave], [$1],
    13591502                [boost/wave.hpp],
    1360                 [boost::wave::token_id id; get_token_name(id);])
     1503                [boost::wave::token_id id; get_token_name(id);], [], [], [$2])
    13611504LIBS=$boost_wave_save_LIBS
    13621505LDFLAGS=$boost_wave_save_LDFLAGS
     
    14261569  esac
    14271570  # Generate the test file.
    1428   AC_LANG_CONFTEST([AC_LANG_PROGRAM([#include <pthread.h>],
    1429     [pthread_t th; pthread_join(th, 0);
    1430     pthread_attr_init(0); pthread_cleanup_push(0, 0);
    1431     pthread_create(0,0,0,0); pthread_cleanup_pop(0);])])
     1571  AC_LANG_CONFTEST([AC_LANG_PROGRAM([#include <pthread.h>
     1572    void *f(void*){ return 0; }],
     1573    [pthread_t th; pthread_create(&th,0,f,0); pthread_join(th,0);
     1574    pthread_attr_t attr; pthread_attr_init(&attr); pthread_cleanup_push(0, 0);
     1575    pthread_cleanup_pop(0);])])
    14321576  for boost_pthread_flag in '' $boost_pthread_flags; do
    14331577    boost_pthread_ok=false
     
    14911635  # the same defines as GCC's).
    14921636  for i in \
     1637    "defined __clang__ && __clang_major__ == 12 && __clang_minor__ == 0 @ clang120" \
     1638    "defined __clang__ && __clang_major__ == 11 && __clang_minor__ == 1 @ clang111" \
     1639    "defined __clang__ && __clang_major__ == 11 && __clang_minor__ == 0 @ clang110" \
     1640    "defined __clang__ && __clang_major__ == 10 && __clang_minor__ == 0 @ clang100" \
     1641    "defined __clang__ && __clang_major__ == 9 && __clang_minor__ == 0 @ clang90" \
     1642    "defined __clang__ && __clang_major__ == 8 && __clang_minor__ == 0 @ clang80" \
     1643    "defined __clang__ && __clang_major__ == 7 && __clang_minor__ == 0 @ clang70" \
     1644    "defined __clang__ && __clang_major__ == 6 && __clang_minor__ == 0 @ clang60" \
     1645    "defined __clang__ && __clang_major__ == 5 && __clang_minor__ == 0 @ clang50" \
     1646    "defined __clang__ && __clang_major__ == 4 && __clang_minor__ == 0 @ clang40" \
     1647    "defined __clang__ && __clang_major__ == 3 && __clang_minor__ == 9 @ clang39" \
     1648    "defined __clang__ && __clang_major__ == 3 && __clang_minor__ == 8 @ clang38" \
     1649    "defined __clang__ && __clang_major__ == 3 && __clang_minor__ == 7 @ clang37" \
     1650    _BOOST_mingw_test(11, 1) \
     1651    _BOOST_gcc_test(11, 1) \
     1652    _BOOST_mingw_test(10, 3) \
     1653    _BOOST_gcc_test(10, 3) \
     1654    _BOOST_mingw_test(10, 2) \
     1655    _BOOST_gcc_test(10, 2) \
     1656    _BOOST_mingw_test(10, 1) \
     1657    _BOOST_gcc_test(10, 1) \
     1658    _BOOST_mingw_test(9, 4) \
     1659    _BOOST_gcc_test(9, 4) \
     1660    _BOOST_mingw_test(9, 3) \
     1661    _BOOST_gcc_test(9, 3) \
     1662    _BOOST_mingw_test(9, 2) \
     1663    _BOOST_gcc_test(9, 2) \
     1664    _BOOST_mingw_test(9, 1) \
     1665    _BOOST_gcc_test(9, 1) \
     1666    _BOOST_mingw_test(9, 0) \
     1667    _BOOST_gcc_test(9, 0) \
     1668    _BOOST_mingw_test(8, 5) \
     1669    _BOOST_gcc_test(8, 5) \
     1670    _BOOST_mingw_test(8, 4) \
     1671    _BOOST_gcc_test(8, 4) \
     1672    _BOOST_mingw_test(8, 3) \
     1673    _BOOST_gcc_test(8, 3) \
     1674    _BOOST_mingw_test(8, 2) \
     1675    _BOOST_gcc_test(8, 2) \
     1676    _BOOST_mingw_test(8, 1) \
     1677    _BOOST_gcc_test(8, 1) \
     1678    _BOOST_mingw_test(8, 0) \
     1679    _BOOST_gcc_test(8, 0) \
     1680    _BOOST_mingw_test(7, 5) \
     1681    _BOOST_gcc_test(7, 5) \
     1682    _BOOST_mingw_test(7, 4) \
     1683    _BOOST_gcc_test(7, 4) \
     1684    _BOOST_mingw_test(7, 3) \
     1685    _BOOST_gcc_test(7, 3) \
     1686    _BOOST_mingw_test(7, 2) \
     1687    _BOOST_gcc_test(7, 2) \
     1688    _BOOST_mingw_test(7, 1) \
     1689    _BOOST_gcc_test(7, 1) \
     1690    _BOOST_mingw_test(7, 0) \
     1691    _BOOST_gcc_test(7, 0) \
     1692    _BOOST_mingw_test(6, 5) \
     1693    _BOOST_gcc_test(6, 5) \
     1694    _BOOST_mingw_test(6, 4) \
     1695    _BOOST_gcc_test(6, 4) \
     1696    _BOOST_mingw_test(6, 3) \
     1697    _BOOST_gcc_test(6, 3) \
    14931698    _BOOST_mingw_test(6, 2) \
    14941699    _BOOST_gcc_test(6, 2) \
     
    14971702    _BOOST_mingw_test(6, 0) \
    14981703    _BOOST_gcc_test(6, 0) \
     1704    _BOOST_mingw_test(5, 5) \
     1705    _BOOST_gcc_test(5, 5) \
    14991706    _BOOST_mingw_test(5, 4) \
    15001707    _BOOST_gcc_test(5, 4) \
  • ThirdParty/JobMarket/m4/boost.m4

    r44ce58 r6dde30  
    2323
    2424m4_define([_BOOST_SERIAL], [m4_translit([
    25 # serial 26
     25# serial 36
    2626], [#
    2727], [])])
     
    289289# BOOST_FIND_LIBS([COMPONENT-NAME], [CANDIDATE-LIB-NAMES],
    290290#                 [PREFERRED-RT-OPT], [HEADER-NAME], [CXX-TEST],
    291 #                 [CXX-PROLOGUE])
     291#                 [CXX-PROLOGUE], [CXX-POST-INCLUDE-PROLOGUE],
     292#                 [ERROR_ON_UNUSABLE])
    292293# --------------------------------------------------------------
    293294# Look for the Boost library COMPONENT-NAME (e.g., `thread', for
     
    296297# libboost_LIB-NAME can link with the code CXX-TEST.  The optional
    297298# argument CXX-PROLOGUE can be used to include some C++ code before
    298 # the `main' function.
     299# the `main' function. The CXX-POST-INCLUDE-PROLOGUE can be used to
     300# include some code before the `main' function, but after the
     301# `#include <HEADER-NAME>'.
    299302#
    300303# Invokes BOOST_FIND_HEADER([HEADER-NAME]) (see above).
     
    310313# ...  If you want to make sure you have a specific version of Boost
    311314# (eg, >= 1.33) you *must* invoke BOOST_REQUIRE before this macro.
     315#
     316# ERROR_ON_UNUSABLE can be set to "no" if the caller does not want their
     317# configure to fail
    312318AC_DEFUN([BOOST_FIND_LIBS],
    313319[AC_REQUIRE([BOOST_REQUIRE])dnl
     
    318324  AC_MSG_NOTICE([Boost not available, not searching for the Boost $1 library])
    319325else
    320 dnl The else branch is huge and wasn't intended on purpose.
     326dnl The else branch is huge and wasn't indented on purpose.
    321327AC_LANG_PUSH([C++])dnl
    322328AS_VAR_PUSHDEF([Boost_lib], [boost_cv_lib_$1])dnl
     
    324330AS_VAR_PUSHDEF([Boost_lib_LDPATH], [boost_cv_lib_$1_LDPATH])dnl
    325331AS_VAR_PUSHDEF([Boost_lib_LIBS], [boost_cv_lib_$1_LIBS])dnl
    326 BOOST_FIND_HEADER([$4])
     332AS_IF([test x"$8" = "xno"], [not_found_header='true'])
     333BOOST_FIND_HEADER([$4], [$not_found_header])
    327334boost_save_CPPFLAGS=$CPPFLAGS
    328335CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
     
    330337               [_BOOST_FIND_LIBS($@)])
    331338case $Boost_lib in #(
     339  (yes) _AC_MSG_LOG_CONFTEST
     340    AC_DEFINE(AS_TR_CPP([HAVE_BOOST_$1]), [1], [Defined if the Boost $1 library is available])dnl
     341    AC_SUBST(AS_TR_CPP([BOOST_$1_LDFLAGS]), [$Boost_lib_LDFLAGS])dnl
     342    AC_SUBST(AS_TR_CPP([BOOST_$1_LDPATH]), [$Boost_lib_LDPATH])dnl
     343    AC_SUBST([BOOST_LDPATH], [$Boost_lib_LDPATH])dnl
     344    AC_SUBST(AS_TR_CPP([BOOST_$1_LIBS]), [$Boost_lib_LIBS])dnl
     345    ;;
    332346  (no) _AC_MSG_LOG_CONFTEST
    333     AC_MSG_ERROR([cannot find the flags to link with Boost $1])
     347    AS_IF([test x"$8" != "xno"], [
     348      AC_MSG_ERROR([cannot find flags to link with the Boost $1 library (libboost-$1)])
     349    ])
    334350    ;;
    335351esac
    336 AC_SUBST(AS_TR_CPP([BOOST_$1_LDFLAGS]), [$Boost_lib_LDFLAGS])dnl
    337 AC_SUBST(AS_TR_CPP([BOOST_$1_LDPATH]), [$Boost_lib_LDPATH])dnl
    338 AC_SUBST([BOOST_LDPATH], [$Boost_lib_LDPATH])dnl
    339 AC_SUBST(AS_TR_CPP([BOOST_$1_LIBS]), [$Boost_lib_LIBS])dnl
    340352CPPFLAGS=$boost_save_CPPFLAGS
    341353AS_VAR_POPDEF([Boost_lib])dnl
     
    350362# BOOST_FIND_LIB([LIB-NAME],
    351363#                [PREFERRED-RT-OPT], [HEADER-NAME], [CXX-TEST],
    352 #                [CXX-PROLOGUE])
     364#                [CXX-PROLOGUE], [CXX-POST-INCLUDE-PROLOGUE],
     365#                [ERROR_ON_UNUSABLE])
    353366# --------------------------------------------------------------
    354367# Backward compatibility wrapper for BOOST_FIND_LIBS.
     368# ERROR_ON_UNUSABLE can be set to "no" if the caller does not want their
     369# configure to fail
    355370AC_DEFUN([BOOST_FIND_LIB],
    356371[BOOST_FIND_LIBS([$1], $@)])
     
    359374# _BOOST_FIND_LIBS([LIB-NAME], [CANDIDATE-LIB-NAMES],
    360375#                 [PREFERRED-RT-OPT], [HEADER-NAME], [CXX-TEST],
    361 #                 [CXX-PROLOGUE])
     376#                 [CXX-PROLOGUE], [CXX-POST-INCLUDE-PROLOGUE],
     377#                 [ERROR_ON_UNUSABLE])
    362378# --------------------------------------------------------------
    363379# Real implementation of BOOST_FIND_LIBS: rely on these local macros:
     
    371387# to enforce -mt (for instance on MacOSX, libboost_thread.dylib
    372388# doesn't exist but there's -obviously- libboost_thread-mt.dylib).
     389#
     390# ERROR_ON_UNUSABLE can be set to "no" if the caller does not want their
     391# configure to fail
    373392AC_DEFUN([_BOOST_FIND_LIBS],
    374393[Boost_lib=no
    375394  case "$3" in #(
    376     (mt | mt-) boost_mt=-mt; boost_rtopt=;; #(
    377     (mt* | mt-*) boost_mt=-mt; boost_rtopt=`expr "X$3" : 'Xmt-*\(.*\)'`;; #(
     395    (mt | mt- | mt-x64) boost_mt=-mt-x64; boost_rtopt=;; #(
     396    (mt* | mt-*) boost_mt=-mt-x64; boost_rtopt=`expr "X$3" : 'Xmt-*\(.*\)'`;; #(
    378397    (*) boost_mt=; boost_rtopt=$3;;
    379398  esac
     
    397416  boost_save_ac_objext=$ac_objext
    398417  # Generate the test file.
    399   AC_LANG_CONFTEST([AC_LANG_PROGRAM([#include <$4>
     418  AC_LANG_CONFTEST([AC_LANG_PROGRAM([$7
     419#include <$4>
    400420$6], [$5])])
    401421dnl Optimization hacks: compiling C++ is slow, especially with Boost.  What
     
    417437  AC_COMPILE_IFELSE([],
    418438    [ac_objext=do_not_rm_me_plz],
    419     [AC_MSG_ERROR([cannot compile a test that uses Boost $1])])
     439    [AS_IF([test x"$8" != x"no"], [
     440       AC_MSG_ERROR([cannot compile a test that uses Boost $1])
     441     ])
     442    ])
    420443  ac_objext=$boost_save_ac_objext
    421444  boost_failed_libs=
     
    425448for boost_tag_ in -$boost_cv_lib_tag ''; do
    426449for boost_ver_ in -$boost_cv_lib_version ''; do
    427 for boost_mt_ in $boost_mt -mt ''; do
     450for boost_mt_ in $boost_mt -mt -mt-x64 ''; do
    428451for boost_rtopt_ in $boost_rtopt '' -d; do
    429   for boost_lib in \
    430     boost_$boost_lib_$boost_tag_$boost_mt_$boost_rtopt_$boost_ver_ \
    431     boost_$boost_lib_$boost_tag_$boost_rtopt_$boost_ver_ \
    432     boost_$boost_lib_$boost_tag_$boost_mt_$boost_ver_ \
    433     boost_$boost_lib_$boost_tag_$boost_ver_
     452  for boost_full_suffix in \
     453    $boost_last_suffix \
     454    x$boost_tag_$boost_mt_$boost_rtopt_$boost_ver_ \
     455    x$boost_tag_$boost_rtopt_$boost_ver_ \
     456    x$boost_tag_$boost_mt_$boost_ver_ \
     457    x$boost_tag_$boost_ver_
    434458  do
     459    boost_real_suffix=`echo "$boost_full_suffix" | sed 's/^x//'`
     460    boost_lib="boost_$boost_lib_$boost_real_suffix"
    435461    # Avoid testing twice the same lib
    436462    case $boost_failed_libs in #(
     
    481507            for boost_cv_rpath_link_ldflag in -Wl,-R, -Wl,-rpath,; do
    482508              LDFLAGS="$boost_save_LDFLAGS -L$boost_ldpath $boost_cv_rpath_link_ldflag$boost_ldpath"
    483               LIBS="$boost_save_LIBS $Boost_lib_LIBS"
     509              LIBS="$Boost_lib_LIBS $boost_save_LIBS"
    484510              _BOOST_AC_LINK_IFELSE([],
    485511                [boost_rpath_link_ldflag_found=yes
     
    497523          Boost_lib_LDFLAGS="-L$boost_ldpath $boost_cv_rpath_link_ldflag$boost_ldpath"
    498524        Boost_lib_LDPATH="$boost_ldpath"
     525        boost_last_suffix="$boost_full_suffix"
    499526        break 7
    500527      else
     
    571598
    572599
     600# BOOST_ATOMIC([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE])
     601# -------------------------------
     602# Look for Boost.Atomic.  For the documentation of PREFERRED-RT-OPT, see the
     603# documentation of BOOST_FIND_LIB above.
     604BOOST_DEFUN([Atomic],
     605[BOOST_FIND_LIB([atomic], [$1],
     606                [boost/atomic.hpp],
     607                [boost::atomic<int> a;],
     608                [ ],
     609                [#ifdef HAVE_UNISTD_H
     610#include <unistd.h>
     611#endif
     612#ifdef HAVE_STDINT_H
     613#include <stdint.h>
     614#endif], [$2])
     615])# BOOST_ATOMIC
     616
     617
    573618# BOOST_BIND()
    574619# ------------
     
    585630
    586631
    587 # BOOST_CHRONO()
     632# BOOST_CHRONO([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE])
    588633# --------------
    589634# Look for Boost.Chrono.
     
    593638# find Boost.System as it didn't exist by then.
    594639if test $boost_major_version -ge 135; then
    595   BOOST_SYSTEM([$1])
     640  BOOST_SYSTEM([$1], [$2])
    596641fi # end of the Boost.System check.
    597642boost_filesystem_save_LIBS=$LIBS
     
    602647BOOST_FIND_LIB([chrono], [$1],
    603648                [boost/chrono.hpp],
    604                 [boost::chrono::thread_clock d;])
     649                [boost::chrono::thread_clock d;], [], [], [$2])
    605650if test $enable_static_boost = yes && test $boost_major_version -ge 135; then
    606651  BOOST_CHRONO_LIBS="$BOOST_CHRONO_LIBS $BOOST_SYSTEM_LIBS"
     
    611656
    612657
    613 # BOOST_CONTEXT([PREFERRED-RT-OPT])
     658# BOOST_CONTEXT([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE])
    614659# -----------------------------------
    615660# Look for Boost.Context.  For the documentation of PREFERRED-RT-OPT, see the
     
    619664# * The signatures of make_fcontext() and jump_fcontext were changed in 1.56.0
    620665# * A dependency on boost_thread appears in 1.57.0
     666# * The implementation details were moved to boost::context::detail in 1.61.0
     667# * 1.61 also introduces execution_context_v2, which is the "lowest common
     668#   denominator" for boost::context presence since then.
     669# * boost::context::fiber was introduced in 1.69 and execution_context_v2 was
     670#   removed in 1.72
    621671BOOST_DEFUN([Context],
    622672[boost_context_save_LIBS=$LIBS
    623673 boost_context_save_LDFLAGS=$LDFLAGS
    624674if test $boost_major_version -ge 157; then
    625   BOOST_THREAD([$1])
     675  BOOST_THREAD([$1], [$2])
    626676  m4_pattern_allow([^BOOST_THREAD_(LIBS|LDFLAGS)$])dnl
    627677  LIBS="$LIBS $BOOST_THREAD_LIBS"
    628678  LDFLAGS="$LDFLAGS $BOOST_THREAD_LDFLAGS"
    629679fi
     680
     681if test $boost_major_version -ge 169; then
     682
    630683BOOST_FIND_LIB([context], [$1],
    631                 [boost/context/all.hpp],[[
     684                [boost/context/fiber.hpp], [[
     685namespace ctx=boost::context;
     686int a;
     687ctx::fiber source{[&a](ctx::fiber&& sink){
     688    a=0;
     689    int b=1;
     690    for(;;){
     691        sink=std::move(sink).resume();
     692        int next=a+b;
     693        a=b;
     694        b=next;
     695    }
     696    return std::move(sink);
     697}};
     698for (int j=0;j<10;++j) {
     699    source=std::move(source).resume();
     700}
     701return a == 34;
     702]], [], [], [$2])
     703
     704elif test $boost_major_version -ge 161; then
     705
     706BOOST_FIND_LIB([context], [$1],
     707                [boost/context/execution_context_v2.hpp], [[
     708namespace ctx=boost::context;
     709int res=0;
     710int n=35;
     711ctx::execution_context<int> source(
     712    [n, &res](ctx::execution_context<int> sink, int) mutable {
     713        int a=0;
     714        int b=1;
     715        while(n-->0){
     716            auto result=sink(a);
     717            sink=std::move(std::get<0>(result));
     718            auto next=a+b;
     719            a=b;
     720            b=next;
     721        }
     722        return sink;
     723    });
     724for(int i=0;i<10;++i){
     725    auto result=source(i);
     726    source=std::move(std::get<0>(result));
     727    res = std::get<1>(result);
     728}
     729return res == 34;
     730]], [], [], [$2])
     731
     732else
     733
     734BOOST_FIND_LIB([context], [$1],
     735                [boost/context/fcontext.hpp],[[
    632736
    633737// creates a stack
     
    684788}
    685789#endif
    686 ])
     790], [], [], [$2])
     791
     792fi
     793
    687794LIBS=$boost_context_save_LIBS
    688795LDFLAGS=$boost_context_save_LDFLAGS
     
    699806
    700807
    701 # BOOST_COROUTINE([PREFERRED-RT-OPT])
     808# BOOST_COROUTINE([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE])
    702809# -----------------------------------
    703810# Look for Boost.Coroutine.  For the documentation of PREFERRED-RT-OPT, see the
     
    709816boost_coroutine_save_LDFLAGS=$LDFLAGS
    710817# Link-time dependency from coroutine to context
    711 BOOST_CONTEXT([$1])
     818BOOST_CONTEXT([$1], [$2])
    712819# Starting from Boost 1.55 a dependency on Boost.System is added
    713820if test $boost_major_version -ge 155; then
    714   BOOST_SYSTEM([$1])
     821  BOOST_SYSTEM([$1], [$2])
    715822fi
    716823m4_pattern_allow([^BOOST_(CONTEXT|SYSTEM)_(LIBS|LDFLAGS)])
     
    720827# in 1.53 coroutine was a header only library
    721828if test $boost_major_version -eq 153; then
    722   BOOST_FIND_HEADER([boost/coroutine/coroutine.hpp])
     829  AS_IF([test x"$2" = "xno"], [not_found_header='true'])
     830  BOOST_FIND_HEADER([boost/coroutine/coroutine.hpp], [$not_found_header])
    723831else
    724832  BOOST_FIND_LIB([coroutine], [$1],
     
    731839  boost::coroutines::asymmetric_coroutine<int>::pull_type coro; coro.get();
    732840  #endif
    733   ])
     841  ], [], [], [$2])
    734842fi
    735843# Link-time dependency from coroutine to context, existed only in 1.53, in 1.54
     
    756864
    757865
    758 # BOOST_DATE_TIME([PREFERRED-RT-OPT])
     866# BOOST_DATE_TIME([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE])
    759867# -----------------------------------
    760868# Look for Boost.Date_Time.  For the documentation of PREFERRED-RT-OPT, see the
     
    763871[BOOST_FIND_LIB([date_time], [$1],
    764872                [boost/date_time/posix_time/posix_time.hpp],
    765                 [boost::posix_time::ptime t;])
     873                [boost::posix_time::ptime t;], [], [], [$2])
    766874])# BOOST_DATE_TIME
    767875
     
    774882
    775883
    776 # BOOST_FILESYSTEM([PREFERRED-RT-OPT])
     884# BOOST_FILESYSTEM([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE])
    777885# ------------------------------------
    778886# Look for Boost.Filesystem.  For the documentation of PREFERRED-RT-OPT, see
     
    785893# find Boost.System as it didn't exist by then.
    786894if test $boost_major_version -ge 135; then
    787   BOOST_SYSTEM([$1])
     895  BOOST_SYSTEM([$1], [$2])
    788896fi # end of the Boost.System check.
    789897boost_filesystem_save_LIBS=$LIBS
     
    793901LDFLAGS="$LDFLAGS $BOOST_SYSTEM_LDFLAGS"
    794902BOOST_FIND_LIB([filesystem], [$1],
    795                 [boost/filesystem/path.hpp], [boost::filesystem::path p;])
     903                [boost/filesystem/path.hpp], [boost::filesystem::path p;],
     904                [], [], [$2])
    796905if test $enable_static_boost = yes && test $boost_major_version -ge 135; then
    797906  BOOST_FILESYSTEM_LIBS="$BOOST_FILESYSTEM_LIBS $BOOST_SYSTEM_LIBS"
     
    853962
    854963
    855 # BOOST_GRAPH([PREFERRED-RT-OPT])
     964# BOOST_GRAPH([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE])
    856965# -------------------------------
    857966# Look for Boost.Graphs.  For the documentation of PREFERRED-RT-OPT, see the
     
    862971# Link-time dependency from graph to regex was added as of 1.40.0.
    863972if test $boost_major_version -ge 140; then
    864   BOOST_REGEX([$1])
     973  BOOST_REGEX([$1], [$2])
    865974  m4_pattern_allow([^BOOST_REGEX_(LIBS|LDFLAGS)$])dnl
    866975  LIBS="$LIBS $BOOST_REGEX_LIBS"
     
    868977fi
    869978BOOST_FIND_LIB([graph], [$1],
    870                 [boost/graph/adjacency_list.hpp], [boost::adjacency_list<> g;])
     979                [boost/graph/adjacency_list.hpp], [boost::adjacency_list<> g;],
     980                [], [], [$2])
    871981LIBS=$boost_graph_save_LIBS
    872982LDFLAGS=$boost_graph_save_LDFLAGS
     
    881991
    882992
    883 # BOOST_IOSTREAMS([PREFERRED-RT-OPT])
     993# BOOST_IOSTREAMS([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE])
    884994# -----------------------------------
    885995# Look for Boost.IOStreams.  For the documentation of PREFERRED-RT-OPT, see the
     
    888998[BOOST_FIND_LIB([iostreams], [$1],
    889999                [boost/iostreams/device/file_descriptor.hpp],
    890                 [boost::iostreams::file_descriptor fd; fd.close();])
     1000                [boost::iostreams::file_descriptor fd; fd.close();],
     1001                [], [], [$2])
    8911002])# BOOST_IOSTREAMS
    8921003
     
    9061017
    9071018
    908 # BOOST_LOCALE()
     1019# BOOST_LOCALE([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE])
    9091020# --------------
    9101021# Look for Boost.Locale
     
    9151026# require SYSTEM for boost-1.50.0 and up
    9161027if test $boost_major_version -ge 150; then
    917   BOOST_SYSTEM([$1])
     1028  BOOST_SYSTEM([$1], [$2])
    9181029  m4_pattern_allow([^BOOST_SYSTEM_(LIBS|LDFLAGS)$])dnl
    9191030  LIBS="$LIBS $BOOST_SYSTEM_LIBS"
     
    9221033BOOST_FIND_LIB([locale], [$1],
    9231034    [boost/locale.hpp],
    924     [[boost::locale::generator gen; std::locale::global(gen(""));]])
     1035    [[boost::locale::generator gen; std::locale::global(gen(""));]], [], [], [$2])
    9251036LIBS=$boost_locale_save_LIBS
    9261037LDFLAGS=$boost_locale_save_LDFLAGS
    9271038])# BOOST_LOCALE
    9281039
    929 # BOOST_LOG([PREFERRED-RT-OPT])
     1040# BOOST_LOG([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE])
    9301041# -----------------------------
    9311042# Look for Boost.Log.  For the documentation of PREFERRED-RT-OPT, see the
     
    9341045[boost_log_save_LIBS=$LIBS
    9351046boost_log_save_LDFLAGS=$LDFLAGS
    936 BOOST_SYSTEM([$1])
    937 BOOST_FILESYSTEM([$1])
    938 BOOST_DATE_TIME([$1])
     1047BOOST_SYSTEM([$1], [$2])
     1048BOOST_FILESYSTEM([$1], [$2])
     1049BOOST_DATE_TIME([$1], [$2])
    9391050m4_pattern_allow([^BOOST_(SYSTEM|FILESYSTEM|DATE_TIME)_(LIBS|LDFLAGS)$])dnl
    9401051LIBS="$LIBS $BOOST_DATE_TIME_LIBS $BOOST_FILESYSTEM_LIBS $BOOST_SYSTEM_LIBS"
     
    9421053BOOST_FIND_LIB([log], [$1],
    9431054    [boost/log/core/core.hpp],
    944     [boost::log::attribute a; a.get_value();])
     1055    [boost::log::attribute a; a.get_value();], [], [], [$2])
    9451056LIBS=$boost_log_save_LIBS
    9461057LDFLAGS=$boost_log_save_LDFLAGS
     
    9481059
    9491060
    950 # BOOST_LOG_SETUP([PREFERRED-RT-OPT])
     1061# BOOST_LOG_SETUP([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE])
    9511062# -----------------------------------
    9521063# Look for Boost.Log.  For the documentation of PREFERRED-RT-OPT, see the
     
    9611072BOOST_FIND_LIB([log_setup], [$1],
    9621073    [boost/log/utility/setup/from_settings.hpp],
    963     [boost::log::basic_settings<char> bs; bs.empty();])
     1074    [boost::log::basic_settings<char> bs; bs.empty();], [], [], [$2])
    9641075LIBS=$boost_log_setup_save_LIBS
    9651076LDFLAGS=$boost_log_setup_save_LDFLAGS
     
    9791090
    9801091
    981 # BOOST_MPI([PREFERRED-RT-OPT])
     1092# BOOST_MPI([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE])
    9821093# -------------------------------
    9831094# Look for Boost MPI.  For the documentation of PREFERRED-RT-OPT, see the
     
    9961107               [int argc = 0;
    9971108                char **argv = 0;
    998                 boost::mpi::environment env(argc,argv);])
     1109                boost::mpi::environment env(argc,argv);],
     1110               [], [], [$2])
    9991111CXX=${boost_save_CXX}
    10001112CXXCPP=${boost_save_CXXCPP}
     
    10391151
    10401152
     1153# BOOST_NUMPY([PREFERRED-RT-OPT])
     1154# --------------------------------
     1155# Look for Boost.Python.Numpy.  For the documentation of PREFERRED-RT-OPT,
     1156# see the documentation of BOOST_FIND_LIB above.
     1157BOOST_DEFUN([Numpy],
     1158[m4_pattern_allow([^BOOST_PYTHON_(LIBS|LDFLAGS)$])dnl
     1159LIBS="$LIBS $BOOST_PYTHON_LIBS $BOOST_PYTHON_LIB"
     1160LDFLAGS="$LDFLAGS $BOOST_PYTHON_LDFLAGS"
     1161CPPFLAGS="$CPPFLAGS $BOOST_PYTHON_CPPFLAGS"
     1162BOOST_FIND_LIBS([numpy], [numpy numpy3], [$1],
     1163                [boost/python/numpy.hpp],
     1164                [ boost::python::numpy::initialize();], [])
     1165CPPFLAGS=$boost_numpy_save_CPPFLAGS
     1166LDFLAGS=$boost_numpy_save_LDFLAGS
     1167LIBS=$boost_numpy_save_LIBS
     1168])# BOOST_NUMPY
     1169
     1170
    10411171# BOOST_OPTIONAL()
    10421172# ----------------
     
    10531183
    10541184
    1055 # BOOST_PROPERTY_TREE([PREFERRED-RT-OPT])
     1185# BOOST_PROPERTY_TREE([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE])
    10561186# -----------------------------------------
    10571187# Look for Boost.Property_Tree.  For the documentation of PREFERRED-RT-OPT,
     
    10601190[BOOST_FIND_LIB([property_tree], [$1],
    10611191                [boost/property_tree/ptree.hpp],
    1062                 [boost::property_tree::ptree pt; boost::property_tree::read_xml d("test", pt);])
     1192                [boost::property_tree::ptree pt; boost::property_tree::read_xml d("test", pt);],
     1193                [], [], [$2])
    10631194])# BOOST_PROPERTY_TREE
    10641195
     
    10911222
    10921223
    1093 # BOOST_PROGRAM_OPTIONS([PREFERRED-RT-OPT])
     1224# BOOST_PROGRAM_OPTIONS([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE])
    10941225# -----------------------------------------
    10951226# Look for Boost.Program_options.  For the documentation of PREFERRED-RT-OPT,
     
    10981229[BOOST_FIND_LIB([program_options], [$1],
    10991230                [boost/program_options.hpp],
    1100                 [boost::program_options::options_description d("test");])
     1231                [boost::program_options::options_description d("test");],
     1232                [], [], [$2])
    11011233])# BOOST_PROGRAM_OPTIONS
    11021234
    11031235
    11041236
    1105 # _BOOST_PYTHON_CONFIG(VARIABLE, FLAG)
     1237# _BOOST_PYTHON_CONFIG(VARIABLE, FLAG, OPT)
    11061238# ------------------------------------
    11071239# Save VARIABLE, and define it via `python-config --FLAG`.
     
    11091241m4_define([_BOOST_PYTHON_CONFIG],
    11101242[AC_SUBST([BOOST_PYTHON_$1],
    1111           [`python-config --$2 2>/dev/null`])dnl
     1243          [$3`python-config --$2 2>/dev/null`])dnl
    11121244boost_python_save_$1=$$1
    11131245$1="$$1 $BOOST_PYTHON_$1"])
    11141246
    11151247
    1116 # BOOST_PYTHON([PREFERRED-RT-OPT])
     1248# BOOST_PYTHON([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE])
    11171249# --------------------------------
    11181250# Look for Boost.Python.  For the documentation of PREFERRED-RT-OPT,
     
    11211253[_BOOST_PYTHON_CONFIG([CPPFLAGS], [includes])
    11221254_BOOST_PYTHON_CONFIG([LDFLAGS],   [ldflags])
    1123 _BOOST_PYTHON_CONFIG([LIBS],      [libs])
     1255_BOOST_PYTHON_CONFIG([LIBS],      [libs], [""])
     1256AC_SUBST([BOOST_PYTHON_LIB], [$BOOST_PYTHON_LIBS])
    11241257m4_pattern_allow([^BOOST_PYTHON_MODULE$])dnl
    11251258BOOST_FIND_LIBS([python], [python python3], [$1],
    11261259                [boost/python.hpp],
    1127                 [], [BOOST_PYTHON_MODULE(empty) {}])
     1260                [], [BOOST_PYTHON_MODULE(empty) {}], [], [$2])
    11281261CPPFLAGS=$boost_python_save_CPPFLAGS
    11291262LDFLAGS=$boost_python_save_LDFLAGS
     
    11391272
    11401273
    1141 # BOOST_REGEX([PREFERRED-RT-OPT])
     1274# BOOST_REGEX([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE])
    11421275# -------------------------------
    11431276# Look for Boost.Regex.  For the documentation of PREFERRED-RT-OPT, see the
     
    11461279[BOOST_FIND_LIB([regex], [$1],
    11471280                [boost/regex.hpp],
    1148                 [boost::regex exp("*"); boost::regex_match("foo", exp);])
     1281                [boost::regex exp("*"); boost::regex_match("foo", exp);],
     1282                [], [], [$2])
    11491283])# BOOST_REGEX
    11501284
    11511285
    1152 # BOOST_SERIALIZATION([PREFERRED-RT-OPT])
     1286# BOOST_SCOPE_EXIT()
     1287# ------------
     1288# Look for Boost.ScopeExit.
     1289BOOST_DEFUN([SCOPE_EXIT],
     1290[BOOST_FIND_HEADER([boost/scope_exit.hpp])])
     1291
     1292
     1293# BOOST_SERIALIZATION([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE])
    11531294# ---------------------------------------
    11541295# Look for Boost.Serialization.  For the documentation of PREFERRED-RT-OPT, see
     
    11581299                [boost/archive/text_oarchive.hpp],
    11591300                [std::ostream* o = 0; // Cheap way to get an ostream...
    1160                 boost::archive::text_oarchive t(*o);])
     1301                boost::archive::text_oarchive t(*o);],
     1302                [], [], [$2])
    11611303])# BOOST_SERIALIZATION
    11621304
    11631305
    1164 # BOOST_SIGNALS([PREFERRED-RT-OPT])
     1306# BOOST_SIGNALS([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE])
    11651307# ---------------------------------
    11661308# Look for Boost.Signals.  For the documentation of PREFERRED-RT-OPT, see the
     
    11691311[BOOST_FIND_LIB([signals], [$1],
    11701312                [boost/signal.hpp],
    1171                 [boost::signal<void ()> s;])
     1313                [boost::signal<void ()> s;],
     1314                [], [], [$2])
    11721315])# BOOST_SIGNALS
    11731316
     
    12051348
    12061349
    1207 # BOOST_SYSTEM([PREFERRED-RT-OPT])
     1350# BOOST_SYSTEM([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE])
    12081351# --------------------------------
    12091352# Look for Boost.System.  For the documentation of PREFERRED-RT-OPT, see the
     
    12131356[BOOST_FIND_LIB([system], [$1],
    12141357                [boost/system/error_code.hpp],
    1215                 [boost::system::error_code e; e.clear();])
     1358                [boost::system::error_code e; e.clear();], [], [], [$2])
    12161359])# BOOST_SYSTEM
    12171360
    12181361
    1219 # BOOST_TEST([PREFERRED-RT-OPT])
     1362# BOOST_TEST([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE])
    12201363# ------------------------------
    12211364# Look for Boost.Test.  For the documentation of PREFERRED-RT-OPT, see the
     
    12271370               [using boost::unit_test::test_suite;
    12281371               test_suite* init_unit_test_suite(int argc, char ** argv)
    1229                { return NULL; }])
     1372               { return NULL; }], [], [$2])
    12301373])# BOOST_TEST
    12311374
    12321375
    1233 # BOOST_THREAD([PREFERRED-RT-OPT])
     1376# BOOST_THREAD([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE])
    12341377# ---------------------------------
    12351378# Look for Boost.Thread.  For the documentation of PREFERRED-RT-OPT, see the
     
    12451388# Link-time dependency from thread to system was added as of 1.49.0.
    12461389if test $boost_major_version -ge 149; then
    1247 BOOST_SYSTEM([$1])
     1390BOOST_SYSTEM([$1], [$2])
    12481391fi # end of the Boost.System check.
    12491392m4_pattern_allow([^BOOST_SYSTEM_(LIBS|LDFLAGS)$])dnl
     
    12641407BOOST_FIND_LIBS([thread], [thread$boost_thread_lib_ext],
    12651408                [$1],
    1266                 [boost/thread.hpp], [boost::thread t; boost::mutex m;])
     1409                [boost/thread.hpp], [boost::thread t; boost::mutex m;], [], [], [$2])
    12671410
    12681411case $host_os in
     
    13401483
    13411484
    1342 # BOOST_WAVE([PREFERRED-RT-OPT])
     1485# BOOST_WAVE([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE])
    13431486# ------------------------------
    13441487# NOTE: If you intend to use Wave/Spirit with thread support, make sure you
     
    13581501BOOST_FIND_LIB([wave], [$1],
    13591502                [boost/wave.hpp],
    1360                 [boost::wave::token_id id; get_token_name(id);])
     1503                [boost::wave::token_id id; get_token_name(id);], [], [], [$2])
    13611504LIBS=$boost_wave_save_LIBS
    13621505LDFLAGS=$boost_wave_save_LDFLAGS
     
    14261569  esac
    14271570  # Generate the test file.
    1428   AC_LANG_CONFTEST([AC_LANG_PROGRAM([#include <pthread.h>],
    1429     [pthread_t th; pthread_join(th, 0);
    1430     pthread_attr_init(0); pthread_cleanup_push(0, 0);
    1431     pthread_create(0,0,0,0); pthread_cleanup_pop(0);])])
     1571  AC_LANG_CONFTEST([AC_LANG_PROGRAM([#include <pthread.h>
     1572    void *f(void*){ return 0; }],
     1573    [pthread_t th; pthread_create(&th,0,f,0); pthread_join(th,0);
     1574    pthread_attr_t attr; pthread_attr_init(&attr); pthread_cleanup_push(0, 0);
     1575    pthread_cleanup_pop(0);])])
    14321576  for boost_pthread_flag in '' $boost_pthread_flags; do
    14331577    boost_pthread_ok=false
     
    14911635  # the same defines as GCC's).
    14921636  for i in \
     1637    "defined __clang__ && __clang_major__ == 12 && __clang_minor__ == 0 @ clang120" \
     1638    "defined __clang__ && __clang_major__ == 11 && __clang_minor__ == 1 @ clang111" \
     1639    "defined __clang__ && __clang_major__ == 11 && __clang_minor__ == 0 @ clang110" \
     1640    "defined __clang__ && __clang_major__ == 10 && __clang_minor__ == 0 @ clang100" \
     1641    "defined __clang__ && __clang_major__ == 9 && __clang_minor__ == 0 @ clang90" \
     1642    "defined __clang__ && __clang_major__ == 8 && __clang_minor__ == 0 @ clang80" \
     1643    "defined __clang__ && __clang_major__ == 7 && __clang_minor__ == 0 @ clang70" \
     1644    "defined __clang__ && __clang_major__ == 6 && __clang_minor__ == 0 @ clang60" \
     1645    "defined __clang__ && __clang_major__ == 5 && __clang_minor__ == 0 @ clang50" \
     1646    "defined __clang__ && __clang_major__ == 4 && __clang_minor__ == 0 @ clang40" \
     1647    "defined __clang__ && __clang_major__ == 3 && __clang_minor__ == 9 @ clang39" \
     1648    "defined __clang__ && __clang_major__ == 3 && __clang_minor__ == 8 @ clang38" \
     1649    "defined __clang__ && __clang_major__ == 3 && __clang_minor__ == 7 @ clang37" \
     1650    _BOOST_mingw_test(11, 1) \
     1651    _BOOST_gcc_test(11, 1) \
     1652    _BOOST_mingw_test(10, 3) \
     1653    _BOOST_gcc_test(10, 3) \
     1654    _BOOST_mingw_test(10, 2) \
     1655    _BOOST_gcc_test(10, 2) \
     1656    _BOOST_mingw_test(10, 1) \
     1657    _BOOST_gcc_test(10, 1) \
     1658    _BOOST_mingw_test(9, 4) \
     1659    _BOOST_gcc_test(9, 4) \
     1660    _BOOST_mingw_test(9, 3) \
     1661    _BOOST_gcc_test(9, 3) \
     1662    _BOOST_mingw_test(9, 2) \
     1663    _BOOST_gcc_test(9, 2) \
     1664    _BOOST_mingw_test(9, 1) \
     1665    _BOOST_gcc_test(9, 1) \
     1666    _BOOST_mingw_test(9, 0) \
     1667    _BOOST_gcc_test(9, 0) \
     1668    _BOOST_mingw_test(8, 5) \
     1669    _BOOST_gcc_test(8, 5) \
     1670    _BOOST_mingw_test(8, 4) \
     1671    _BOOST_gcc_test(8, 4) \
     1672    _BOOST_mingw_test(8, 3) \
     1673    _BOOST_gcc_test(8, 3) \
     1674    _BOOST_mingw_test(8, 2) \
     1675    _BOOST_gcc_test(8, 2) \
     1676    _BOOST_mingw_test(8, 1) \
     1677    _BOOST_gcc_test(8, 1) \
     1678    _BOOST_mingw_test(8, 0) \
     1679    _BOOST_gcc_test(8, 0) \
     1680    _BOOST_mingw_test(7, 5) \
     1681    _BOOST_gcc_test(7, 5) \
     1682    _BOOST_mingw_test(7, 4) \
     1683    _BOOST_gcc_test(7, 4) \
     1684    _BOOST_mingw_test(7, 3) \
     1685    _BOOST_gcc_test(7, 3) \
     1686    _BOOST_mingw_test(7, 2) \
     1687    _BOOST_gcc_test(7, 2) \
     1688    _BOOST_mingw_test(7, 1) \
     1689    _BOOST_gcc_test(7, 1) \
     1690    _BOOST_mingw_test(7, 0) \
     1691    _BOOST_gcc_test(7, 0) \
     1692    _BOOST_mingw_test(6, 5) \
     1693    _BOOST_gcc_test(6, 5) \
     1694    _BOOST_mingw_test(6, 4) \
     1695    _BOOST_gcc_test(6, 4) \
     1696    _BOOST_mingw_test(6, 3) \
     1697    _BOOST_gcc_test(6, 3) \
    14931698    _BOOST_mingw_test(6, 2) \
    14941699    _BOOST_gcc_test(6, 2) \
     
    14971702    _BOOST_mingw_test(6, 0) \
    14981703    _BOOST_gcc_test(6, 0) \
     1704    _BOOST_mingw_test(5, 5) \
     1705    _BOOST_gcc_test(5, 5) \
    14991706    _BOOST_mingw_test(5, 4) \
    15001707    _BOOST_gcc_test(5, 4) \
Note: See TracChangeset for help on using the changeset viewer.