Changeset aed262


Ignore:
Timestamp:
May 5, 2017, 2:17:22 PM (8 years ago)
Author:
Frederik Heber <frederik.heber@…>
Branches:
Action_Thermostats, Add_AtomRandomPerturbation, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_StructOpt_integration_tests, AutomationFragmentation_failures, Candidate_v1.6.1, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, Docu_Python_wait, EmpiricalPotential_contain_HomologyGraph_documentation, Enhance_userguide, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Example_ManyWaysToTranslateAtom, Exclude_Hydrogens_annealWithBondGraph, Fix_ChronosMutex, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, GeometryObjects, Gui_displays_atomic_force_velocity, IndependentFragmentGrids_IntegrationTest, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, RotateToPrincipalAxisSystem_UndoRedo, StoppableMakroAction, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, Ubuntu_1604_changes
Children:
dabe63
Parents:
ac9dc8
git-author:
Frederik Heber <heber@…> (03/03/17 14:30:09)
git-committer:
Frederik Heber <frederik.heber@…> (05/05/17 14:17:22)
Message:

Upgraded boost.m4 from serial 22 to 26.

Files:
4 edited

Legend:

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

    rac9dc8 raed262  
    2323
    2424m4_define([_BOOST_SERIAL], [m4_translit([
    25 # serial 22
     25# serial 26
    2626], [#
    2727], [])])
     
    7373dnl everything else.
    7474dnl Cannot use 'dnl' after [$4] because a trailing dnl may break AC_CACHE_CHECK
     75dnl
     76dnl Beware that GCC 5, when expanding macros, may embed # line directives
     77dnl a within single line:
     78dnl
     79dnl # 1 "conftest.cc"
     80dnl # 1 "<built-in>"
     81dnl # 1 "<command-line>"
     82dnl # 1 "conftest.cc"
     83dnl # 1 "/opt/local/include/boost/version.hpp" 1 3
     84dnl # 2 "conftest.cc" 2
     85dnl boost-lib-version =
     86dnl # 2 "conftest.cc" 3
     87dnl                    "1_56"
     88dnl
     89dnl So get rid of the # and empty lines, and glue the remaining ones together.
    7590(eval "$ac_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |
     91  grep -v '#' |
     92  grep -v '^[[[:space:]]]*$' |
    7693  tr -d '\r' |
     94  tr -s '\n' ' ' |
    7795  $SED -n -e "$1" >conftest.i 2>&1],
    7896  [$3],
     
    94112# ACTION-IF-NOT-FOUND action if one was supplied.
    95113# Otherwise aborts with an error message.
    96 AC_DEFUN([BOOST_REQUIRE],
     114AC_DEFUN_ONCE([BOOST_REQUIRE],
    97115[AC_REQUIRE([AC_PROG_CXX])dnl
    98116AC_REQUIRE([AC_PROG_GREP])dnl
     
    209227    [boost_cv_lib_version],
    210228    [m4_pattern_allow([^BOOST_LIB_VERSION$])dnl
    211      _BOOST_SED_CPP([/^boost-lib-version = /{s///;s/\"//g;p;q;}],
     229     _BOOST_SED_CPP([[/^boost-lib-version = /{s///;s/[\" ]//g;p;q;}]],
    212230                    [#include <boost/version.hpp>
    213231boost-lib-version = BOOST_LIB_VERSION],
     
    217235    case $boost_major_version in #(
    218236      '' | *[[!0-9]]*)
    219         AC_MSG_ERROR([invalid value: boost_major_version=$boost_major_version])
     237        AC_MSG_ERROR([invalid value: boost_major_version='$boost_major_version'])
    220238        ;;
    221239    esac
     
    517535])
    518536
     537
     538# BOOST_ANY()
     539# ------------
     540# Look for Boost.Any
     541BOOST_DEFUN([Any],
     542[BOOST_FIND_HEADER([boost/any.hpp])])
     543
     544
    519545# BOOST_ARRAY()
    520546# -------------
     
    531557BOOST_FIND_HEADER([boost/asio.hpp])])
    532558
     559# BOOST_BIMAP()
     560# ------------
     561# Look for Boost.Bimap
     562BOOST_DEFUN([Bimap],
     563[BOOST_FIND_HEADER([boost/bimap.hpp])])
     564
     565
     566# BOOST_ASSIGN()
     567# -------------
     568# Look for Boost.Assign
     569BOOST_DEFUN([Assign],
     570[BOOST_FIND_HEADER([boost/assign.hpp])])
     571
    533572
    534573# BOOST_BIND()
     
    537576BOOST_DEFUN([Bind],
    538577[BOOST_FIND_HEADER([boost/bind.hpp])])
     578
     579
     580# BOOST_CAST()
     581# ------------
     582# Look for Boost.Cast
     583BOOST_DEFUN([Cast],
     584[BOOST_FIND_HEADER([boost/cast.hpp])])
    539585
    540586
     
    558604                [boost::chrono::thread_clock d;])
    559605if test $enable_static_boost = yes && test $boost_major_version -ge 135; then
    560   BOOST_FILESYSTEM_LIBS="$BOOST_FILESYSTEM_LIBS $BOOST_SYSTEM_LIBS"
     606  BOOST_CHRONO_LIBS="$BOOST_CHRONO_LIBS $BOOST_SYSTEM_LIBS"
    561607fi
    562608LIBS=$boost_filesystem_save_LIBS
    563609LDFLAGS=$boost_filesystem_save_LDFLAGS
    564610])# BOOST_CHRONO
     611
     612
     613# BOOST_CONTEXT([PREFERRED-RT-OPT])
     614# -----------------------------------
     615# Look for Boost.Context.  For the documentation of PREFERRED-RT-OPT, see the
     616# documentation of BOOST_FIND_LIB above.
     617#
     618# * This library was introduced in Boost 1.51.0
     619# * The signatures of make_fcontext() and jump_fcontext were changed in 1.56.0
     620# * A dependency on boost_thread appears in 1.57.0
     621BOOST_DEFUN([Context],
     622[boost_context_save_LIBS=$LIBS
     623 boost_context_save_LDFLAGS=$LDFLAGS
     624if test $boost_major_version -ge 157; then
     625  BOOST_THREAD([$1])
     626  m4_pattern_allow([^BOOST_THREAD_(LIBS|LDFLAGS)$])dnl
     627  LIBS="$LIBS $BOOST_THREAD_LIBS"
     628  LDFLAGS="$LDFLAGS $BOOST_THREAD_LDFLAGS"
     629fi
     630BOOST_FIND_LIB([context], [$1],
     631                [boost/context/all.hpp],[[
     632
     633// creates a stack
     634void * stack_pointer = new void*[4096];
     635std::size_t const size = sizeof(void*[4096]);
     636
     637#if BOOST_VERSION <= 105100
     638ctx::make_fcontext(&fc, f);
     639return ctx::jump_fcontext(&fcm, &fc, 3) == 6;
     640
     641#else
     642
     643fc = ctx::make_fcontext(stack_pointer, size, f);
     644return ctx::jump_fcontext(&fcm, fc, 3) == 6;
     645
     646#endif
     647
     648
     649]],[dnl
     650
     651#include <boost/version.hpp>
     652#if BOOST_VERSION <= 105100
     653
     654namespace ctx = boost::ctx;
     655
     656static ctx::fcontext_t fcm, fc;
     657
     658static void f(intptr_t i) {
     659    ctx::jump_fcontext(&fc, &fcm, i * 2);
     660}
     661
     662#elif BOOST_VERSION <= 105500
     663
     664namespace ctx = boost::context;
     665
     666// context
     667static ctx::fcontext_t fcm, *fc;
     668
     669// context-function
     670static void f(intptr_t i) {
     671    ctx::jump_fcontext(fc, &fcm, i * 2);
     672}
     673
     674#else
     675
     676namespace ctx = boost::context;
     677
     678// context
     679static ctx::fcontext_t fcm, fc;
     680
     681// context-function
     682static void f(intptr_t i) {
     683    ctx::jump_fcontext(&fc, fcm, i * 2);
     684}
     685#endif
     686])
     687LIBS=$boost_context_save_LIBS
     688LDFLAGS=$boost_context_save_LDFLAGS
     689])# BOOST_CONTEXT
    565690
    566691
     
    572697BOOST_FIND_HEADER([boost/lexical_cast.hpp])
    573698])# BOOST_CONVERSION
     699
     700
     701# BOOST_COROUTINE([PREFERRED-RT-OPT])
     702# -----------------------------------
     703# Look for Boost.Coroutine.  For the documentation of PREFERRED-RT-OPT, see the
     704# documentation of BOOST_FIND_LIB above.  This library was introduced in Boost
     705# 1.53.0
     706BOOST_DEFUN([Coroutine],
     707[
     708boost_coroutine_save_LIBS=$LIBS
     709boost_coroutine_save_LDFLAGS=$LDFLAGS
     710# Link-time dependency from coroutine to context
     711BOOST_CONTEXT([$1])
     712# Starting from Boost 1.55 a dependency on Boost.System is added
     713if test $boost_major_version -ge 155; then
     714  BOOST_SYSTEM([$1])
     715fi
     716m4_pattern_allow([^BOOST_(CONTEXT|SYSTEM)_(LIBS|LDFLAGS)])
     717LIBS="$LIBS $BOOST_CONTEXT_LIBS $BOOST_SYSTEM_LIBS"
     718LDFLAGS="$LDFLAGS $BOOST_CONTEXT_LDFLAGS"
     719
     720# in 1.53 coroutine was a header only library
     721if test $boost_major_version -eq 153; then
     722  BOOST_FIND_HEADER([boost/coroutine/coroutine.hpp])
     723else
     724  BOOST_FIND_LIB([coroutine], [$1],
     725                  [boost/coroutine/coroutine.hpp],
     726                  [
     727  #include <boost/version.hpp>
     728  #if   BOOST_VERSION <= 105500
     729  boost::coroutines::coroutine<int(int)> coro; coro.get();
     730  #else
     731  boost::coroutines::asymmetric_coroutine<int>::pull_type coro; coro.get();
     732  #endif
     733  ])
     734fi
     735# Link-time dependency from coroutine to context, existed only in 1.53, in 1.54
     736# coroutine doesn't use context from its headers but from its library.
     737if test $boost_major_version -eq 153 || test $enable_static_boost = yes && test $boost_major_version -ge 154; then
     738  BOOST_COROUTINE_LIBS="$BOOST_COROUTINE_LIBS $BOOST_CONTEXT_LIBS"
     739  BOOST_COROUTINE_LDFLAGS="$BOOST_COROUTINE_LDFLAGS $BOOST_CONTEXT_LDFLAGS"
     740fi
     741if test $enable_static_boost = yes && test $boost_major_version -ge 155; then
     742  BOOST_COROUTINE_LIBS="$BOOST_COROUTINE_LIBS $BOOST_SYSTEM_LIBS"
     743  BOOST_COROUTINE_LDFLAGS="$BOOST_COROUTINE_LDFLAGS $BOOST_SYSTEM_LDFLAGS"
     744fi
     745LIBS=$boost_coroutine_save_LIBS
     746LDFLAGS=$boost_coroutine_save_LDFLAGS
     747])# BOOST_COROUTINE
    574748
    575749
     
    664838
    665839
     840# BOOST_FUSION()
     841# -----------------
     842# Look for Boost.Fusion
     843BOOST_DEFUN([Fusion],
     844[BOOST_FIND_HEADER([boost/fusion/sequence.hpp])])
     845
     846
    666847# BOOST_GEOMETRY()
    667848# ----------------
     
    677858# documentation of BOOST_FIND_LIB above.
    678859BOOST_DEFUN([Graph],
    679 [BOOST_FIND_LIB([graph], [$1],
     860[boost_graph_save_LIBS=$LIBS
     861boost_graph_save_LDFLAGS=$LDFLAGS
     862# Link-time dependency from graph to regex was added as of 1.40.0.
     863if test $boost_major_version -ge 140; then
     864  BOOST_REGEX([$1])
     865  m4_pattern_allow([^BOOST_REGEX_(LIBS|LDFLAGS)$])dnl
     866  LIBS="$LIBS $BOOST_REGEX_LIBS"
     867  LDFLAGS="$LDFLAGS $BOOST_REGEX_LDFLAGS"
     868fi
     869BOOST_FIND_LIB([graph], [$1],
    680870                [boost/graph/adjacency_list.hpp], [boost::adjacency_list<> g;])
     871LIBS=$boost_graph_save_LIBS
     872LDFLAGS=$boost_graph_save_LDFLAGS
    681873])# BOOST_GRAPH
     874
     875
     876# BOOST_HASH()
     877# ------------
     878# Look for Boost.Functional/Hash
     879BOOST_DEFUN([Hash],
     880[BOOST_FIND_HEADER([boost/functional/hash.hpp])])
    682881
    683882
     
    693892
    694893
    695 # BOOST_HASH()
    696 # ------------
    697 # Look for Boost.Functional/Hash
    698 BOOST_DEFUN([Hash],
    699 [BOOST_FIND_HEADER([boost/functional/hash.hpp])])
    700 
    701 
    702894# BOOST_ITERATOR()
    703895# ------------
     
    714906
    715907
     908# BOOST_LOCALE()
     909# --------------
     910# Look for Boost.Locale
     911BOOST_DEFUN([Locale],
     912[
     913boost_locale_save_LIBS=$LIBS
     914boost_locale_save_LDFLAGS=$LDFLAGS
     915# require SYSTEM for boost-1.50.0 and up
     916if test $boost_major_version -ge 150; then
     917  BOOST_SYSTEM([$1])
     918  m4_pattern_allow([^BOOST_SYSTEM_(LIBS|LDFLAGS)$])dnl
     919  LIBS="$LIBS $BOOST_SYSTEM_LIBS"
     920  LDFLAGS="$LDFLAGS $BOOST_SYSTEM_LDFLAGS"
     921fi # end of the Boost.System check.
     922BOOST_FIND_LIB([locale], [$1],
     923    [boost/locale.hpp],
     924    [[boost::locale::generator gen; std::locale::global(gen(""));]])
     925LIBS=$boost_locale_save_LIBS
     926LDFLAGS=$boost_locale_save_LDFLAGS
     927])# BOOST_LOCALE
     928
    716929# BOOST_LOG([PREFERRED-RT-OPT])
    717930# -----------------------------
     
    719932# documentation of BOOST_FIND_LIB above.
    720933BOOST_DEFUN([Log],
    721 [BOOST_FIND_LIB([log], [$1],
     934[boost_log_save_LIBS=$LIBS
     935boost_log_save_LDFLAGS=$LDFLAGS
     936BOOST_SYSTEM([$1])
     937BOOST_FILESYSTEM([$1])
     938BOOST_DATE_TIME([$1])
     939m4_pattern_allow([^BOOST_(SYSTEM|FILESYSTEM|DATE_TIME)_(LIBS|LDFLAGS)$])dnl
     940LIBS="$LIBS $BOOST_DATE_TIME_LIBS $BOOST_FILESYSTEM_LIBS $BOOST_SYSTEM_LIBS"
     941LDFLAGS="$LDFLAGS $BOOST_DATE_TIME_LDFLAGS $BOOST_FILESYSTEM_LDFLAGS $BOOST_SYSTEM_LDFLAGS"
     942BOOST_FIND_LIB([log], [$1],
    722943    [boost/log/core/core.hpp],
    723944    [boost::log::attribute a; a.get_value();])
     945LIBS=$boost_log_save_LIBS
     946LDFLAGS=$boost_log_save_LDFLAGS
    724947])# BOOST_LOG
    725948
     
    730953# documentation of BOOST_FIND_LIB above.
    731954BOOST_DEFUN([Log_Setup],
    732 [AC_REQUIRE([BOOST_LOG])dnl
     955[boost_log_setup_save_LIBS=$LIBS
     956boost_log_setup_save_LDFLAGS=$LDFLAGS
     957BOOST_LOG([$1])
     958m4_pattern_allow([^BOOST_LOG_(LIBS|LDFLAGS)$])dnl
     959LIBS="$LIBS $BOOST_LOG_LIBS"
     960LDFLAGS="$LDFLAGS $BOOST_LOG_LDFLAGS"
    733961BOOST_FIND_LIB([log_setup], [$1],
    734962    [boost/log/utility/setup/from_settings.hpp],
    735963    [boost::log::basic_settings<char> bs; bs.empty();])
     964LIBS=$boost_log_setup_save_LIBS
     965LDFLAGS=$boost_log_setup_save_LDFLAGS
    736966])# BOOST_LOG_SETUP
    737967
     
    7721002
    7731003
     1004# BOOST_MPL()
     1005# ------------------
     1006# Look for Boost.MPL
     1007BOOST_DEFUN([MPL],
     1008[BOOST_FIND_HEADER([boost/mpl/for_each.hpp])])
     1009
     1010
    7741011# BOOST_MULTIARRAY()
    7751012# ------------------
     
    7771014BOOST_DEFUN([MultiArray],
    7781015[BOOST_FIND_HEADER([boost/multi_array.hpp])])
     1016
     1017
     1018# BOOST_MULTIINDEXCCONTAINER()
     1019# ------------------
     1020# Look for Boost.MultiIndexContainer
     1021BOOST_DEFUN([MultiIndexContainer],
     1022[BOOST_FIND_HEADER([boost/multi_index_container.hpp])])
    7791023
    7801024
     
    8081052[BOOST_FIND_HEADER([boost/preprocessor/repeat.hpp])])
    8091053
     1054
     1055# BOOST_PROPERTY_TREE([PREFERRED-RT-OPT])
     1056# -----------------------------------------
     1057# Look for Boost.Property_Tree.  For the documentation of PREFERRED-RT-OPT,
     1058# see the documentation of BOOST_FIND_LIB above.
     1059BOOST_DEFUN([Property_Tree],
     1060[BOOST_FIND_LIB([property_tree], [$1],
     1061                [boost/property_tree/ptree.hpp],
     1062                [boost::property_tree::ptree pt; boost::property_tree::read_xml d("test", pt);])
     1063])# BOOST_PROPERTY_TREE
     1064
     1065
     1066# BOOST_RANDOM()
     1067# --------------------
     1068# Look for Boost.Random
     1069BOOST_DEFUN([Random],
     1070[BOOST_FIND_HEADER([boost/random/random_number_generator.hpp])])
     1071
     1072
     1073# BOOST_RANGE()
     1074# --------------------
     1075# Look for Boost.Range
     1076BOOST_DEFUN([Range],
     1077[BOOST_FIND_HEADER([boost/range/adaptors.hpp])])
    8101078
    8111079# BOOST_UNORDERED()
     
    9851253
    9861254# When compiling for the Windows platform, the threads library is named
    987 # differently.
    988 case $host_os in
    989   (*mingw*) boost_thread_lib_ext=_win32;;
    990 esac
     1255# differently.  This suffix doesn't exist in new versions of Boost, or
     1256# possibly new versions of GCC on mingw I am assuming it's Boost's change for
     1257# now and I am setting version to 1.48, for lack of knowledge as to when this
     1258# change occurred.
     1259if test $boost_major_version -lt 148; then
     1260  case $host_os in
     1261    (*mingw*) boost_thread_lib_ext=_win32;;
     1262  esac
     1263fi
    9911264BOOST_FIND_LIBS([thread], [thread$boost_thread_lib_ext],
    9921265                [$1],
    9931266                [boost/thread.hpp], [boost::thread t; boost::mutex m;])
    9941267
    995 BOOST_THREAD_LIBS="$BOOST_THREAD_LIBS $BOOST_SYSTEM_LIBS $boost_cv_pthread_flag"
     1268case $host_os in
     1269  (*mingw*) boost_thread_w32_socket_link=-lws2_32;;
     1270esac
     1271
     1272BOOST_THREAD_LIBS="$BOOST_THREAD_LIBS $BOOST_SYSTEM_LIBS $boost_cv_pthread_flag $boost_thread_w32_socket_link"
    9961273BOOST_THREAD_LDFLAGS="$BOOST_SYSTEM_LDFLAGS"
    9971274BOOST_CPPFLAGS="$BOOST_CPPFLAGS $boost_cv_pthread_flag"
     
    11951472[AC_REQUIRE([AC_PROG_CXX])dnl
    11961473AC_REQUIRE([AC_CANONICAL_HOST])dnl
    1197 AC_CACHE_CHECK([for the toolset name used by Boost for $CXX], [boost_cv_lib_tag],
     1474AC_CACHE_CHECK([for the toolset name used by Boost for $CXX],
     1475               [boost_cv_lib_tag],
    11981476[boost_cv_lib_tag=unknown
    11991477if test x$boost_cv_inc_path != xno; then
     
    12131491  # the same defines as GCC's).
    12141492  for i in \
    1215     _BOOST_mingw_test(4,8) \
     1493    _BOOST_mingw_test(6, 2) \
     1494    _BOOST_gcc_test(6, 2) \
     1495    _BOOST_mingw_test(6, 1) \
     1496    _BOOST_gcc_test(6, 1) \
     1497    _BOOST_mingw_test(6, 0) \
     1498    _BOOST_gcc_test(6, 0) \
     1499    _BOOST_mingw_test(5, 3) \
     1500    _BOOST_gcc_test(5, 3) \
     1501    _BOOST_mingw_test(5, 2) \
     1502    _BOOST_gcc_test(5, 2) \
     1503    _BOOST_mingw_test(5, 1) \
     1504    _BOOST_gcc_test(5, 1) \
     1505    _BOOST_mingw_test(5, 0) \
     1506    _BOOST_gcc_test(5, 0) \
     1507    _BOOST_mingw_test(4, 10) \
     1508    _BOOST_gcc_test(4, 10) \
     1509    _BOOST_mingw_test(4, 9) \
     1510    _BOOST_gcc_test(4, 9) \
     1511    _BOOST_mingw_test(4, 8) \
    12161512    _BOOST_gcc_test(4, 8) \
    1217     _BOOST_mingw_test(4,7) \
     1513    _BOOST_mingw_test(4, 7) \
    12181514    _BOOST_gcc_test(4, 7) \
    1219     _BOOST_mingw_test(4,6) \
     1515    _BOOST_mingw_test(4, 6) \
    12201516    _BOOST_gcc_test(4, 6) \
    1221     _BOOST_mingw_test(4,5) \
     1517    _BOOST_mingw_test(4, 5) \
    12221518    _BOOST_gcc_test(4, 5) \
    1223     _BOOST_mingw_test(4,4) \
     1519    _BOOST_mingw_test(4, 4) \
    12241520    _BOOST_gcc_test(4, 4) \
    1225     _BOOST_mingw_test(4,3) \
     1521    _BOOST_mingw_test(4, 3) \
    12261522    _BOOST_gcc_test(4, 3) \
    1227     _BOOST_mingw_test(4,2) \
     1523    _BOOST_mingw_test(4, 2) \
    12281524    _BOOST_gcc_test(4, 2) \
    1229     _BOOST_mingw_test(4,1) \
     1525    _BOOST_mingw_test(4, 1) \
    12301526    _BOOST_gcc_test(4, 1) \
    1231     _BOOST_mingw_test(4,0) \
     1527    _BOOST_mingw_test(4, 0) \
    12321528    _BOOST_gcc_test(4, 0) \
    12331529    "defined __GNUC__ && __GNUC__ == 3 && !defined __ICC \
  • ThirdParty/JobMarket/m4/boost.m4

    rac9dc8 raed262  
    2323
    2424m4_define([_BOOST_SERIAL], [m4_translit([
    25 # serial 22
     25# serial 26
    2626], [#
    2727], [])])
     
    7373dnl everything else.
    7474dnl Cannot use 'dnl' after [$4] because a trailing dnl may break AC_CACHE_CHECK
     75dnl
     76dnl Beware that GCC 5, when expanding macros, may embed # line directives
     77dnl a within single line:
     78dnl
     79dnl # 1 "conftest.cc"
     80dnl # 1 "<built-in>"
     81dnl # 1 "<command-line>"
     82dnl # 1 "conftest.cc"
     83dnl # 1 "/opt/local/include/boost/version.hpp" 1 3
     84dnl # 2 "conftest.cc" 2
     85dnl boost-lib-version =
     86dnl # 2 "conftest.cc" 3
     87dnl                    "1_56"
     88dnl
     89dnl So get rid of the # and empty lines, and glue the remaining ones together.
    7590(eval "$ac_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |
     91  grep -v '#' |
     92  grep -v '^[[[:space:]]]*$' |
    7693  tr -d '\r' |
     94  tr -s '\n' ' ' |
    7795  $SED -n -e "$1" >conftest.i 2>&1],
    7896  [$3],
     
    94112# ACTION-IF-NOT-FOUND action if one was supplied.
    95113# Otherwise aborts with an error message.
    96 AC_DEFUN([BOOST_REQUIRE],
     114AC_DEFUN_ONCE([BOOST_REQUIRE],
    97115[AC_REQUIRE([AC_PROG_CXX])dnl
    98116AC_REQUIRE([AC_PROG_GREP])dnl
     
    209227    [boost_cv_lib_version],
    210228    [m4_pattern_allow([^BOOST_LIB_VERSION$])dnl
    211      _BOOST_SED_CPP([/^boost-lib-version = /{s///;s/\"//g;p;q;}],
     229     _BOOST_SED_CPP([[/^boost-lib-version = /{s///;s/[\" ]//g;p;q;}]],
    212230                    [#include <boost/version.hpp>
    213231boost-lib-version = BOOST_LIB_VERSION],
     
    217235    case $boost_major_version in #(
    218236      '' | *[[!0-9]]*)
    219         AC_MSG_ERROR([invalid value: boost_major_version=$boost_major_version])
     237        AC_MSG_ERROR([invalid value: boost_major_version='$boost_major_version'])
    220238        ;;
    221239    esac
     
    539557BOOST_FIND_HEADER([boost/asio.hpp])])
    540558
     559# BOOST_BIMAP()
     560# ------------
     561# Look for Boost.Bimap
     562BOOST_DEFUN([Bimap],
     563[BOOST_FIND_HEADER([boost/bimap.hpp])])
     564
     565
     566# BOOST_ASSIGN()
     567# -------------
     568# Look for Boost.Assign
     569BOOST_DEFUN([Assign],
     570[BOOST_FIND_HEADER([boost/assign.hpp])])
     571
    541572
    542573# BOOST_BIND()
     
    545576BOOST_DEFUN([Bind],
    546577[BOOST_FIND_HEADER([boost/bind.hpp])])
     578
     579
     580# BOOST_CAST()
     581# ------------
     582# Look for Boost.Cast
     583BOOST_DEFUN([Cast],
     584[BOOST_FIND_HEADER([boost/cast.hpp])])
    547585
    548586
     
    566604                [boost::chrono::thread_clock d;])
    567605if test $enable_static_boost = yes && test $boost_major_version -ge 135; then
    568   BOOST_FILESYSTEM_LIBS="$BOOST_FILESYSTEM_LIBS $BOOST_SYSTEM_LIBS"
     606  BOOST_CHRONO_LIBS="$BOOST_CHRONO_LIBS $BOOST_SYSTEM_LIBS"
    569607fi
    570608LIBS=$boost_filesystem_save_LIBS
    571609LDFLAGS=$boost_filesystem_save_LDFLAGS
    572610])# BOOST_CHRONO
     611
     612
     613# BOOST_CONTEXT([PREFERRED-RT-OPT])
     614# -----------------------------------
     615# Look for Boost.Context.  For the documentation of PREFERRED-RT-OPT, see the
     616# documentation of BOOST_FIND_LIB above.
     617#
     618# * This library was introduced in Boost 1.51.0
     619# * The signatures of make_fcontext() and jump_fcontext were changed in 1.56.0
     620# * A dependency on boost_thread appears in 1.57.0
     621BOOST_DEFUN([Context],
     622[boost_context_save_LIBS=$LIBS
     623 boost_context_save_LDFLAGS=$LDFLAGS
     624if test $boost_major_version -ge 157; then
     625  BOOST_THREAD([$1])
     626  m4_pattern_allow([^BOOST_THREAD_(LIBS|LDFLAGS)$])dnl
     627  LIBS="$LIBS $BOOST_THREAD_LIBS"
     628  LDFLAGS="$LDFLAGS $BOOST_THREAD_LDFLAGS"
     629fi
     630BOOST_FIND_LIB([context], [$1],
     631                [boost/context/all.hpp],[[
     632
     633// creates a stack
     634void * stack_pointer = new void*[4096];
     635std::size_t const size = sizeof(void*[4096]);
     636
     637#if BOOST_VERSION <= 105100
     638ctx::make_fcontext(&fc, f);
     639return ctx::jump_fcontext(&fcm, &fc, 3) == 6;
     640
     641#else
     642
     643fc = ctx::make_fcontext(stack_pointer, size, f);
     644return ctx::jump_fcontext(&fcm, fc, 3) == 6;
     645
     646#endif
     647
     648
     649]],[dnl
     650
     651#include <boost/version.hpp>
     652#if BOOST_VERSION <= 105100
     653
     654namespace ctx = boost::ctx;
     655
     656static ctx::fcontext_t fcm, fc;
     657
     658static void f(intptr_t i) {
     659    ctx::jump_fcontext(&fc, &fcm, i * 2);
     660}
     661
     662#elif BOOST_VERSION <= 105500
     663
     664namespace ctx = boost::context;
     665
     666// context
     667static ctx::fcontext_t fcm, *fc;
     668
     669// context-function
     670static void f(intptr_t i) {
     671    ctx::jump_fcontext(fc, &fcm, i * 2);
     672}
     673
     674#else
     675
     676namespace ctx = boost::context;
     677
     678// context
     679static ctx::fcontext_t fcm, fc;
     680
     681// context-function
     682static void f(intptr_t i) {
     683    ctx::jump_fcontext(&fc, fcm, i * 2);
     684}
     685#endif
     686])
     687LIBS=$boost_context_save_LIBS
     688LDFLAGS=$boost_context_save_LDFLAGS
     689])# BOOST_CONTEXT
    573690
    574691
     
    580697BOOST_FIND_HEADER([boost/lexical_cast.hpp])
    581698])# BOOST_CONVERSION
     699
     700
     701# BOOST_COROUTINE([PREFERRED-RT-OPT])
     702# -----------------------------------
     703# Look for Boost.Coroutine.  For the documentation of PREFERRED-RT-OPT, see the
     704# documentation of BOOST_FIND_LIB above.  This library was introduced in Boost
     705# 1.53.0
     706BOOST_DEFUN([Coroutine],
     707[
     708boost_coroutine_save_LIBS=$LIBS
     709boost_coroutine_save_LDFLAGS=$LDFLAGS
     710# Link-time dependency from coroutine to context
     711BOOST_CONTEXT([$1])
     712# Starting from Boost 1.55 a dependency on Boost.System is added
     713if test $boost_major_version -ge 155; then
     714  BOOST_SYSTEM([$1])
     715fi
     716m4_pattern_allow([^BOOST_(CONTEXT|SYSTEM)_(LIBS|LDFLAGS)])
     717LIBS="$LIBS $BOOST_CONTEXT_LIBS $BOOST_SYSTEM_LIBS"
     718LDFLAGS="$LDFLAGS $BOOST_CONTEXT_LDFLAGS"
     719
     720# in 1.53 coroutine was a header only library
     721if test $boost_major_version -eq 153; then
     722  BOOST_FIND_HEADER([boost/coroutine/coroutine.hpp])
     723else
     724  BOOST_FIND_LIB([coroutine], [$1],
     725                  [boost/coroutine/coroutine.hpp],
     726                  [
     727  #include <boost/version.hpp>
     728  #if   BOOST_VERSION <= 105500
     729  boost::coroutines::coroutine<int(int)> coro; coro.get();
     730  #else
     731  boost::coroutines::asymmetric_coroutine<int>::pull_type coro; coro.get();
     732  #endif
     733  ])
     734fi
     735# Link-time dependency from coroutine to context, existed only in 1.53, in 1.54
     736# coroutine doesn't use context from its headers but from its library.
     737if test $boost_major_version -eq 153 || test $enable_static_boost = yes && test $boost_major_version -ge 154; then
     738  BOOST_COROUTINE_LIBS="$BOOST_COROUTINE_LIBS $BOOST_CONTEXT_LIBS"
     739  BOOST_COROUTINE_LDFLAGS="$BOOST_COROUTINE_LDFLAGS $BOOST_CONTEXT_LDFLAGS"
     740fi
     741if test $enable_static_boost = yes && test $boost_major_version -ge 155; then
     742  BOOST_COROUTINE_LIBS="$BOOST_COROUTINE_LIBS $BOOST_SYSTEM_LIBS"
     743  BOOST_COROUTINE_LDFLAGS="$BOOST_COROUTINE_LDFLAGS $BOOST_SYSTEM_LDFLAGS"
     744fi
     745LIBS=$boost_coroutine_save_LIBS
     746LDFLAGS=$boost_coroutine_save_LDFLAGS
     747])# BOOST_COROUTINE
    582748
    583749
     
    672838
    673839
     840# BOOST_FUSION()
     841# -----------------
     842# Look for Boost.Fusion
     843BOOST_DEFUN([Fusion],
     844[BOOST_FIND_HEADER([boost/fusion/sequence.hpp])])
     845
     846
    674847# BOOST_GEOMETRY()
    675848# ----------------
     
    685858# documentation of BOOST_FIND_LIB above.
    686859BOOST_DEFUN([Graph],
    687 [BOOST_FIND_LIB([graph], [$1],
     860[boost_graph_save_LIBS=$LIBS
     861boost_graph_save_LDFLAGS=$LDFLAGS
     862# Link-time dependency from graph to regex was added as of 1.40.0.
     863if test $boost_major_version -ge 140; then
     864  BOOST_REGEX([$1])
     865  m4_pattern_allow([^BOOST_REGEX_(LIBS|LDFLAGS)$])dnl
     866  LIBS="$LIBS $BOOST_REGEX_LIBS"
     867  LDFLAGS="$LDFLAGS $BOOST_REGEX_LDFLAGS"
     868fi
     869BOOST_FIND_LIB([graph], [$1],
    688870                [boost/graph/adjacency_list.hpp], [boost::adjacency_list<> g;])
     871LIBS=$boost_graph_save_LIBS
     872LDFLAGS=$boost_graph_save_LDFLAGS
    689873])# BOOST_GRAPH
     874
     875
     876# BOOST_HASH()
     877# ------------
     878# Look for Boost.Functional/Hash
     879BOOST_DEFUN([Hash],
     880[BOOST_FIND_HEADER([boost/functional/hash.hpp])])
    690881
    691882
     
    701892
    702893
    703 # BOOST_HASH()
    704 # ------------
    705 # Look for Boost.Functional/Hash
    706 BOOST_DEFUN([Hash],
    707 [BOOST_FIND_HEADER([boost/functional/hash.hpp])])
    708 
    709 
    710894# BOOST_ITERATOR()
    711895# ------------
     
    722906
    723907
     908# BOOST_LOCALE()
     909# --------------
     910# Look for Boost.Locale
     911BOOST_DEFUN([Locale],
     912[
     913boost_locale_save_LIBS=$LIBS
     914boost_locale_save_LDFLAGS=$LDFLAGS
     915# require SYSTEM for boost-1.50.0 and up
     916if test $boost_major_version -ge 150; then
     917  BOOST_SYSTEM([$1])
     918  m4_pattern_allow([^BOOST_SYSTEM_(LIBS|LDFLAGS)$])dnl
     919  LIBS="$LIBS $BOOST_SYSTEM_LIBS"
     920  LDFLAGS="$LDFLAGS $BOOST_SYSTEM_LDFLAGS"
     921fi # end of the Boost.System check.
     922BOOST_FIND_LIB([locale], [$1],
     923    [boost/locale.hpp],
     924    [[boost::locale::generator gen; std::locale::global(gen(""));]])
     925LIBS=$boost_locale_save_LIBS
     926LDFLAGS=$boost_locale_save_LDFLAGS
     927])# BOOST_LOCALE
     928
    724929# BOOST_LOG([PREFERRED-RT-OPT])
    725930# -----------------------------
     
    727932# documentation of BOOST_FIND_LIB above.
    728933BOOST_DEFUN([Log],
    729 [BOOST_FIND_LIB([log], [$1],
     934[boost_log_save_LIBS=$LIBS
     935boost_log_save_LDFLAGS=$LDFLAGS
     936BOOST_SYSTEM([$1])
     937BOOST_FILESYSTEM([$1])
     938BOOST_DATE_TIME([$1])
     939m4_pattern_allow([^BOOST_(SYSTEM|FILESYSTEM|DATE_TIME)_(LIBS|LDFLAGS)$])dnl
     940LIBS="$LIBS $BOOST_DATE_TIME_LIBS $BOOST_FILESYSTEM_LIBS $BOOST_SYSTEM_LIBS"
     941LDFLAGS="$LDFLAGS $BOOST_DATE_TIME_LDFLAGS $BOOST_FILESYSTEM_LDFLAGS $BOOST_SYSTEM_LDFLAGS"
     942BOOST_FIND_LIB([log], [$1],
    730943    [boost/log/core/core.hpp],
    731944    [boost::log::attribute a; a.get_value();])
     945LIBS=$boost_log_save_LIBS
     946LDFLAGS=$boost_log_save_LDFLAGS
    732947])# BOOST_LOG
    733948
     
    738953# documentation of BOOST_FIND_LIB above.
    739954BOOST_DEFUN([Log_Setup],
    740 [AC_REQUIRE([BOOST_LOG])dnl
     955[boost_log_setup_save_LIBS=$LIBS
     956boost_log_setup_save_LDFLAGS=$LDFLAGS
     957BOOST_LOG([$1])
     958m4_pattern_allow([^BOOST_LOG_(LIBS|LDFLAGS)$])dnl
     959LIBS="$LIBS $BOOST_LOG_LIBS"
     960LDFLAGS="$LDFLAGS $BOOST_LOG_LDFLAGS"
    741961BOOST_FIND_LIB([log_setup], [$1],
    742962    [boost/log/utility/setup/from_settings.hpp],
    743963    [boost::log::basic_settings<char> bs; bs.empty();])
     964LIBS=$boost_log_setup_save_LIBS
     965LDFLAGS=$boost_log_setup_save_LDFLAGS
    744966])# BOOST_LOG_SETUP
    745967
     
    7801002
    7811003
     1004# BOOST_MPL()
     1005# ------------------
     1006# Look for Boost.MPL
     1007BOOST_DEFUN([MPL],
     1008[BOOST_FIND_HEADER([boost/mpl/for_each.hpp])])
     1009
     1010
    7821011# BOOST_MULTIARRAY()
    7831012# ------------------
     
    7851014BOOST_DEFUN([MultiArray],
    7861015[BOOST_FIND_HEADER([boost/multi_array.hpp])])
     1016
     1017
     1018# BOOST_MULTIINDEXCCONTAINER()
     1019# ------------------
     1020# Look for Boost.MultiIndexContainer
     1021BOOST_DEFUN([MultiIndexContainer],
     1022[BOOST_FIND_HEADER([boost/multi_index_container.hpp])])
    7871023
    7881024
     
    8341070[BOOST_FIND_HEADER([boost/random/random_number_generator.hpp])])
    8351071
     1072
     1073# BOOST_RANGE()
     1074# --------------------
     1075# Look for Boost.Range
     1076BOOST_DEFUN([Range],
     1077[BOOST_FIND_HEADER([boost/range/adaptors.hpp])])
    8361078
    8371079# BOOST_UNORDERED()
     
    10111253
    10121254# When compiling for the Windows platform, the threads library is named
    1013 # differently.
    1014 case $host_os in
    1015   (*mingw*) boost_thread_lib_ext=_win32;;
    1016 esac
     1255# differently.  This suffix doesn't exist in new versions of Boost, or
     1256# possibly new versions of GCC on mingw I am assuming it's Boost's change for
     1257# now and I am setting version to 1.48, for lack of knowledge as to when this
     1258# change occurred.
     1259if test $boost_major_version -lt 148; then
     1260  case $host_os in
     1261    (*mingw*) boost_thread_lib_ext=_win32;;
     1262  esac
     1263fi
    10171264BOOST_FIND_LIBS([thread], [thread$boost_thread_lib_ext],
    10181265                [$1],
    10191266                [boost/thread.hpp], [boost::thread t; boost::mutex m;])
    10201267
    1021 BOOST_THREAD_LIBS="$BOOST_THREAD_LIBS $BOOST_SYSTEM_LIBS $boost_cv_pthread_flag"
     1268case $host_os in
     1269  (*mingw*) boost_thread_w32_socket_link=-lws2_32;;
     1270esac
     1271
     1272BOOST_THREAD_LIBS="$BOOST_THREAD_LIBS $BOOST_SYSTEM_LIBS $boost_cv_pthread_flag $boost_thread_w32_socket_link"
    10221273BOOST_THREAD_LDFLAGS="$BOOST_SYSTEM_LDFLAGS"
    10231274BOOST_CPPFLAGS="$BOOST_CPPFLAGS $boost_cv_pthread_flag"
     
    12211472[AC_REQUIRE([AC_PROG_CXX])dnl
    12221473AC_REQUIRE([AC_CANONICAL_HOST])dnl
    1223 AC_CACHE_CHECK([for the toolset name used by Boost for $CXX], [boost_cv_lib_tag],
     1474AC_CACHE_CHECK([for the toolset name used by Boost for $CXX],
     1475               [boost_cv_lib_tag],
    12241476[boost_cv_lib_tag=unknown
    12251477if test x$boost_cv_inc_path != xno; then
     
    12391491  # the same defines as GCC's).
    12401492  for i in \
    1241     _BOOST_mingw_test(4,8) \
     1493    _BOOST_mingw_test(6, 2) \
     1494    _BOOST_gcc_test(6, 2) \
     1495    _BOOST_mingw_test(6, 1) \
     1496    _BOOST_gcc_test(6, 1) \
     1497    _BOOST_mingw_test(6, 0) \
     1498    _BOOST_gcc_test(6, 0) \
     1499    _BOOST_mingw_test(5, 3) \
     1500    _BOOST_gcc_test(5, 3) \
     1501    _BOOST_mingw_test(5, 2) \
     1502    _BOOST_gcc_test(5, 2) \
     1503    _BOOST_mingw_test(5, 1) \
     1504    _BOOST_gcc_test(5, 1) \
     1505    _BOOST_mingw_test(5, 0) \
     1506    _BOOST_gcc_test(5, 0) \
     1507    _BOOST_mingw_test(4, 10) \
     1508    _BOOST_gcc_test(4, 10) \
     1509    _BOOST_mingw_test(4, 9) \
     1510    _BOOST_gcc_test(4, 9) \
     1511    _BOOST_mingw_test(4, 8) \
    12421512    _BOOST_gcc_test(4, 8) \
    1243     _BOOST_mingw_test(4,7) \
     1513    _BOOST_mingw_test(4, 7) \
    12441514    _BOOST_gcc_test(4, 7) \
    1245     _BOOST_mingw_test(4,6) \
     1515    _BOOST_mingw_test(4, 6) \
    12461516    _BOOST_gcc_test(4, 6) \
    1247     _BOOST_mingw_test(4,5) \
     1517    _BOOST_mingw_test(4, 5) \
    12481518    _BOOST_gcc_test(4, 5) \
    1249     _BOOST_mingw_test(4,4) \
     1519    _BOOST_mingw_test(4, 4) \
    12501520    _BOOST_gcc_test(4, 4) \
    1251     _BOOST_mingw_test(4,3) \
     1521    _BOOST_mingw_test(4, 3) \
    12521522    _BOOST_gcc_test(4, 3) \
    1253     _BOOST_mingw_test(4,2) \
     1523    _BOOST_mingw_test(4, 2) \
    12541524    _BOOST_gcc_test(4, 2) \
    1255     _BOOST_mingw_test(4,1) \
     1525    _BOOST_mingw_test(4, 1) \
    12561526    _BOOST_gcc_test(4, 1) \
    1257     _BOOST_mingw_test(4,0) \
     1527    _BOOST_mingw_test(4, 0) \
    12581528    _BOOST_gcc_test(4, 0) \
    12591529    "defined __GNUC__ && __GNUC__ == 3 && !defined __ICC \
  • ThirdParty/vmg/m4/boost.m4

    rac9dc8 raed262  
    2323
    2424m4_define([_BOOST_SERIAL], [m4_translit([
    25 # serial 22
     25# serial 26
    2626], [#
    2727], [])])
     
    7373dnl everything else.
    7474dnl Cannot use 'dnl' after [$4] because a trailing dnl may break AC_CACHE_CHECK
     75dnl
     76dnl Beware that GCC 5, when expanding macros, may embed # line directives
     77dnl a within single line:
     78dnl
     79dnl # 1 "conftest.cc"
     80dnl # 1 "<built-in>"
     81dnl # 1 "<command-line>"
     82dnl # 1 "conftest.cc"
     83dnl # 1 "/opt/local/include/boost/version.hpp" 1 3
     84dnl # 2 "conftest.cc" 2
     85dnl boost-lib-version =
     86dnl # 2 "conftest.cc" 3
     87dnl                    "1_56"
     88dnl
     89dnl So get rid of the # and empty lines, and glue the remaining ones together.
    7590(eval "$ac_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |
     91  grep -v '#' |
     92  grep -v '^[[[:space:]]]*$' |
    7693  tr -d '\r' |
     94  tr -s '\n' ' ' |
    7795  $SED -n -e "$1" >conftest.i 2>&1],
    7896  [$3],
     
    94112# ACTION-IF-NOT-FOUND action if one was supplied.
    95113# Otherwise aborts with an error message.
    96 AC_DEFUN([BOOST_REQUIRE],
     114AC_DEFUN_ONCE([BOOST_REQUIRE],
    97115[AC_REQUIRE([AC_PROG_CXX])dnl
    98116AC_REQUIRE([AC_PROG_GREP])dnl
     
    209227    [boost_cv_lib_version],
    210228    [m4_pattern_allow([^BOOST_LIB_VERSION$])dnl
    211      _BOOST_SED_CPP([/^boost-lib-version = /{s///;s/\"//g;p;q;}],
     229     _BOOST_SED_CPP([[/^boost-lib-version = /{s///;s/[\" ]//g;p;q;}]],
    212230                    [#include <boost/version.hpp>
    213231boost-lib-version = BOOST_LIB_VERSION],
     
    217235    case $boost_major_version in #(
    218236      '' | *[[!0-9]]*)
    219         AC_MSG_ERROR([invalid value: boost_major_version=$boost_major_version])
     237        AC_MSG_ERROR([invalid value: boost_major_version='$boost_major_version'])
    220238        ;;
    221239    esac
     
    375393  # Look for the abs path the static archive.
    376394  # $libext is computed by Libtool but let's make sure it's non empty.
    377   #test -z "$libext" &&
    378   #  AC_MSG_ERROR([the libext variable is empty, did you invoke Libtool?])
     395  test -z "$libext" &&
     396    AC_MSG_ERROR([the libext variable is empty, did you invoke Libtool?])
    379397  boost_save_ac_objext=$ac_objext
    380398  # Generate the test file.
     
    539557BOOST_FIND_HEADER([boost/asio.hpp])])
    540558
    541 
    542559# BOOST_BIMAP()
    543560# ------------
     
    545562BOOST_DEFUN([Bimap],
    546563[BOOST_FIND_HEADER([boost/bimap.hpp])])
     564
     565
     566# BOOST_ASSIGN()
     567# -------------
     568# Look for Boost.Assign
     569BOOST_DEFUN([Assign],
     570[BOOST_FIND_HEADER([boost/assign.hpp])])
    547571
    548572
     
    580604                [boost::chrono::thread_clock d;])
    581605if test $enable_static_boost = yes && test $boost_major_version -ge 135; then
    582   BOOST_FILESYSTEM_LIBS="$BOOST_FILESYSTEM_LIBS $BOOST_SYSTEM_LIBS"
     606  BOOST_CHRONO_LIBS="$BOOST_CHRONO_LIBS $BOOST_SYSTEM_LIBS"
    583607fi
    584608LIBS=$boost_filesystem_save_LIBS
    585609LDFLAGS=$boost_filesystem_save_LDFLAGS
    586610])# BOOST_CHRONO
     611
     612
     613# BOOST_CONTEXT([PREFERRED-RT-OPT])
     614# -----------------------------------
     615# Look for Boost.Context.  For the documentation of PREFERRED-RT-OPT, see the
     616# documentation of BOOST_FIND_LIB above.
     617#
     618# * This library was introduced in Boost 1.51.0
     619# * The signatures of make_fcontext() and jump_fcontext were changed in 1.56.0
     620# * A dependency on boost_thread appears in 1.57.0
     621BOOST_DEFUN([Context],
     622[boost_context_save_LIBS=$LIBS
     623 boost_context_save_LDFLAGS=$LDFLAGS
     624if test $boost_major_version -ge 157; then
     625  BOOST_THREAD([$1])
     626  m4_pattern_allow([^BOOST_THREAD_(LIBS|LDFLAGS)$])dnl
     627  LIBS="$LIBS $BOOST_THREAD_LIBS"
     628  LDFLAGS="$LDFLAGS $BOOST_THREAD_LDFLAGS"
     629fi
     630BOOST_FIND_LIB([context], [$1],
     631                [boost/context/all.hpp],[[
     632
     633// creates a stack
     634void * stack_pointer = new void*[4096];
     635std::size_t const size = sizeof(void*[4096]);
     636
     637#if BOOST_VERSION <= 105100
     638ctx::make_fcontext(&fc, f);
     639return ctx::jump_fcontext(&fcm, &fc, 3) == 6;
     640
     641#else
     642
     643fc = ctx::make_fcontext(stack_pointer, size, f);
     644return ctx::jump_fcontext(&fcm, fc, 3) == 6;
     645
     646#endif
     647
     648
     649]],[dnl
     650
     651#include <boost/version.hpp>
     652#if BOOST_VERSION <= 105100
     653
     654namespace ctx = boost::ctx;
     655
     656static ctx::fcontext_t fcm, fc;
     657
     658static void f(intptr_t i) {
     659    ctx::jump_fcontext(&fc, &fcm, i * 2);
     660}
     661
     662#elif BOOST_VERSION <= 105500
     663
     664namespace ctx = boost::context;
     665
     666// context
     667static ctx::fcontext_t fcm, *fc;
     668
     669// context-function
     670static void f(intptr_t i) {
     671    ctx::jump_fcontext(fc, &fcm, i * 2);
     672}
     673
     674#else
     675
     676namespace ctx = boost::context;
     677
     678// context
     679static ctx::fcontext_t fcm, fc;
     680
     681// context-function
     682static void f(intptr_t i) {
     683    ctx::jump_fcontext(&fc, fcm, i * 2);
     684}
     685#endif
     686])
     687LIBS=$boost_context_save_LIBS
     688LDFLAGS=$boost_context_save_LDFLAGS
     689])# BOOST_CONTEXT
    587690
    588691
     
    594697BOOST_FIND_HEADER([boost/lexical_cast.hpp])
    595698])# BOOST_CONVERSION
     699
     700
     701# BOOST_COROUTINE([PREFERRED-RT-OPT])
     702# -----------------------------------
     703# Look for Boost.Coroutine.  For the documentation of PREFERRED-RT-OPT, see the
     704# documentation of BOOST_FIND_LIB above.  This library was introduced in Boost
     705# 1.53.0
     706BOOST_DEFUN([Coroutine],
     707[
     708boost_coroutine_save_LIBS=$LIBS
     709boost_coroutine_save_LDFLAGS=$LDFLAGS
     710# Link-time dependency from coroutine to context
     711BOOST_CONTEXT([$1])
     712# Starting from Boost 1.55 a dependency on Boost.System is added
     713if test $boost_major_version -ge 155; then
     714  BOOST_SYSTEM([$1])
     715fi
     716m4_pattern_allow([^BOOST_(CONTEXT|SYSTEM)_(LIBS|LDFLAGS)])
     717LIBS="$LIBS $BOOST_CONTEXT_LIBS $BOOST_SYSTEM_LIBS"
     718LDFLAGS="$LDFLAGS $BOOST_CONTEXT_LDFLAGS"
     719
     720# in 1.53 coroutine was a header only library
     721if test $boost_major_version -eq 153; then
     722  BOOST_FIND_HEADER([boost/coroutine/coroutine.hpp])
     723else
     724  BOOST_FIND_LIB([coroutine], [$1],
     725                  [boost/coroutine/coroutine.hpp],
     726                  [
     727  #include <boost/version.hpp>
     728  #if   BOOST_VERSION <= 105500
     729  boost::coroutines::coroutine<int(int)> coro; coro.get();
     730  #else
     731  boost::coroutines::asymmetric_coroutine<int>::pull_type coro; coro.get();
     732  #endif
     733  ])
     734fi
     735# Link-time dependency from coroutine to context, existed only in 1.53, in 1.54
     736# coroutine doesn't use context from its headers but from its library.
     737if test $boost_major_version -eq 153 || test $enable_static_boost = yes && test $boost_major_version -ge 154; then
     738  BOOST_COROUTINE_LIBS="$BOOST_COROUTINE_LIBS $BOOST_CONTEXT_LIBS"
     739  BOOST_COROUTINE_LDFLAGS="$BOOST_COROUTINE_LDFLAGS $BOOST_CONTEXT_LDFLAGS"
     740fi
     741if test $enable_static_boost = yes && test $boost_major_version -ge 155; then
     742  BOOST_COROUTINE_LIBS="$BOOST_COROUTINE_LIBS $BOOST_SYSTEM_LIBS"
     743  BOOST_COROUTINE_LDFLAGS="$BOOST_COROUTINE_LDFLAGS $BOOST_SYSTEM_LDFLAGS"
     744fi
     745LIBS=$boost_coroutine_save_LIBS
     746LDFLAGS=$boost_coroutine_save_LDFLAGS
     747])# BOOST_COROUTINE
    596748
    597749
     
    650802
    651803
    652 # BOOST_FUSION()
    653 # -----------------
    654 # Look for Boost.Fusion
    655 BOOST_DEFUN([Fusion],
    656 [BOOST_FIND_HEADER([boost/fusion/sequence.hpp])])
    657 
    658 
    659804# BOOST_FLYWEIGHT()
    660805# -----------------
     
    693838
    694839
     840# BOOST_FUSION()
     841# -----------------
     842# Look for Boost.Fusion
     843BOOST_DEFUN([Fusion],
     844[BOOST_FIND_HEADER([boost/fusion/sequence.hpp])])
     845
     846
    695847# BOOST_GEOMETRY()
    696848# ----------------
     
    706858# documentation of BOOST_FIND_LIB above.
    707859BOOST_DEFUN([Graph],
    708 [BOOST_FIND_LIB([graph], [$1],
     860[boost_graph_save_LIBS=$LIBS
     861boost_graph_save_LDFLAGS=$LDFLAGS
     862# Link-time dependency from graph to regex was added as of 1.40.0.
     863if test $boost_major_version -ge 140; then
     864  BOOST_REGEX([$1])
     865  m4_pattern_allow([^BOOST_REGEX_(LIBS|LDFLAGS)$])dnl
     866  LIBS="$LIBS $BOOST_REGEX_LIBS"
     867  LDFLAGS="$LDFLAGS $BOOST_REGEX_LDFLAGS"
     868fi
     869BOOST_FIND_LIB([graph], [$1],
    709870                [boost/graph/adjacency_list.hpp], [boost::adjacency_list<> g;])
     871LIBS=$boost_graph_save_LIBS
     872LDFLAGS=$boost_graph_save_LDFLAGS
    710873])# BOOST_GRAPH
     874
     875
     876# BOOST_HASH()
     877# ------------
     878# Look for Boost.Functional/Hash
     879BOOST_DEFUN([Hash],
     880[BOOST_FIND_HEADER([boost/functional/hash.hpp])])
    711881
    712882
     
    722892
    723893
    724 # BOOST_HASH()
    725 # ------------
    726 # Look for Boost.Functional/Hash
    727 BOOST_DEFUN([Hash],
    728 [BOOST_FIND_HEADER([boost/functional/hash.hpp])])
    729 
    730 
    731894# BOOST_ITERATOR()
    732895# ------------
     
    743906
    744907
     908# BOOST_LOCALE()
     909# --------------
     910# Look for Boost.Locale
     911BOOST_DEFUN([Locale],
     912[
     913boost_locale_save_LIBS=$LIBS
     914boost_locale_save_LDFLAGS=$LDFLAGS
     915# require SYSTEM for boost-1.50.0 and up
     916if test $boost_major_version -ge 150; then
     917  BOOST_SYSTEM([$1])
     918  m4_pattern_allow([^BOOST_SYSTEM_(LIBS|LDFLAGS)$])dnl
     919  LIBS="$LIBS $BOOST_SYSTEM_LIBS"
     920  LDFLAGS="$LDFLAGS $BOOST_SYSTEM_LDFLAGS"
     921fi # end of the Boost.System check.
     922BOOST_FIND_LIB([locale], [$1],
     923    [boost/locale.hpp],
     924    [[boost::locale::generator gen; std::locale::global(gen(""));]])
     925LIBS=$boost_locale_save_LIBS
     926LDFLAGS=$boost_locale_save_LDFLAGS
     927])# BOOST_LOCALE
     928
    745929# BOOST_LOG([PREFERRED-RT-OPT])
    746930# -----------------------------
     
    748932# documentation of BOOST_FIND_LIB above.
    749933BOOST_DEFUN([Log],
    750 [BOOST_FIND_LIB([log], [$1],
     934[boost_log_save_LIBS=$LIBS
     935boost_log_save_LDFLAGS=$LDFLAGS
     936BOOST_SYSTEM([$1])
     937BOOST_FILESYSTEM([$1])
     938BOOST_DATE_TIME([$1])
     939m4_pattern_allow([^BOOST_(SYSTEM|FILESYSTEM|DATE_TIME)_(LIBS|LDFLAGS)$])dnl
     940LIBS="$LIBS $BOOST_DATE_TIME_LIBS $BOOST_FILESYSTEM_LIBS $BOOST_SYSTEM_LIBS"
     941LDFLAGS="$LDFLAGS $BOOST_DATE_TIME_LDFLAGS $BOOST_FILESYSTEM_LDFLAGS $BOOST_SYSTEM_LDFLAGS"
     942BOOST_FIND_LIB([log], [$1],
    751943    [boost/log/core/core.hpp],
    752944    [boost::log::attribute a; a.get_value();])
     945LIBS=$boost_log_save_LIBS
     946LDFLAGS=$boost_log_save_LDFLAGS
    753947])# BOOST_LOG
    754948
     
    759953# documentation of BOOST_FIND_LIB above.
    760954BOOST_DEFUN([Log_Setup],
    761 [AC_REQUIRE([BOOST_LOG])dnl
     955[boost_log_setup_save_LIBS=$LIBS
     956boost_log_setup_save_LDFLAGS=$LDFLAGS
     957BOOST_LOG([$1])
     958m4_pattern_allow([^BOOST_LOG_(LIBS|LDFLAGS)$])dnl
     959LIBS="$LIBS $BOOST_LOG_LIBS"
     960LDFLAGS="$LDFLAGS $BOOST_LOG_LDFLAGS"
    762961BOOST_FIND_LIB([log_setup], [$1],
    763962    [boost/log/utility/setup/from_settings.hpp],
    764963    [boost::log::basic_settings<char> bs; bs.empty();])
     964LIBS=$boost_log_setup_save_LIBS
     965LDFLAGS=$boost_log_setup_save_LDFLAGS
    765966])# BOOST_LOG_SETUP
    766967
     
    8141015[BOOST_FIND_HEADER([boost/multi_array.hpp])])
    8151016
     1017
    8161018# BOOST_MULTIINDEXCCONTAINER()
    8171019# ------------------
     
    8681070[BOOST_FIND_HEADER([boost/random/random_number_generator.hpp])])
    8691071
     1072
     1073# BOOST_RANGE()
     1074# --------------------
     1075# Look for Boost.Range
     1076BOOST_DEFUN([Range],
     1077[BOOST_FIND_HEADER([boost/range/adaptors.hpp])])
    8701078
    8711079# BOOST_UNORDERED()
     
    10451253
    10461254# When compiling for the Windows platform, the threads library is named
    1047 # differently.
    1048 case $host_os in
    1049   (*mingw*) boost_thread_lib_ext=_win32;;
    1050 esac
     1255# differently.  This suffix doesn't exist in new versions of Boost, or
     1256# possibly new versions of GCC on mingw I am assuming it's Boost's change for
     1257# now and I am setting version to 1.48, for lack of knowledge as to when this
     1258# change occurred.
     1259if test $boost_major_version -lt 148; then
     1260  case $host_os in
     1261    (*mingw*) boost_thread_lib_ext=_win32;;
     1262  esac
     1263fi
    10511264BOOST_FIND_LIBS([thread], [thread$boost_thread_lib_ext],
    10521265                [$1],
    10531266                [boost/thread.hpp], [boost::thread t; boost::mutex m;])
    10541267
    1055 BOOST_THREAD_LIBS="$BOOST_THREAD_LIBS $BOOST_SYSTEM_LIBS $boost_cv_pthread_flag"
     1268case $host_os in
     1269  (*mingw*) boost_thread_w32_socket_link=-lws2_32;;
     1270esac
     1271
     1272BOOST_THREAD_LIBS="$BOOST_THREAD_LIBS $BOOST_SYSTEM_LIBS $boost_cv_pthread_flag $boost_thread_w32_socket_link"
    10561273BOOST_THREAD_LDFLAGS="$BOOST_SYSTEM_LDFLAGS"
    10571274BOOST_CPPFLAGS="$BOOST_CPPFLAGS $boost_cv_pthread_flag"
     
    12551472[AC_REQUIRE([AC_PROG_CXX])dnl
    12561473AC_REQUIRE([AC_CANONICAL_HOST])dnl
    1257 AC_CACHE_CHECK([for the toolset name used by Boost for $CXX], [boost_cv_lib_tag],
     1474AC_CACHE_CHECK([for the toolset name used by Boost for $CXX],
     1475               [boost_cv_lib_tag],
    12581476[boost_cv_lib_tag=unknown
    12591477if test x$boost_cv_inc_path != xno; then
     
    12731491  # the same defines as GCC's).
    12741492  for i in \
    1275     _BOOST_mingw_test(4,8) \
     1493    _BOOST_mingw_test(6, 2) \
     1494    _BOOST_gcc_test(6, 2) \
     1495    _BOOST_mingw_test(6, 1) \
     1496    _BOOST_gcc_test(6, 1) \
     1497    _BOOST_mingw_test(6, 0) \
     1498    _BOOST_gcc_test(6, 0) \
     1499    _BOOST_mingw_test(5, 3) \
     1500    _BOOST_gcc_test(5, 3) \
     1501    _BOOST_mingw_test(5, 2) \
     1502    _BOOST_gcc_test(5, 2) \
     1503    _BOOST_mingw_test(5, 1) \
     1504    _BOOST_gcc_test(5, 1) \
     1505    _BOOST_mingw_test(5, 0) \
     1506    _BOOST_gcc_test(5, 0) \
     1507    _BOOST_mingw_test(4, 10) \
     1508    _BOOST_gcc_test(4, 10) \
     1509    _BOOST_mingw_test(4, 9) \
     1510    _BOOST_gcc_test(4, 9) \
     1511    _BOOST_mingw_test(4, 8) \
    12761512    _BOOST_gcc_test(4, 8) \
    1277     _BOOST_mingw_test(4,7) \
     1513    _BOOST_mingw_test(4, 7) \
    12781514    _BOOST_gcc_test(4, 7) \
    1279     _BOOST_mingw_test(4,6) \
     1515    _BOOST_mingw_test(4, 6) \
    12801516    _BOOST_gcc_test(4, 6) \
    1281     _BOOST_mingw_test(4,5) \
     1517    _BOOST_mingw_test(4, 5) \
    12821518    _BOOST_gcc_test(4, 5) \
    1283     _BOOST_mingw_test(4,4) \
     1519    _BOOST_mingw_test(4, 4) \
    12841520    _BOOST_gcc_test(4, 4) \
    1285     _BOOST_mingw_test(4,3) \
     1521    _BOOST_mingw_test(4, 3) \
    12861522    _BOOST_gcc_test(4, 3) \
    1287     _BOOST_mingw_test(4,2) \
     1523    _BOOST_mingw_test(4, 2) \
    12881524    _BOOST_gcc_test(4, 2) \
    1289     _BOOST_mingw_test(4,1) \
     1525    _BOOST_mingw_test(4, 1) \
    12901526    _BOOST_gcc_test(4, 1) \
    1291     _BOOST_mingw_test(4,0) \
     1527    _BOOST_mingw_test(4, 0) \
    12921528    _BOOST_gcc_test(4, 0) \
    12931529    "defined __GNUC__ && __GNUC__ == 3 && !defined __ICC \
  • m4/boost.m4

    rac9dc8 raed262  
    2323
    2424m4_define([_BOOST_SERIAL], [m4_translit([
    25 # serial 22
     25# serial 26
    2626], [#
    2727], [])])
     
    7373dnl everything else.
    7474dnl Cannot use 'dnl' after [$4] because a trailing dnl may break AC_CACHE_CHECK
     75dnl
     76dnl Beware that GCC 5, when expanding macros, may embed # line directives
     77dnl a within single line:
     78dnl
     79dnl # 1 "conftest.cc"
     80dnl # 1 "<built-in>"
     81dnl # 1 "<command-line>"
     82dnl # 1 "conftest.cc"
     83dnl # 1 "/opt/local/include/boost/version.hpp" 1 3
     84dnl # 2 "conftest.cc" 2
     85dnl boost-lib-version =
     86dnl # 2 "conftest.cc" 3
     87dnl                    "1_56"
     88dnl
     89dnl So get rid of the # and empty lines, and glue the remaining ones together.
    7590(eval "$ac_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |
     91  grep -v '#' |
     92  grep -v '^[[[:space:]]]*$' |
    7693  tr -d '\r' |
     94  tr -s '\n' ' ' |
    7795  $SED -n -e "$1" >conftest.i 2>&1],
    7896  [$3],
     
    94112# ACTION-IF-NOT-FOUND action if one was supplied.
    95113# Otherwise aborts with an error message.
    96 AC_DEFUN([BOOST_REQUIRE],
     114AC_DEFUN_ONCE([BOOST_REQUIRE],
    97115[AC_REQUIRE([AC_PROG_CXX])dnl
    98116AC_REQUIRE([AC_PROG_GREP])dnl
     
    209227    [boost_cv_lib_version],
    210228    [m4_pattern_allow([^BOOST_LIB_VERSION$])dnl
    211      _BOOST_SED_CPP([/^boost-lib-version = /{s///;s/\"//g;p;q;}],
     229     _BOOST_SED_CPP([[/^boost-lib-version = /{s///;s/[\" ]//g;p;q;}]],
    212230                    [#include <boost/version.hpp>
    213231boost-lib-version = BOOST_LIB_VERSION],
     
    217235    case $boost_major_version in #(
    218236      '' | *[[!0-9]]*)
    219         AC_MSG_ERROR([invalid value: boost_major_version=$boost_major_version])
     237        AC_MSG_ERROR([invalid value: boost_major_version='$boost_major_version'])
    220238        ;;
    221239    esac
     
    539557BOOST_FIND_HEADER([boost/asio.hpp])])
    540558
    541 
    542559# BOOST_BIMAP()
    543560# ------------
     
    545562BOOST_DEFUN([Bimap],
    546563[BOOST_FIND_HEADER([boost/bimap.hpp])])
     564
     565
     566# BOOST_ASSIGN()
     567# -------------
     568# Look for Boost.Assign
     569BOOST_DEFUN([Assign],
     570[BOOST_FIND_HEADER([boost/assign.hpp])])
    547571
    548572
     
    580604                [boost::chrono::thread_clock d;])
    581605if test $enable_static_boost = yes && test $boost_major_version -ge 135; then
    582   BOOST_FILESYSTEM_LIBS="$BOOST_FILESYSTEM_LIBS $BOOST_SYSTEM_LIBS"
     606  BOOST_CHRONO_LIBS="$BOOST_CHRONO_LIBS $BOOST_SYSTEM_LIBS"
    583607fi
    584608LIBS=$boost_filesystem_save_LIBS
    585609LDFLAGS=$boost_filesystem_save_LDFLAGS
    586610])# BOOST_CHRONO
     611
     612
     613# BOOST_CONTEXT([PREFERRED-RT-OPT])
     614# -----------------------------------
     615# Look for Boost.Context.  For the documentation of PREFERRED-RT-OPT, see the
     616# documentation of BOOST_FIND_LIB above.
     617#
     618# * This library was introduced in Boost 1.51.0
     619# * The signatures of make_fcontext() and jump_fcontext were changed in 1.56.0
     620# * A dependency on boost_thread appears in 1.57.0
     621BOOST_DEFUN([Context],
     622[boost_context_save_LIBS=$LIBS
     623 boost_context_save_LDFLAGS=$LDFLAGS
     624if test $boost_major_version -ge 157; then
     625  BOOST_THREAD([$1])
     626  m4_pattern_allow([^BOOST_THREAD_(LIBS|LDFLAGS)$])dnl
     627  LIBS="$LIBS $BOOST_THREAD_LIBS"
     628  LDFLAGS="$LDFLAGS $BOOST_THREAD_LDFLAGS"
     629fi
     630BOOST_FIND_LIB([context], [$1],
     631                [boost/context/all.hpp],[[
     632
     633// creates a stack
     634void * stack_pointer = new void*[4096];
     635std::size_t const size = sizeof(void*[4096]);
     636
     637#if BOOST_VERSION <= 105100
     638ctx::make_fcontext(&fc, f);
     639return ctx::jump_fcontext(&fcm, &fc, 3) == 6;
     640
     641#else
     642
     643fc = ctx::make_fcontext(stack_pointer, size, f);
     644return ctx::jump_fcontext(&fcm, fc, 3) == 6;
     645
     646#endif
     647
     648
     649]],[dnl
     650
     651#include <boost/version.hpp>
     652#if BOOST_VERSION <= 105100
     653
     654namespace ctx = boost::ctx;
     655
     656static ctx::fcontext_t fcm, fc;
     657
     658static void f(intptr_t i) {
     659    ctx::jump_fcontext(&fc, &fcm, i * 2);
     660}
     661
     662#elif BOOST_VERSION <= 105500
     663
     664namespace ctx = boost::context;
     665
     666// context
     667static ctx::fcontext_t fcm, *fc;
     668
     669// context-function
     670static void f(intptr_t i) {
     671    ctx::jump_fcontext(fc, &fcm, i * 2);
     672}
     673
     674#else
     675
     676namespace ctx = boost::context;
     677
     678// context
     679static ctx::fcontext_t fcm, fc;
     680
     681// context-function
     682static void f(intptr_t i) {
     683    ctx::jump_fcontext(&fc, fcm, i * 2);
     684}
     685#endif
     686])
     687LIBS=$boost_context_save_LIBS
     688LDFLAGS=$boost_context_save_LDFLAGS
     689])# BOOST_CONTEXT
    587690
    588691
     
    594697BOOST_FIND_HEADER([boost/lexical_cast.hpp])
    595698])# BOOST_CONVERSION
     699
     700
     701# BOOST_COROUTINE([PREFERRED-RT-OPT])
     702# -----------------------------------
     703# Look for Boost.Coroutine.  For the documentation of PREFERRED-RT-OPT, see the
     704# documentation of BOOST_FIND_LIB above.  This library was introduced in Boost
     705# 1.53.0
     706BOOST_DEFUN([Coroutine],
     707[
     708boost_coroutine_save_LIBS=$LIBS
     709boost_coroutine_save_LDFLAGS=$LDFLAGS
     710# Link-time dependency from coroutine to context
     711BOOST_CONTEXT([$1])
     712# Starting from Boost 1.55 a dependency on Boost.System is added
     713if test $boost_major_version -ge 155; then
     714  BOOST_SYSTEM([$1])
     715fi
     716m4_pattern_allow([^BOOST_(CONTEXT|SYSTEM)_(LIBS|LDFLAGS)])
     717LIBS="$LIBS $BOOST_CONTEXT_LIBS $BOOST_SYSTEM_LIBS"
     718LDFLAGS="$LDFLAGS $BOOST_CONTEXT_LDFLAGS"
     719
     720# in 1.53 coroutine was a header only library
     721if test $boost_major_version -eq 153; then
     722  BOOST_FIND_HEADER([boost/coroutine/coroutine.hpp])
     723else
     724  BOOST_FIND_LIB([coroutine], [$1],
     725                  [boost/coroutine/coroutine.hpp],
     726                  [
     727  #include <boost/version.hpp>
     728  #if   BOOST_VERSION <= 105500
     729  boost::coroutines::coroutine<int(int)> coro; coro.get();
     730  #else
     731  boost::coroutines::asymmetric_coroutine<int>::pull_type coro; coro.get();
     732  #endif
     733  ])
     734fi
     735# Link-time dependency from coroutine to context, existed only in 1.53, in 1.54
     736# coroutine doesn't use context from its headers but from its library.
     737if test $boost_major_version -eq 153 || test $enable_static_boost = yes && test $boost_major_version -ge 154; then
     738  BOOST_COROUTINE_LIBS="$BOOST_COROUTINE_LIBS $BOOST_CONTEXT_LIBS"
     739  BOOST_COROUTINE_LDFLAGS="$BOOST_COROUTINE_LDFLAGS $BOOST_CONTEXT_LDFLAGS"
     740fi
     741if test $enable_static_boost = yes && test $boost_major_version -ge 155; then
     742  BOOST_COROUTINE_LIBS="$BOOST_COROUTINE_LIBS $BOOST_SYSTEM_LIBS"
     743  BOOST_COROUTINE_LDFLAGS="$BOOST_COROUTINE_LDFLAGS $BOOST_SYSTEM_LDFLAGS"
     744fi
     745LIBS=$boost_coroutine_save_LIBS
     746LDFLAGS=$boost_coroutine_save_LDFLAGS
     747])# BOOST_COROUTINE
    596748
    597749
     
    650802
    651803
    652 # BOOST_FUSION()
    653 # -----------------
    654 # Look for Boost.Fusion
    655 BOOST_DEFUN([Fusion],
    656 [BOOST_FIND_HEADER([boost/fusion/sequence.hpp])])
    657 
    658 
    659804# BOOST_FLYWEIGHT()
    660805# -----------------
     
    693838
    694839
     840# BOOST_FUSION()
     841# -----------------
     842# Look for Boost.Fusion
     843BOOST_DEFUN([Fusion],
     844[BOOST_FIND_HEADER([boost/fusion/sequence.hpp])])
     845
     846
    695847# BOOST_GEOMETRY()
    696848# ----------------
     
    706858# documentation of BOOST_FIND_LIB above.
    707859BOOST_DEFUN([Graph],
    708 [BOOST_FIND_LIB([graph], [$1],
     860[boost_graph_save_LIBS=$LIBS
     861boost_graph_save_LDFLAGS=$LDFLAGS
     862# Link-time dependency from graph to regex was added as of 1.40.0.
     863if test $boost_major_version -ge 140; then
     864  BOOST_REGEX([$1])
     865  m4_pattern_allow([^BOOST_REGEX_(LIBS|LDFLAGS)$])dnl
     866  LIBS="$LIBS $BOOST_REGEX_LIBS"
     867  LDFLAGS="$LDFLAGS $BOOST_REGEX_LDFLAGS"
     868fi
     869BOOST_FIND_LIB([graph], [$1],
    709870                [boost/graph/adjacency_list.hpp], [boost::adjacency_list<> g;])
     871LIBS=$boost_graph_save_LIBS
     872LDFLAGS=$boost_graph_save_LDFLAGS
    710873])# BOOST_GRAPH
     874
     875
     876# BOOST_HASH()
     877# ------------
     878# Look for Boost.Functional/Hash
     879BOOST_DEFUN([Hash],
     880[BOOST_FIND_HEADER([boost/functional/hash.hpp])])
    711881
    712882
     
    722892
    723893
    724 # BOOST_HASH()
    725 # ------------
    726 # Look for Boost.Functional/Hash
    727 BOOST_DEFUN([Hash],
    728 [BOOST_FIND_HEADER([boost/functional/hash.hpp])])
    729 
    730 
    731894# BOOST_ITERATOR()
    732895# ------------
     
    743906
    744907
     908# BOOST_LOCALE()
     909# --------------
     910# Look for Boost.Locale
     911BOOST_DEFUN([Locale],
     912[
     913boost_locale_save_LIBS=$LIBS
     914boost_locale_save_LDFLAGS=$LDFLAGS
     915# require SYSTEM for boost-1.50.0 and up
     916if test $boost_major_version -ge 150; then
     917  BOOST_SYSTEM([$1])
     918  m4_pattern_allow([^BOOST_SYSTEM_(LIBS|LDFLAGS)$])dnl
     919  LIBS="$LIBS $BOOST_SYSTEM_LIBS"
     920  LDFLAGS="$LDFLAGS $BOOST_SYSTEM_LDFLAGS"
     921fi # end of the Boost.System check.
     922BOOST_FIND_LIB([locale], [$1],
     923    [boost/locale.hpp],
     924    [[boost::locale::generator gen; std::locale::global(gen(""));]])
     925LIBS=$boost_locale_save_LIBS
     926LDFLAGS=$boost_locale_save_LDFLAGS
     927])# BOOST_LOCALE
     928
    745929# BOOST_LOG([PREFERRED-RT-OPT])
    746930# -----------------------------
     
    748932# documentation of BOOST_FIND_LIB above.
    749933BOOST_DEFUN([Log],
    750 [BOOST_FIND_LIB([log], [$1],
     934[boost_log_save_LIBS=$LIBS
     935boost_log_save_LDFLAGS=$LDFLAGS
     936BOOST_SYSTEM([$1])
     937BOOST_FILESYSTEM([$1])
     938BOOST_DATE_TIME([$1])
     939m4_pattern_allow([^BOOST_(SYSTEM|FILESYSTEM|DATE_TIME)_(LIBS|LDFLAGS)$])dnl
     940LIBS="$LIBS $BOOST_DATE_TIME_LIBS $BOOST_FILESYSTEM_LIBS $BOOST_SYSTEM_LIBS"
     941LDFLAGS="$LDFLAGS $BOOST_DATE_TIME_LDFLAGS $BOOST_FILESYSTEM_LDFLAGS $BOOST_SYSTEM_LDFLAGS"
     942BOOST_FIND_LIB([log], [$1],
    751943    [boost/log/core/core.hpp],
    752944    [boost::log::attribute a; a.get_value();])
     945LIBS=$boost_log_save_LIBS
     946LDFLAGS=$boost_log_save_LDFLAGS
    753947])# BOOST_LOG
    754948
     
    759953# documentation of BOOST_FIND_LIB above.
    760954BOOST_DEFUN([Log_Setup],
    761 [AC_REQUIRE([BOOST_LOG])dnl
     955[boost_log_setup_save_LIBS=$LIBS
     956boost_log_setup_save_LDFLAGS=$LDFLAGS
     957BOOST_LOG([$1])
     958m4_pattern_allow([^BOOST_LOG_(LIBS|LDFLAGS)$])dnl
     959LIBS="$LIBS $BOOST_LOG_LIBS"
     960LDFLAGS="$LDFLAGS $BOOST_LOG_LDFLAGS"
    762961BOOST_FIND_LIB([log_setup], [$1],
    763962    [boost/log/utility/setup/from_settings.hpp],
    764963    [boost::log::basic_settings<char> bs; bs.empty();])
     964LIBS=$boost_log_setup_save_LIBS
     965LDFLAGS=$boost_log_setup_save_LDFLAGS
    765966])# BOOST_LOG_SETUP
    766967
     
    8141015[BOOST_FIND_HEADER([boost/multi_array.hpp])])
    8151016
     1017
    8161018# BOOST_MULTIINDEXCCONTAINER()
    8171019# ------------------
     
    8681070[BOOST_FIND_HEADER([boost/random/random_number_generator.hpp])])
    8691071
     1072
     1073# BOOST_RANGE()
     1074# --------------------
     1075# Look for Boost.Range
     1076BOOST_DEFUN([Range],
     1077[BOOST_FIND_HEADER([boost/range/adaptors.hpp])])
    8701078
    8711079# BOOST_UNORDERED()
     
    10451253
    10461254# When compiling for the Windows platform, the threads library is named
    1047 # differently.
    1048 case $host_os in
    1049   (*mingw*) boost_thread_lib_ext=_win32;;
    1050 esac
     1255# differently.  This suffix doesn't exist in new versions of Boost, or
     1256# possibly new versions of GCC on mingw I am assuming it's Boost's change for
     1257# now and I am setting version to 1.48, for lack of knowledge as to when this
     1258# change occurred.
     1259if test $boost_major_version -lt 148; then
     1260  case $host_os in
     1261    (*mingw*) boost_thread_lib_ext=_win32;;
     1262  esac
     1263fi
    10511264BOOST_FIND_LIBS([thread], [thread$boost_thread_lib_ext],
    10521265                [$1],
    10531266                [boost/thread.hpp], [boost::thread t; boost::mutex m;])
    10541267
    1055 BOOST_THREAD_LIBS="$BOOST_THREAD_LIBS $BOOST_SYSTEM_LIBS $boost_cv_pthread_flag"
     1268case $host_os in
     1269  (*mingw*) boost_thread_w32_socket_link=-lws2_32;;
     1270esac
     1271
     1272BOOST_THREAD_LIBS="$BOOST_THREAD_LIBS $BOOST_SYSTEM_LIBS $boost_cv_pthread_flag $boost_thread_w32_socket_link"
    10561273BOOST_THREAD_LDFLAGS="$BOOST_SYSTEM_LDFLAGS"
    10571274BOOST_CPPFLAGS="$BOOST_CPPFLAGS $boost_cv_pthread_flag"
     
    12551472[AC_REQUIRE([AC_PROG_CXX])dnl
    12561473AC_REQUIRE([AC_CANONICAL_HOST])dnl
    1257 AC_CACHE_CHECK([for the toolset name used by Boost for $CXX], [boost_cv_lib_tag],
     1474AC_CACHE_CHECK([for the toolset name used by Boost for $CXX],
     1475               [boost_cv_lib_tag],
    12581476[boost_cv_lib_tag=unknown
    12591477if test x$boost_cv_inc_path != xno; then
     
    12731491  # the same defines as GCC's).
    12741492  for i in \
    1275     _BOOST_mingw_test(4,8) \
     1493    _BOOST_mingw_test(6, 2) \
     1494    _BOOST_gcc_test(6, 2) \
     1495    _BOOST_mingw_test(6, 1) \
     1496    _BOOST_gcc_test(6, 1) \
     1497    _BOOST_mingw_test(6, 0) \
     1498    _BOOST_gcc_test(6, 0) \
     1499    _BOOST_mingw_test(5, 3) \
     1500    _BOOST_gcc_test(5, 3) \
     1501    _BOOST_mingw_test(5, 2) \
     1502    _BOOST_gcc_test(5, 2) \
     1503    _BOOST_mingw_test(5, 1) \
     1504    _BOOST_gcc_test(5, 1) \
     1505    _BOOST_mingw_test(5, 0) \
     1506    _BOOST_gcc_test(5, 0) \
     1507    _BOOST_mingw_test(4, 10) \
     1508    _BOOST_gcc_test(4, 10) \
     1509    _BOOST_mingw_test(4, 9) \
     1510    _BOOST_gcc_test(4, 9) \
     1511    _BOOST_mingw_test(4, 8) \
    12761512    _BOOST_gcc_test(4, 8) \
    1277     _BOOST_mingw_test(4,7) \
     1513    _BOOST_mingw_test(4, 7) \
    12781514    _BOOST_gcc_test(4, 7) \
    1279     _BOOST_mingw_test(4,6) \
     1515    _BOOST_mingw_test(4, 6) \
    12801516    _BOOST_gcc_test(4, 6) \
    1281     _BOOST_mingw_test(4,5) \
     1517    _BOOST_mingw_test(4, 5) \
    12821518    _BOOST_gcc_test(4, 5) \
    1283     _BOOST_mingw_test(4,4) \
     1519    _BOOST_mingw_test(4, 4) \
    12841520    _BOOST_gcc_test(4, 4) \
    1285     _BOOST_mingw_test(4,3) \
     1521    _BOOST_mingw_test(4, 3) \
    12861522    _BOOST_gcc_test(4, 3) \
    1287     _BOOST_mingw_test(4,2) \
     1523    _BOOST_mingw_test(4, 2) \
    12881524    _BOOST_gcc_test(4, 2) \
    1289     _BOOST_mingw_test(4,1) \
     1525    _BOOST_mingw_test(4, 1) \
    12901526    _BOOST_gcc_test(4, 1) \
    1291     _BOOST_mingw_test(4,0) \
     1527    _BOOST_mingw_test(4, 0) \
    12921528    _BOOST_gcc_test(4, 0) \
    12931529    "defined __GNUC__ && __GNUC__ == 3 && !defined __ICC \
Note: See TracChangeset for help on using the changeset viewer.