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.

File:
1 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 \
Note: See TracChangeset for help on using the changeset viewer.