Changeset 6dde30
- Timestamp:
- Jan 24, 2024, 12:09:57 AM (21 months ago)
- 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)
- Location:
- ThirdParty
- Files:
-
- 2 edited
-
CodePatterns/m4/boost.m4 (modified) (66 diffs)
-
JobMarket/m4/boost.m4 (modified) (66 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ThirdParty/CodePatterns/m4/boost.m4
r44ce58 r6dde30 23 23 24 24 m4_define([_BOOST_SERIAL], [m4_translit([ 25 # serial 2625 # serial 36 26 26 ], [# 27 27 ], [])]) … … 289 289 # BOOST_FIND_LIBS([COMPONENT-NAME], [CANDIDATE-LIB-NAMES], 290 290 # [PREFERRED-RT-OPT], [HEADER-NAME], [CXX-TEST], 291 # [CXX-PROLOGUE]) 291 # [CXX-PROLOGUE], [CXX-POST-INCLUDE-PROLOGUE], 292 # [ERROR_ON_UNUSABLE]) 292 293 # -------------------------------------------------------------- 293 294 # Look for the Boost library COMPONENT-NAME (e.g., `thread', for … … 296 297 # libboost_LIB-NAME can link with the code CXX-TEST. The optional 297 298 # 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>'. 299 302 # 300 303 # Invokes BOOST_FIND_HEADER([HEADER-NAME]) (see above). … … 310 313 # ... If you want to make sure you have a specific version of Boost 311 314 # (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 312 318 AC_DEFUN([BOOST_FIND_LIBS], 313 319 [AC_REQUIRE([BOOST_REQUIRE])dnl … … 318 324 AC_MSG_NOTICE([Boost not available, not searching for the Boost $1 library]) 319 325 else 320 dnl The else branch is huge and wasn't in tended on purpose.326 dnl The else branch is huge and wasn't indented on purpose. 321 327 AC_LANG_PUSH([C++])dnl 322 328 AS_VAR_PUSHDEF([Boost_lib], [boost_cv_lib_$1])dnl … … 324 330 AS_VAR_PUSHDEF([Boost_lib_LDPATH], [boost_cv_lib_$1_LDPATH])dnl 325 331 AS_VAR_PUSHDEF([Boost_lib_LIBS], [boost_cv_lib_$1_LIBS])dnl 326 BOOST_FIND_HEADER([$4]) 332 AS_IF([test x"$8" = "xno"], [not_found_header='true']) 333 BOOST_FIND_HEADER([$4], [$not_found_header]) 327 334 boost_save_CPPFLAGS=$CPPFLAGS 328 335 CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" … … 330 337 [_BOOST_FIND_LIBS($@)]) 331 338 case $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 ;; 332 346 (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 ]) 334 350 ;; 335 351 esac 336 AC_SUBST(AS_TR_CPP([BOOST_$1_LDFLAGS]), [$Boost_lib_LDFLAGS])dnl337 AC_SUBST(AS_TR_CPP([BOOST_$1_LDPATH]), [$Boost_lib_LDPATH])dnl338 AC_SUBST([BOOST_LDPATH], [$Boost_lib_LDPATH])dnl339 AC_SUBST(AS_TR_CPP([BOOST_$1_LIBS]), [$Boost_lib_LIBS])dnl340 352 CPPFLAGS=$boost_save_CPPFLAGS 341 353 AS_VAR_POPDEF([Boost_lib])dnl … … 350 362 # BOOST_FIND_LIB([LIB-NAME], 351 363 # [PREFERRED-RT-OPT], [HEADER-NAME], [CXX-TEST], 352 # [CXX-PROLOGUE]) 364 # [CXX-PROLOGUE], [CXX-POST-INCLUDE-PROLOGUE], 365 # [ERROR_ON_UNUSABLE]) 353 366 # -------------------------------------------------------------- 354 367 # 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 355 370 AC_DEFUN([BOOST_FIND_LIB], 356 371 [BOOST_FIND_LIBS([$1], $@)]) … … 359 374 # _BOOST_FIND_LIBS([LIB-NAME], [CANDIDATE-LIB-NAMES], 360 375 # [PREFERRED-RT-OPT], [HEADER-NAME], [CXX-TEST], 361 # [CXX-PROLOGUE]) 376 # [CXX-PROLOGUE], [CXX-POST-INCLUDE-PROLOGUE], 377 # [ERROR_ON_UNUSABLE]) 362 378 # -------------------------------------------------------------- 363 379 # Real implementation of BOOST_FIND_LIBS: rely on these local macros: … … 371 387 # to enforce -mt (for instance on MacOSX, libboost_thread.dylib 372 388 # 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 373 392 AC_DEFUN([_BOOST_FIND_LIBS], 374 393 [Boost_lib=no 375 394 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-*\(.*\)'`;; #( 378 397 (*) boost_mt=; boost_rtopt=$3;; 379 398 esac … … 397 416 boost_save_ac_objext=$ac_objext 398 417 # Generate the test file. 399 AC_LANG_CONFTEST([AC_LANG_PROGRAM([#include <$4> 418 AC_LANG_CONFTEST([AC_LANG_PROGRAM([$7 419 #include <$4> 400 420 $6], [$5])]) 401 421 dnl Optimization hacks: compiling C++ is slow, especially with Boost. What … … 417 437 AC_COMPILE_IFELSE([], 418 438 [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 ]) 420 443 ac_objext=$boost_save_ac_objext 421 444 boost_failed_libs= … … 425 448 for boost_tag_ in -$boost_cv_lib_tag ''; do 426 449 for boost_ver_ in -$boost_cv_lib_version ''; do 427 for boost_mt_ in $boost_mt -mt ''; do450 for boost_mt_ in $boost_mt -mt -mt-x64 ''; do 428 451 for 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_ 434 458 do 459 boost_real_suffix=`echo "$boost_full_suffix" | sed 's/^x//'` 460 boost_lib="boost_$boost_lib_$boost_real_suffix" 435 461 # Avoid testing twice the same lib 436 462 case $boost_failed_libs in #( … … 481 507 for boost_cv_rpath_link_ldflag in -Wl,-R, -Wl,-rpath,; do 482 508 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" 484 510 _BOOST_AC_LINK_IFELSE([], 485 511 [boost_rpath_link_ldflag_found=yes … … 497 523 Boost_lib_LDFLAGS="-L$boost_ldpath $boost_cv_rpath_link_ldflag$boost_ldpath" 498 524 Boost_lib_LDPATH="$boost_ldpath" 525 boost_last_suffix="$boost_full_suffix" 499 526 break 7 500 527 else … … 571 598 572 599 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. 604 BOOST_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 573 618 # BOOST_BIND() 574 619 # ------------ … … 585 630 586 631 587 # BOOST_CHRONO( )632 # BOOST_CHRONO([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE]) 588 633 # -------------- 589 634 # Look for Boost.Chrono. … … 593 638 # find Boost.System as it didn't exist by then. 594 639 if test $boost_major_version -ge 135; then 595 BOOST_SYSTEM([$1] )640 BOOST_SYSTEM([$1], [$2]) 596 641 fi # end of the Boost.System check. 597 642 boost_filesystem_save_LIBS=$LIBS … … 602 647 BOOST_FIND_LIB([chrono], [$1], 603 648 [boost/chrono.hpp], 604 [boost::chrono::thread_clock d;] )649 [boost::chrono::thread_clock d;], [], [], [$2]) 605 650 if test $enable_static_boost = yes && test $boost_major_version -ge 135; then 606 651 BOOST_CHRONO_LIBS="$BOOST_CHRONO_LIBS $BOOST_SYSTEM_LIBS" … … 611 656 612 657 613 # BOOST_CONTEXT([PREFERRED-RT-OPT] )658 # BOOST_CONTEXT([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE]) 614 659 # ----------------------------------- 615 660 # Look for Boost.Context. For the documentation of PREFERRED-RT-OPT, see the … … 619 664 # * The signatures of make_fcontext() and jump_fcontext were changed in 1.56.0 620 665 # * 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 621 671 BOOST_DEFUN([Context], 622 672 [boost_context_save_LIBS=$LIBS 623 673 boost_context_save_LDFLAGS=$LDFLAGS 624 674 if test $boost_major_version -ge 157; then 625 BOOST_THREAD([$1] )675 BOOST_THREAD([$1], [$2]) 626 676 m4_pattern_allow([^BOOST_THREAD_(LIBS|LDFLAGS)$])dnl 627 677 LIBS="$LIBS $BOOST_THREAD_LIBS" 628 678 LDFLAGS="$LDFLAGS $BOOST_THREAD_LDFLAGS" 629 679 fi 680 681 if test $boost_major_version -ge 169; then 682 630 683 BOOST_FIND_LIB([context], [$1], 631 [boost/context/all.hpp],[[ 684 [boost/context/fiber.hpp], [[ 685 namespace ctx=boost::context; 686 int a; 687 ctx::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 }}; 698 for (int j=0;j<10;++j) { 699 source=std::move(source).resume(); 700 } 701 return a == 34; 702 ]], [], [], [$2]) 703 704 elif test $boost_major_version -ge 161; then 705 706 BOOST_FIND_LIB([context], [$1], 707 [boost/context/execution_context_v2.hpp], [[ 708 namespace ctx=boost::context; 709 int res=0; 710 int n=35; 711 ctx::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 }); 724 for(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 } 729 return res == 34; 730 ]], [], [], [$2]) 731 732 else 733 734 BOOST_FIND_LIB([context], [$1], 735 [boost/context/fcontext.hpp],[[ 632 736 633 737 // creates a stack … … 684 788 } 685 789 #endif 686 ]) 790 ], [], [], [$2]) 791 792 fi 793 687 794 LIBS=$boost_context_save_LIBS 688 795 LDFLAGS=$boost_context_save_LDFLAGS … … 699 806 700 807 701 # BOOST_COROUTINE([PREFERRED-RT-OPT] )808 # BOOST_COROUTINE([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE]) 702 809 # ----------------------------------- 703 810 # Look for Boost.Coroutine. For the documentation of PREFERRED-RT-OPT, see the … … 709 816 boost_coroutine_save_LDFLAGS=$LDFLAGS 710 817 # Link-time dependency from coroutine to context 711 BOOST_CONTEXT([$1] )818 BOOST_CONTEXT([$1], [$2]) 712 819 # Starting from Boost 1.55 a dependency on Boost.System is added 713 820 if test $boost_major_version -ge 155; then 714 BOOST_SYSTEM([$1] )821 BOOST_SYSTEM([$1], [$2]) 715 822 fi 716 823 m4_pattern_allow([^BOOST_(CONTEXT|SYSTEM)_(LIBS|LDFLAGS)]) … … 720 827 # in 1.53 coroutine was a header only library 721 828 if 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]) 723 831 else 724 832 BOOST_FIND_LIB([coroutine], [$1], … … 731 839 boost::coroutines::asymmetric_coroutine<int>::pull_type coro; coro.get(); 732 840 #endif 733 ] )841 ], [], [], [$2]) 734 842 fi 735 843 # Link-time dependency from coroutine to context, existed only in 1.53, in 1.54 … … 756 864 757 865 758 # BOOST_DATE_TIME([PREFERRED-RT-OPT] )866 # BOOST_DATE_TIME([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE]) 759 867 # ----------------------------------- 760 868 # Look for Boost.Date_Time. For the documentation of PREFERRED-RT-OPT, see the … … 763 871 [BOOST_FIND_LIB([date_time], [$1], 764 872 [boost/date_time/posix_time/posix_time.hpp], 765 [boost::posix_time::ptime t;] )873 [boost::posix_time::ptime t;], [], [], [$2]) 766 874 ])# BOOST_DATE_TIME 767 875 … … 774 882 775 883 776 # BOOST_FILESYSTEM([PREFERRED-RT-OPT] )884 # BOOST_FILESYSTEM([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE]) 777 885 # ------------------------------------ 778 886 # Look for Boost.Filesystem. For the documentation of PREFERRED-RT-OPT, see … … 785 893 # find Boost.System as it didn't exist by then. 786 894 if test $boost_major_version -ge 135; then 787 BOOST_SYSTEM([$1] )895 BOOST_SYSTEM([$1], [$2]) 788 896 fi # end of the Boost.System check. 789 897 boost_filesystem_save_LIBS=$LIBS … … 793 901 LDFLAGS="$LDFLAGS $BOOST_SYSTEM_LDFLAGS" 794 902 BOOST_FIND_LIB([filesystem], [$1], 795 [boost/filesystem/path.hpp], [boost::filesystem::path p;]) 903 [boost/filesystem/path.hpp], [boost::filesystem::path p;], 904 [], [], [$2]) 796 905 if test $enable_static_boost = yes && test $boost_major_version -ge 135; then 797 906 BOOST_FILESYSTEM_LIBS="$BOOST_FILESYSTEM_LIBS $BOOST_SYSTEM_LIBS" … … 853 962 854 963 855 # BOOST_GRAPH([PREFERRED-RT-OPT] )964 # BOOST_GRAPH([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE]) 856 965 # ------------------------------- 857 966 # Look for Boost.Graphs. For the documentation of PREFERRED-RT-OPT, see the … … 862 971 # Link-time dependency from graph to regex was added as of 1.40.0. 863 972 if test $boost_major_version -ge 140; then 864 BOOST_REGEX([$1] )973 BOOST_REGEX([$1], [$2]) 865 974 m4_pattern_allow([^BOOST_REGEX_(LIBS|LDFLAGS)$])dnl 866 975 LIBS="$LIBS $BOOST_REGEX_LIBS" … … 868 977 fi 869 978 BOOST_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]) 871 981 LIBS=$boost_graph_save_LIBS 872 982 LDFLAGS=$boost_graph_save_LDFLAGS … … 881 991 882 992 883 # BOOST_IOSTREAMS([PREFERRED-RT-OPT] )993 # BOOST_IOSTREAMS([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE]) 884 994 # ----------------------------------- 885 995 # Look for Boost.IOStreams. For the documentation of PREFERRED-RT-OPT, see the … … 888 998 [BOOST_FIND_LIB([iostreams], [$1], 889 999 [boost/iostreams/device/file_descriptor.hpp], 890 [boost::iostreams::file_descriptor fd; fd.close();]) 1000 [boost::iostreams::file_descriptor fd; fd.close();], 1001 [], [], [$2]) 891 1002 ])# BOOST_IOSTREAMS 892 1003 … … 906 1017 907 1018 908 # BOOST_LOCALE( )1019 # BOOST_LOCALE([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE]) 909 1020 # -------------- 910 1021 # Look for Boost.Locale … … 915 1026 # require SYSTEM for boost-1.50.0 and up 916 1027 if test $boost_major_version -ge 150; then 917 BOOST_SYSTEM([$1] )1028 BOOST_SYSTEM([$1], [$2]) 918 1029 m4_pattern_allow([^BOOST_SYSTEM_(LIBS|LDFLAGS)$])dnl 919 1030 LIBS="$LIBS $BOOST_SYSTEM_LIBS" … … 922 1033 BOOST_FIND_LIB([locale], [$1], 923 1034 [boost/locale.hpp], 924 [[boost::locale::generator gen; std::locale::global(gen(""));]] )1035 [[boost::locale::generator gen; std::locale::global(gen(""));]], [], [], [$2]) 925 1036 LIBS=$boost_locale_save_LIBS 926 1037 LDFLAGS=$boost_locale_save_LDFLAGS 927 1038 ])# BOOST_LOCALE 928 1039 929 # BOOST_LOG([PREFERRED-RT-OPT] )1040 # BOOST_LOG([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE]) 930 1041 # ----------------------------- 931 1042 # Look for Boost.Log. For the documentation of PREFERRED-RT-OPT, see the … … 934 1045 [boost_log_save_LIBS=$LIBS 935 1046 boost_log_save_LDFLAGS=$LDFLAGS 936 BOOST_SYSTEM([$1] )937 BOOST_FILESYSTEM([$1] )938 BOOST_DATE_TIME([$1] )1047 BOOST_SYSTEM([$1], [$2]) 1048 BOOST_FILESYSTEM([$1], [$2]) 1049 BOOST_DATE_TIME([$1], [$2]) 939 1050 m4_pattern_allow([^BOOST_(SYSTEM|FILESYSTEM|DATE_TIME)_(LIBS|LDFLAGS)$])dnl 940 1051 LIBS="$LIBS $BOOST_DATE_TIME_LIBS $BOOST_FILESYSTEM_LIBS $BOOST_SYSTEM_LIBS" … … 942 1053 BOOST_FIND_LIB([log], [$1], 943 1054 [boost/log/core/core.hpp], 944 [boost::log::attribute a; a.get_value();] )1055 [boost::log::attribute a; a.get_value();], [], [], [$2]) 945 1056 LIBS=$boost_log_save_LIBS 946 1057 LDFLAGS=$boost_log_save_LDFLAGS … … 948 1059 949 1060 950 # BOOST_LOG_SETUP([PREFERRED-RT-OPT] )1061 # BOOST_LOG_SETUP([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE]) 951 1062 # ----------------------------------- 952 1063 # Look for Boost.Log. For the documentation of PREFERRED-RT-OPT, see the … … 961 1072 BOOST_FIND_LIB([log_setup], [$1], 962 1073 [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]) 964 1075 LIBS=$boost_log_setup_save_LIBS 965 1076 LDFLAGS=$boost_log_setup_save_LDFLAGS … … 979 1090 980 1091 981 # BOOST_MPI([PREFERRED-RT-OPT] )1092 # BOOST_MPI([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE]) 982 1093 # ------------------------------- 983 1094 # Look for Boost MPI. For the documentation of PREFERRED-RT-OPT, see the … … 996 1107 [int argc = 0; 997 1108 char **argv = 0; 998 boost::mpi::environment env(argc,argv);]) 1109 boost::mpi::environment env(argc,argv);], 1110 [], [], [$2]) 999 1111 CXX=${boost_save_CXX} 1000 1112 CXXCPP=${boost_save_CXXCPP} … … 1039 1151 1040 1152 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. 1157 BOOST_DEFUN([Numpy], 1158 [m4_pattern_allow([^BOOST_PYTHON_(LIBS|LDFLAGS)$])dnl 1159 LIBS="$LIBS $BOOST_PYTHON_LIBS $BOOST_PYTHON_LIB" 1160 LDFLAGS="$LDFLAGS $BOOST_PYTHON_LDFLAGS" 1161 CPPFLAGS="$CPPFLAGS $BOOST_PYTHON_CPPFLAGS" 1162 BOOST_FIND_LIBS([numpy], [numpy numpy3], [$1], 1163 [boost/python/numpy.hpp], 1164 [ boost::python::numpy::initialize();], []) 1165 CPPFLAGS=$boost_numpy_save_CPPFLAGS 1166 LDFLAGS=$boost_numpy_save_LDFLAGS 1167 LIBS=$boost_numpy_save_LIBS 1168 ])# BOOST_NUMPY 1169 1170 1041 1171 # BOOST_OPTIONAL() 1042 1172 # ---------------- … … 1053 1183 1054 1184 1055 # BOOST_PROPERTY_TREE([PREFERRED-RT-OPT] )1185 # BOOST_PROPERTY_TREE([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE]) 1056 1186 # ----------------------------------------- 1057 1187 # Look for Boost.Property_Tree. For the documentation of PREFERRED-RT-OPT, … … 1060 1190 [BOOST_FIND_LIB([property_tree], [$1], 1061 1191 [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]) 1063 1194 ])# BOOST_PROPERTY_TREE 1064 1195 … … 1091 1222 1092 1223 1093 # BOOST_PROGRAM_OPTIONS([PREFERRED-RT-OPT] )1224 # BOOST_PROGRAM_OPTIONS([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE]) 1094 1225 # ----------------------------------------- 1095 1226 # Look for Boost.Program_options. For the documentation of PREFERRED-RT-OPT, … … 1098 1229 [BOOST_FIND_LIB([program_options], [$1], 1099 1230 [boost/program_options.hpp], 1100 [boost::program_options::options_description d("test");]) 1231 [boost::program_options::options_description d("test");], 1232 [], [], [$2]) 1101 1233 ])# BOOST_PROGRAM_OPTIONS 1102 1234 1103 1235 1104 1236 1105 # _BOOST_PYTHON_CONFIG(VARIABLE, FLAG )1237 # _BOOST_PYTHON_CONFIG(VARIABLE, FLAG, OPT) 1106 1238 # ------------------------------------ 1107 1239 # Save VARIABLE, and define it via `python-config --FLAG`. … … 1109 1241 m4_define([_BOOST_PYTHON_CONFIG], 1110 1242 [AC_SUBST([BOOST_PYTHON_$1], 1111 [ `python-config --$2 2>/dev/null`])dnl1243 [$3`python-config --$2 2>/dev/null`])dnl 1112 1244 boost_python_save_$1=$$1 1113 1245 $1="$$1 $BOOST_PYTHON_$1"]) 1114 1246 1115 1247 1116 # BOOST_PYTHON([PREFERRED-RT-OPT] )1248 # BOOST_PYTHON([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE]) 1117 1249 # -------------------------------- 1118 1250 # Look for Boost.Python. For the documentation of PREFERRED-RT-OPT, … … 1121 1253 [_BOOST_PYTHON_CONFIG([CPPFLAGS], [includes]) 1122 1254 _BOOST_PYTHON_CONFIG([LDFLAGS], [ldflags]) 1123 _BOOST_PYTHON_CONFIG([LIBS], [libs]) 1255 _BOOST_PYTHON_CONFIG([LIBS], [libs], [""]) 1256 AC_SUBST([BOOST_PYTHON_LIB], [$BOOST_PYTHON_LIBS]) 1124 1257 m4_pattern_allow([^BOOST_PYTHON_MODULE$])dnl 1125 1258 BOOST_FIND_LIBS([python], [python python3], [$1], 1126 1259 [boost/python.hpp], 1127 [], [BOOST_PYTHON_MODULE(empty) {}] )1260 [], [BOOST_PYTHON_MODULE(empty) {}], [], [$2]) 1128 1261 CPPFLAGS=$boost_python_save_CPPFLAGS 1129 1262 LDFLAGS=$boost_python_save_LDFLAGS … … 1139 1272 1140 1273 1141 # BOOST_REGEX([PREFERRED-RT-OPT] )1274 # BOOST_REGEX([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE]) 1142 1275 # ------------------------------- 1143 1276 # Look for Boost.Regex. For the documentation of PREFERRED-RT-OPT, see the … … 1146 1279 [BOOST_FIND_LIB([regex], [$1], 1147 1280 [boost/regex.hpp], 1148 [boost::regex exp("*"); boost::regex_match("foo", exp);]) 1281 [boost::regex exp("*"); boost::regex_match("foo", exp);], 1282 [], [], [$2]) 1149 1283 ])# BOOST_REGEX 1150 1284 1151 1285 1152 # BOOST_SERIALIZATION([PREFERRED-RT-OPT]) 1286 # BOOST_SCOPE_EXIT() 1287 # ------------ 1288 # Look for Boost.ScopeExit. 1289 BOOST_DEFUN([SCOPE_EXIT], 1290 [BOOST_FIND_HEADER([boost/scope_exit.hpp])]) 1291 1292 1293 # BOOST_SERIALIZATION([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE]) 1153 1294 # --------------------------------------- 1154 1295 # Look for Boost.Serialization. For the documentation of PREFERRED-RT-OPT, see … … 1158 1299 [boost/archive/text_oarchive.hpp], 1159 1300 [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]) 1161 1303 ])# BOOST_SERIALIZATION 1162 1304 1163 1305 1164 # BOOST_SIGNALS([PREFERRED-RT-OPT] )1306 # BOOST_SIGNALS([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE]) 1165 1307 # --------------------------------- 1166 1308 # Look for Boost.Signals. For the documentation of PREFERRED-RT-OPT, see the … … 1169 1311 [BOOST_FIND_LIB([signals], [$1], 1170 1312 [boost/signal.hpp], 1171 [boost::signal<void ()> s;]) 1313 [boost::signal<void ()> s;], 1314 [], [], [$2]) 1172 1315 ])# BOOST_SIGNALS 1173 1316 … … 1205 1348 1206 1349 1207 # BOOST_SYSTEM([PREFERRED-RT-OPT] )1350 # BOOST_SYSTEM([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE]) 1208 1351 # -------------------------------- 1209 1352 # Look for Boost.System. For the documentation of PREFERRED-RT-OPT, see the … … 1213 1356 [BOOST_FIND_LIB([system], [$1], 1214 1357 [boost/system/error_code.hpp], 1215 [boost::system::error_code e; e.clear();] )1358 [boost::system::error_code e; e.clear();], [], [], [$2]) 1216 1359 ])# BOOST_SYSTEM 1217 1360 1218 1361 1219 # BOOST_TEST([PREFERRED-RT-OPT] )1362 # BOOST_TEST([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE]) 1220 1363 # ------------------------------ 1221 1364 # Look for Boost.Test. For the documentation of PREFERRED-RT-OPT, see the … … 1227 1370 [using boost::unit_test::test_suite; 1228 1371 test_suite* init_unit_test_suite(int argc, char ** argv) 1229 { return NULL; }] )1372 { return NULL; }], [], [$2]) 1230 1373 ])# BOOST_TEST 1231 1374 1232 1375 1233 # BOOST_THREAD([PREFERRED-RT-OPT] )1376 # BOOST_THREAD([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE]) 1234 1377 # --------------------------------- 1235 1378 # Look for Boost.Thread. For the documentation of PREFERRED-RT-OPT, see the … … 1245 1388 # Link-time dependency from thread to system was added as of 1.49.0. 1246 1389 if test $boost_major_version -ge 149; then 1247 BOOST_SYSTEM([$1] )1390 BOOST_SYSTEM([$1], [$2]) 1248 1391 fi # end of the Boost.System check. 1249 1392 m4_pattern_allow([^BOOST_SYSTEM_(LIBS|LDFLAGS)$])dnl … … 1264 1407 BOOST_FIND_LIBS([thread], [thread$boost_thread_lib_ext], 1265 1408 [$1], 1266 [boost/thread.hpp], [boost::thread t; boost::mutex m;] )1409 [boost/thread.hpp], [boost::thread t; boost::mutex m;], [], [], [$2]) 1267 1410 1268 1411 case $host_os in … … 1340 1483 1341 1484 1342 # BOOST_WAVE([PREFERRED-RT-OPT] )1485 # BOOST_WAVE([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE]) 1343 1486 # ------------------------------ 1344 1487 # NOTE: If you intend to use Wave/Spirit with thread support, make sure you … … 1358 1501 BOOST_FIND_LIB([wave], [$1], 1359 1502 [boost/wave.hpp], 1360 [boost::wave::token_id id; get_token_name(id);] )1503 [boost::wave::token_id id; get_token_name(id);], [], [], [$2]) 1361 1504 LIBS=$boost_wave_save_LIBS 1362 1505 LDFLAGS=$boost_wave_save_LDFLAGS … … 1426 1569 esac 1427 1570 # 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);])]) 1432 1576 for boost_pthread_flag in '' $boost_pthread_flags; do 1433 1577 boost_pthread_ok=false … … 1491 1635 # the same defines as GCC's). 1492 1636 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) \ 1493 1698 _BOOST_mingw_test(6, 2) \ 1494 1699 _BOOST_gcc_test(6, 2) \ … … 1497 1702 _BOOST_mingw_test(6, 0) \ 1498 1703 _BOOST_gcc_test(6, 0) \ 1704 _BOOST_mingw_test(5, 5) \ 1705 _BOOST_gcc_test(5, 5) \ 1499 1706 _BOOST_mingw_test(5, 4) \ 1500 1707 _BOOST_gcc_test(5, 4) \ -
ThirdParty/JobMarket/m4/boost.m4
r44ce58 r6dde30 23 23 24 24 m4_define([_BOOST_SERIAL], [m4_translit([ 25 # serial 2625 # serial 36 26 26 ], [# 27 27 ], [])]) … … 289 289 # BOOST_FIND_LIBS([COMPONENT-NAME], [CANDIDATE-LIB-NAMES], 290 290 # [PREFERRED-RT-OPT], [HEADER-NAME], [CXX-TEST], 291 # [CXX-PROLOGUE]) 291 # [CXX-PROLOGUE], [CXX-POST-INCLUDE-PROLOGUE], 292 # [ERROR_ON_UNUSABLE]) 292 293 # -------------------------------------------------------------- 293 294 # Look for the Boost library COMPONENT-NAME (e.g., `thread', for … … 296 297 # libboost_LIB-NAME can link with the code CXX-TEST. The optional 297 298 # 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>'. 299 302 # 300 303 # Invokes BOOST_FIND_HEADER([HEADER-NAME]) (see above). … … 310 313 # ... If you want to make sure you have a specific version of Boost 311 314 # (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 312 318 AC_DEFUN([BOOST_FIND_LIBS], 313 319 [AC_REQUIRE([BOOST_REQUIRE])dnl … … 318 324 AC_MSG_NOTICE([Boost not available, not searching for the Boost $1 library]) 319 325 else 320 dnl The else branch is huge and wasn't in tended on purpose.326 dnl The else branch is huge and wasn't indented on purpose. 321 327 AC_LANG_PUSH([C++])dnl 322 328 AS_VAR_PUSHDEF([Boost_lib], [boost_cv_lib_$1])dnl … … 324 330 AS_VAR_PUSHDEF([Boost_lib_LDPATH], [boost_cv_lib_$1_LDPATH])dnl 325 331 AS_VAR_PUSHDEF([Boost_lib_LIBS], [boost_cv_lib_$1_LIBS])dnl 326 BOOST_FIND_HEADER([$4]) 332 AS_IF([test x"$8" = "xno"], [not_found_header='true']) 333 BOOST_FIND_HEADER([$4], [$not_found_header]) 327 334 boost_save_CPPFLAGS=$CPPFLAGS 328 335 CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" … … 330 337 [_BOOST_FIND_LIBS($@)]) 331 338 case $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 ;; 332 346 (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 ]) 334 350 ;; 335 351 esac 336 AC_SUBST(AS_TR_CPP([BOOST_$1_LDFLAGS]), [$Boost_lib_LDFLAGS])dnl337 AC_SUBST(AS_TR_CPP([BOOST_$1_LDPATH]), [$Boost_lib_LDPATH])dnl338 AC_SUBST([BOOST_LDPATH], [$Boost_lib_LDPATH])dnl339 AC_SUBST(AS_TR_CPP([BOOST_$1_LIBS]), [$Boost_lib_LIBS])dnl340 352 CPPFLAGS=$boost_save_CPPFLAGS 341 353 AS_VAR_POPDEF([Boost_lib])dnl … … 350 362 # BOOST_FIND_LIB([LIB-NAME], 351 363 # [PREFERRED-RT-OPT], [HEADER-NAME], [CXX-TEST], 352 # [CXX-PROLOGUE]) 364 # [CXX-PROLOGUE], [CXX-POST-INCLUDE-PROLOGUE], 365 # [ERROR_ON_UNUSABLE]) 353 366 # -------------------------------------------------------------- 354 367 # 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 355 370 AC_DEFUN([BOOST_FIND_LIB], 356 371 [BOOST_FIND_LIBS([$1], $@)]) … … 359 374 # _BOOST_FIND_LIBS([LIB-NAME], [CANDIDATE-LIB-NAMES], 360 375 # [PREFERRED-RT-OPT], [HEADER-NAME], [CXX-TEST], 361 # [CXX-PROLOGUE]) 376 # [CXX-PROLOGUE], [CXX-POST-INCLUDE-PROLOGUE], 377 # [ERROR_ON_UNUSABLE]) 362 378 # -------------------------------------------------------------- 363 379 # Real implementation of BOOST_FIND_LIBS: rely on these local macros: … … 371 387 # to enforce -mt (for instance on MacOSX, libboost_thread.dylib 372 388 # 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 373 392 AC_DEFUN([_BOOST_FIND_LIBS], 374 393 [Boost_lib=no 375 394 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-*\(.*\)'`;; #( 378 397 (*) boost_mt=; boost_rtopt=$3;; 379 398 esac … … 397 416 boost_save_ac_objext=$ac_objext 398 417 # Generate the test file. 399 AC_LANG_CONFTEST([AC_LANG_PROGRAM([#include <$4> 418 AC_LANG_CONFTEST([AC_LANG_PROGRAM([$7 419 #include <$4> 400 420 $6], [$5])]) 401 421 dnl Optimization hacks: compiling C++ is slow, especially with Boost. What … … 417 437 AC_COMPILE_IFELSE([], 418 438 [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 ]) 420 443 ac_objext=$boost_save_ac_objext 421 444 boost_failed_libs= … … 425 448 for boost_tag_ in -$boost_cv_lib_tag ''; do 426 449 for boost_ver_ in -$boost_cv_lib_version ''; do 427 for boost_mt_ in $boost_mt -mt ''; do450 for boost_mt_ in $boost_mt -mt -mt-x64 ''; do 428 451 for 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_ 434 458 do 459 boost_real_suffix=`echo "$boost_full_suffix" | sed 's/^x//'` 460 boost_lib="boost_$boost_lib_$boost_real_suffix" 435 461 # Avoid testing twice the same lib 436 462 case $boost_failed_libs in #( … … 481 507 for boost_cv_rpath_link_ldflag in -Wl,-R, -Wl,-rpath,; do 482 508 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" 484 510 _BOOST_AC_LINK_IFELSE([], 485 511 [boost_rpath_link_ldflag_found=yes … … 497 523 Boost_lib_LDFLAGS="-L$boost_ldpath $boost_cv_rpath_link_ldflag$boost_ldpath" 498 524 Boost_lib_LDPATH="$boost_ldpath" 525 boost_last_suffix="$boost_full_suffix" 499 526 break 7 500 527 else … … 571 598 572 599 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. 604 BOOST_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 573 618 # BOOST_BIND() 574 619 # ------------ … … 585 630 586 631 587 # BOOST_CHRONO( )632 # BOOST_CHRONO([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE]) 588 633 # -------------- 589 634 # Look for Boost.Chrono. … … 593 638 # find Boost.System as it didn't exist by then. 594 639 if test $boost_major_version -ge 135; then 595 BOOST_SYSTEM([$1] )640 BOOST_SYSTEM([$1], [$2]) 596 641 fi # end of the Boost.System check. 597 642 boost_filesystem_save_LIBS=$LIBS … … 602 647 BOOST_FIND_LIB([chrono], [$1], 603 648 [boost/chrono.hpp], 604 [boost::chrono::thread_clock d;] )649 [boost::chrono::thread_clock d;], [], [], [$2]) 605 650 if test $enable_static_boost = yes && test $boost_major_version -ge 135; then 606 651 BOOST_CHRONO_LIBS="$BOOST_CHRONO_LIBS $BOOST_SYSTEM_LIBS" … … 611 656 612 657 613 # BOOST_CONTEXT([PREFERRED-RT-OPT] )658 # BOOST_CONTEXT([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE]) 614 659 # ----------------------------------- 615 660 # Look for Boost.Context. For the documentation of PREFERRED-RT-OPT, see the … … 619 664 # * The signatures of make_fcontext() and jump_fcontext were changed in 1.56.0 620 665 # * 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 621 671 BOOST_DEFUN([Context], 622 672 [boost_context_save_LIBS=$LIBS 623 673 boost_context_save_LDFLAGS=$LDFLAGS 624 674 if test $boost_major_version -ge 157; then 625 BOOST_THREAD([$1] )675 BOOST_THREAD([$1], [$2]) 626 676 m4_pattern_allow([^BOOST_THREAD_(LIBS|LDFLAGS)$])dnl 627 677 LIBS="$LIBS $BOOST_THREAD_LIBS" 628 678 LDFLAGS="$LDFLAGS $BOOST_THREAD_LDFLAGS" 629 679 fi 680 681 if test $boost_major_version -ge 169; then 682 630 683 BOOST_FIND_LIB([context], [$1], 631 [boost/context/all.hpp],[[ 684 [boost/context/fiber.hpp], [[ 685 namespace ctx=boost::context; 686 int a; 687 ctx::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 }}; 698 for (int j=0;j<10;++j) { 699 source=std::move(source).resume(); 700 } 701 return a == 34; 702 ]], [], [], [$2]) 703 704 elif test $boost_major_version -ge 161; then 705 706 BOOST_FIND_LIB([context], [$1], 707 [boost/context/execution_context_v2.hpp], [[ 708 namespace ctx=boost::context; 709 int res=0; 710 int n=35; 711 ctx::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 }); 724 for(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 } 729 return res == 34; 730 ]], [], [], [$2]) 731 732 else 733 734 BOOST_FIND_LIB([context], [$1], 735 [boost/context/fcontext.hpp],[[ 632 736 633 737 // creates a stack … … 684 788 } 685 789 #endif 686 ]) 790 ], [], [], [$2]) 791 792 fi 793 687 794 LIBS=$boost_context_save_LIBS 688 795 LDFLAGS=$boost_context_save_LDFLAGS … … 699 806 700 807 701 # BOOST_COROUTINE([PREFERRED-RT-OPT] )808 # BOOST_COROUTINE([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE]) 702 809 # ----------------------------------- 703 810 # Look for Boost.Coroutine. For the documentation of PREFERRED-RT-OPT, see the … … 709 816 boost_coroutine_save_LDFLAGS=$LDFLAGS 710 817 # Link-time dependency from coroutine to context 711 BOOST_CONTEXT([$1] )818 BOOST_CONTEXT([$1], [$2]) 712 819 # Starting from Boost 1.55 a dependency on Boost.System is added 713 820 if test $boost_major_version -ge 155; then 714 BOOST_SYSTEM([$1] )821 BOOST_SYSTEM([$1], [$2]) 715 822 fi 716 823 m4_pattern_allow([^BOOST_(CONTEXT|SYSTEM)_(LIBS|LDFLAGS)]) … … 720 827 # in 1.53 coroutine was a header only library 721 828 if 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]) 723 831 else 724 832 BOOST_FIND_LIB([coroutine], [$1], … … 731 839 boost::coroutines::asymmetric_coroutine<int>::pull_type coro; coro.get(); 732 840 #endif 733 ] )841 ], [], [], [$2]) 734 842 fi 735 843 # Link-time dependency from coroutine to context, existed only in 1.53, in 1.54 … … 756 864 757 865 758 # BOOST_DATE_TIME([PREFERRED-RT-OPT] )866 # BOOST_DATE_TIME([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE]) 759 867 # ----------------------------------- 760 868 # Look for Boost.Date_Time. For the documentation of PREFERRED-RT-OPT, see the … … 763 871 [BOOST_FIND_LIB([date_time], [$1], 764 872 [boost/date_time/posix_time/posix_time.hpp], 765 [boost::posix_time::ptime t;] )873 [boost::posix_time::ptime t;], [], [], [$2]) 766 874 ])# BOOST_DATE_TIME 767 875 … … 774 882 775 883 776 # BOOST_FILESYSTEM([PREFERRED-RT-OPT] )884 # BOOST_FILESYSTEM([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE]) 777 885 # ------------------------------------ 778 886 # Look for Boost.Filesystem. For the documentation of PREFERRED-RT-OPT, see … … 785 893 # find Boost.System as it didn't exist by then. 786 894 if test $boost_major_version -ge 135; then 787 BOOST_SYSTEM([$1] )895 BOOST_SYSTEM([$1], [$2]) 788 896 fi # end of the Boost.System check. 789 897 boost_filesystem_save_LIBS=$LIBS … … 793 901 LDFLAGS="$LDFLAGS $BOOST_SYSTEM_LDFLAGS" 794 902 BOOST_FIND_LIB([filesystem], [$1], 795 [boost/filesystem/path.hpp], [boost::filesystem::path p;]) 903 [boost/filesystem/path.hpp], [boost::filesystem::path p;], 904 [], [], [$2]) 796 905 if test $enable_static_boost = yes && test $boost_major_version -ge 135; then 797 906 BOOST_FILESYSTEM_LIBS="$BOOST_FILESYSTEM_LIBS $BOOST_SYSTEM_LIBS" … … 853 962 854 963 855 # BOOST_GRAPH([PREFERRED-RT-OPT] )964 # BOOST_GRAPH([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE]) 856 965 # ------------------------------- 857 966 # Look for Boost.Graphs. For the documentation of PREFERRED-RT-OPT, see the … … 862 971 # Link-time dependency from graph to regex was added as of 1.40.0. 863 972 if test $boost_major_version -ge 140; then 864 BOOST_REGEX([$1] )973 BOOST_REGEX([$1], [$2]) 865 974 m4_pattern_allow([^BOOST_REGEX_(LIBS|LDFLAGS)$])dnl 866 975 LIBS="$LIBS $BOOST_REGEX_LIBS" … … 868 977 fi 869 978 BOOST_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]) 871 981 LIBS=$boost_graph_save_LIBS 872 982 LDFLAGS=$boost_graph_save_LDFLAGS … … 881 991 882 992 883 # BOOST_IOSTREAMS([PREFERRED-RT-OPT] )993 # BOOST_IOSTREAMS([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE]) 884 994 # ----------------------------------- 885 995 # Look for Boost.IOStreams. For the documentation of PREFERRED-RT-OPT, see the … … 888 998 [BOOST_FIND_LIB([iostreams], [$1], 889 999 [boost/iostreams/device/file_descriptor.hpp], 890 [boost::iostreams::file_descriptor fd; fd.close();]) 1000 [boost::iostreams::file_descriptor fd; fd.close();], 1001 [], [], [$2]) 891 1002 ])# BOOST_IOSTREAMS 892 1003 … … 906 1017 907 1018 908 # BOOST_LOCALE( )1019 # BOOST_LOCALE([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE]) 909 1020 # -------------- 910 1021 # Look for Boost.Locale … … 915 1026 # require SYSTEM for boost-1.50.0 and up 916 1027 if test $boost_major_version -ge 150; then 917 BOOST_SYSTEM([$1] )1028 BOOST_SYSTEM([$1], [$2]) 918 1029 m4_pattern_allow([^BOOST_SYSTEM_(LIBS|LDFLAGS)$])dnl 919 1030 LIBS="$LIBS $BOOST_SYSTEM_LIBS" … … 922 1033 BOOST_FIND_LIB([locale], [$1], 923 1034 [boost/locale.hpp], 924 [[boost::locale::generator gen; std::locale::global(gen(""));]] )1035 [[boost::locale::generator gen; std::locale::global(gen(""));]], [], [], [$2]) 925 1036 LIBS=$boost_locale_save_LIBS 926 1037 LDFLAGS=$boost_locale_save_LDFLAGS 927 1038 ])# BOOST_LOCALE 928 1039 929 # BOOST_LOG([PREFERRED-RT-OPT] )1040 # BOOST_LOG([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE]) 930 1041 # ----------------------------- 931 1042 # Look for Boost.Log. For the documentation of PREFERRED-RT-OPT, see the … … 934 1045 [boost_log_save_LIBS=$LIBS 935 1046 boost_log_save_LDFLAGS=$LDFLAGS 936 BOOST_SYSTEM([$1] )937 BOOST_FILESYSTEM([$1] )938 BOOST_DATE_TIME([$1] )1047 BOOST_SYSTEM([$1], [$2]) 1048 BOOST_FILESYSTEM([$1], [$2]) 1049 BOOST_DATE_TIME([$1], [$2]) 939 1050 m4_pattern_allow([^BOOST_(SYSTEM|FILESYSTEM|DATE_TIME)_(LIBS|LDFLAGS)$])dnl 940 1051 LIBS="$LIBS $BOOST_DATE_TIME_LIBS $BOOST_FILESYSTEM_LIBS $BOOST_SYSTEM_LIBS" … … 942 1053 BOOST_FIND_LIB([log], [$1], 943 1054 [boost/log/core/core.hpp], 944 [boost::log::attribute a; a.get_value();] )1055 [boost::log::attribute a; a.get_value();], [], [], [$2]) 945 1056 LIBS=$boost_log_save_LIBS 946 1057 LDFLAGS=$boost_log_save_LDFLAGS … … 948 1059 949 1060 950 # BOOST_LOG_SETUP([PREFERRED-RT-OPT] )1061 # BOOST_LOG_SETUP([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE]) 951 1062 # ----------------------------------- 952 1063 # Look for Boost.Log. For the documentation of PREFERRED-RT-OPT, see the … … 961 1072 BOOST_FIND_LIB([log_setup], [$1], 962 1073 [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]) 964 1075 LIBS=$boost_log_setup_save_LIBS 965 1076 LDFLAGS=$boost_log_setup_save_LDFLAGS … … 979 1090 980 1091 981 # BOOST_MPI([PREFERRED-RT-OPT] )1092 # BOOST_MPI([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE]) 982 1093 # ------------------------------- 983 1094 # Look for Boost MPI. For the documentation of PREFERRED-RT-OPT, see the … … 996 1107 [int argc = 0; 997 1108 char **argv = 0; 998 boost::mpi::environment env(argc,argv);]) 1109 boost::mpi::environment env(argc,argv);], 1110 [], [], [$2]) 999 1111 CXX=${boost_save_CXX} 1000 1112 CXXCPP=${boost_save_CXXCPP} … … 1039 1151 1040 1152 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. 1157 BOOST_DEFUN([Numpy], 1158 [m4_pattern_allow([^BOOST_PYTHON_(LIBS|LDFLAGS)$])dnl 1159 LIBS="$LIBS $BOOST_PYTHON_LIBS $BOOST_PYTHON_LIB" 1160 LDFLAGS="$LDFLAGS $BOOST_PYTHON_LDFLAGS" 1161 CPPFLAGS="$CPPFLAGS $BOOST_PYTHON_CPPFLAGS" 1162 BOOST_FIND_LIBS([numpy], [numpy numpy3], [$1], 1163 [boost/python/numpy.hpp], 1164 [ boost::python::numpy::initialize();], []) 1165 CPPFLAGS=$boost_numpy_save_CPPFLAGS 1166 LDFLAGS=$boost_numpy_save_LDFLAGS 1167 LIBS=$boost_numpy_save_LIBS 1168 ])# BOOST_NUMPY 1169 1170 1041 1171 # BOOST_OPTIONAL() 1042 1172 # ---------------- … … 1053 1183 1054 1184 1055 # BOOST_PROPERTY_TREE([PREFERRED-RT-OPT] )1185 # BOOST_PROPERTY_TREE([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE]) 1056 1186 # ----------------------------------------- 1057 1187 # Look for Boost.Property_Tree. For the documentation of PREFERRED-RT-OPT, … … 1060 1190 [BOOST_FIND_LIB([property_tree], [$1], 1061 1191 [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]) 1063 1194 ])# BOOST_PROPERTY_TREE 1064 1195 … … 1091 1222 1092 1223 1093 # BOOST_PROGRAM_OPTIONS([PREFERRED-RT-OPT] )1224 # BOOST_PROGRAM_OPTIONS([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE]) 1094 1225 # ----------------------------------------- 1095 1226 # Look for Boost.Program_options. For the documentation of PREFERRED-RT-OPT, … … 1098 1229 [BOOST_FIND_LIB([program_options], [$1], 1099 1230 [boost/program_options.hpp], 1100 [boost::program_options::options_description d("test");]) 1231 [boost::program_options::options_description d("test");], 1232 [], [], [$2]) 1101 1233 ])# BOOST_PROGRAM_OPTIONS 1102 1234 1103 1235 1104 1236 1105 # _BOOST_PYTHON_CONFIG(VARIABLE, FLAG )1237 # _BOOST_PYTHON_CONFIG(VARIABLE, FLAG, OPT) 1106 1238 # ------------------------------------ 1107 1239 # Save VARIABLE, and define it via `python-config --FLAG`. … … 1109 1241 m4_define([_BOOST_PYTHON_CONFIG], 1110 1242 [AC_SUBST([BOOST_PYTHON_$1], 1111 [ `python-config --$2 2>/dev/null`])dnl1243 [$3`python-config --$2 2>/dev/null`])dnl 1112 1244 boost_python_save_$1=$$1 1113 1245 $1="$$1 $BOOST_PYTHON_$1"]) 1114 1246 1115 1247 1116 # BOOST_PYTHON([PREFERRED-RT-OPT] )1248 # BOOST_PYTHON([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE]) 1117 1249 # -------------------------------- 1118 1250 # Look for Boost.Python. For the documentation of PREFERRED-RT-OPT, … … 1121 1253 [_BOOST_PYTHON_CONFIG([CPPFLAGS], [includes]) 1122 1254 _BOOST_PYTHON_CONFIG([LDFLAGS], [ldflags]) 1123 _BOOST_PYTHON_CONFIG([LIBS], [libs]) 1255 _BOOST_PYTHON_CONFIG([LIBS], [libs], [""]) 1256 AC_SUBST([BOOST_PYTHON_LIB], [$BOOST_PYTHON_LIBS]) 1124 1257 m4_pattern_allow([^BOOST_PYTHON_MODULE$])dnl 1125 1258 BOOST_FIND_LIBS([python], [python python3], [$1], 1126 1259 [boost/python.hpp], 1127 [], [BOOST_PYTHON_MODULE(empty) {}] )1260 [], [BOOST_PYTHON_MODULE(empty) {}], [], [$2]) 1128 1261 CPPFLAGS=$boost_python_save_CPPFLAGS 1129 1262 LDFLAGS=$boost_python_save_LDFLAGS … … 1139 1272 1140 1273 1141 # BOOST_REGEX([PREFERRED-RT-OPT] )1274 # BOOST_REGEX([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE]) 1142 1275 # ------------------------------- 1143 1276 # Look for Boost.Regex. For the documentation of PREFERRED-RT-OPT, see the … … 1146 1279 [BOOST_FIND_LIB([regex], [$1], 1147 1280 [boost/regex.hpp], 1148 [boost::regex exp("*"); boost::regex_match("foo", exp);]) 1281 [boost::regex exp("*"); boost::regex_match("foo", exp);], 1282 [], [], [$2]) 1149 1283 ])# BOOST_REGEX 1150 1284 1151 1285 1152 # BOOST_SERIALIZATION([PREFERRED-RT-OPT]) 1286 # BOOST_SCOPE_EXIT() 1287 # ------------ 1288 # Look for Boost.ScopeExit. 1289 BOOST_DEFUN([SCOPE_EXIT], 1290 [BOOST_FIND_HEADER([boost/scope_exit.hpp])]) 1291 1292 1293 # BOOST_SERIALIZATION([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE]) 1153 1294 # --------------------------------------- 1154 1295 # Look for Boost.Serialization. For the documentation of PREFERRED-RT-OPT, see … … 1158 1299 [boost/archive/text_oarchive.hpp], 1159 1300 [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]) 1161 1303 ])# BOOST_SERIALIZATION 1162 1304 1163 1305 1164 # BOOST_SIGNALS([PREFERRED-RT-OPT] )1306 # BOOST_SIGNALS([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE]) 1165 1307 # --------------------------------- 1166 1308 # Look for Boost.Signals. For the documentation of PREFERRED-RT-OPT, see the … … 1169 1311 [BOOST_FIND_LIB([signals], [$1], 1170 1312 [boost/signal.hpp], 1171 [boost::signal<void ()> s;]) 1313 [boost::signal<void ()> s;], 1314 [], [], [$2]) 1172 1315 ])# BOOST_SIGNALS 1173 1316 … … 1205 1348 1206 1349 1207 # BOOST_SYSTEM([PREFERRED-RT-OPT] )1350 # BOOST_SYSTEM([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE]) 1208 1351 # -------------------------------- 1209 1352 # Look for Boost.System. For the documentation of PREFERRED-RT-OPT, see the … … 1213 1356 [BOOST_FIND_LIB([system], [$1], 1214 1357 [boost/system/error_code.hpp], 1215 [boost::system::error_code e; e.clear();] )1358 [boost::system::error_code e; e.clear();], [], [], [$2]) 1216 1359 ])# BOOST_SYSTEM 1217 1360 1218 1361 1219 # BOOST_TEST([PREFERRED-RT-OPT] )1362 # BOOST_TEST([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE]) 1220 1363 # ------------------------------ 1221 1364 # Look for Boost.Test. For the documentation of PREFERRED-RT-OPT, see the … … 1227 1370 [using boost::unit_test::test_suite; 1228 1371 test_suite* init_unit_test_suite(int argc, char ** argv) 1229 { return NULL; }] )1372 { return NULL; }], [], [$2]) 1230 1373 ])# BOOST_TEST 1231 1374 1232 1375 1233 # BOOST_THREAD([PREFERRED-RT-OPT] )1376 # BOOST_THREAD([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE]) 1234 1377 # --------------------------------- 1235 1378 # Look for Boost.Thread. For the documentation of PREFERRED-RT-OPT, see the … … 1245 1388 # Link-time dependency from thread to system was added as of 1.49.0. 1246 1389 if test $boost_major_version -ge 149; then 1247 BOOST_SYSTEM([$1] )1390 BOOST_SYSTEM([$1], [$2]) 1248 1391 fi # end of the Boost.System check. 1249 1392 m4_pattern_allow([^BOOST_SYSTEM_(LIBS|LDFLAGS)$])dnl … … 1264 1407 BOOST_FIND_LIBS([thread], [thread$boost_thread_lib_ext], 1265 1408 [$1], 1266 [boost/thread.hpp], [boost::thread t; boost::mutex m;] )1409 [boost/thread.hpp], [boost::thread t; boost::mutex m;], [], [], [$2]) 1267 1410 1268 1411 case $host_os in … … 1340 1483 1341 1484 1342 # BOOST_WAVE([PREFERRED-RT-OPT] )1485 # BOOST_WAVE([PREFERRED-RT-OPT], [ERROR_ON_UNUSABLE]) 1343 1486 # ------------------------------ 1344 1487 # NOTE: If you intend to use Wave/Spirit with thread support, make sure you … … 1358 1501 BOOST_FIND_LIB([wave], [$1], 1359 1502 [boost/wave.hpp], 1360 [boost::wave::token_id id; get_token_name(id);] )1503 [boost::wave::token_id id; get_token_name(id);], [], [], [$2]) 1361 1504 LIBS=$boost_wave_save_LIBS 1362 1505 LDFLAGS=$boost_wave_save_LDFLAGS … … 1426 1569 esac 1427 1570 # 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);])]) 1432 1576 for boost_pthread_flag in '' $boost_pthread_flags; do 1433 1577 boost_pthread_ok=false … … 1491 1635 # the same defines as GCC's). 1492 1636 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) \ 1493 1698 _BOOST_mingw_test(6, 2) \ 1494 1699 _BOOST_gcc_test(6, 2) \ … … 1497 1702 _BOOST_mingw_test(6, 0) \ 1498 1703 _BOOST_gcc_test(6, 0) \ 1704 _BOOST_mingw_test(5, 5) \ 1705 _BOOST_gcc_test(5, 5) \ 1499 1706 _BOOST_mingw_test(5, 4) \ 1500 1707 _BOOST_gcc_test(5, 4) \
Note:
See TracChangeset
for help on using the changeset viewer.
