- Timestamp:
- Aug 20, 2014, 12:59:14 PM (10 years ago)
- Branches:
- Action_Thermostats, Add_AtomRandomPerturbation, Add_FitFragmentPartialChargesAction, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Added_ParseSaveFragmentResults, AddingActions_SaveParseParticleParameters, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_ParticleName_to_Atom, Adding_StructOpt_integration_tests, AtomFragments, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.5.4, Candidate_v1.6.0, Candidate_v1.6.1, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, CombiningParticlePotentialParsing, Combining_Subpackages, Debian_Package_split, Debian_package_split_molecuildergui_only, Disabling_MemDebug, Docu_Python_wait, EmpiricalPotential_contain_HomologyGraph, EmpiricalPotential_contain_HomologyGraph_documentation, Enable_parallel_make_install, Enhance_userguide, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Example_ManyWaysToTranslateAtom, Exclude_Hydrogens_annealWithBondGraph, FitPartialCharges_GlobalError, Fix_BoundInBox_CenterInBox_MoleculeActions, Fix_ChargeSampling_PBC, Fix_ChronosMutex, Fix_FitPartialCharges, Fix_FitPotential_needs_atomicnumbers, Fix_ForceAnnealing, Fix_IndependentFragmentGrids, Fix_ParseParticles, Fix_ParseParticles_split_forward_backward_Actions, Fix_PopActions, Fix_QtFragmentList_sorted_selection, Fix_Restrictedkeyset_FragmentMolecule, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, Fix_fitting_potentials, Fixes, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, FragmentAction_writes_AtomFragments, FragmentMolecule_checks_bonddegrees, GeometryObjects, Gui_Fixes, Gui_displays_atomic_force_velocity, ImplicitCharges, IndependentFragmentGrids, IndependentFragmentGrids_IndividualZeroInstances, IndependentFragmentGrids_IntegrationTest, IndependentFragmentGrids_Sole_NN_Calculation, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, MoreRobust_FragmentAutomation, ODR_violation_mpqc_open, PartialCharges_OrthogonalSummation, PdbParser_setsAtomName, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, Rewrite_FitPartialCharges, RotateToPrincipalAxisSystem_UndoRedo, SaturateAtoms_findBestMatching, SaturateAtoms_singleDegree, StoppableMakroAction, Subpackage_CodePatterns, Subpackage_JobMarket, Subpackage_LinearAlgebra, Subpackage_levmar, Subpackage_mpqc_open, Subpackage_vmg, Switchable_LogView, ThirdParty_MPQC_rebuilt_buildsystem, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, TremoloParser_setsAtomName, Ubuntu_1604_changes, stable
- Children:
- 0c74aa
- Parents:
- 3a33e3
- git-author:
- Frederik Heber <heber@…> (08/17/14 19:07:34)
- git-committer:
- Frederik Heber <heber@…> (08/20/14 12:59:14)
- Location:
- m4
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified m4/boost.m4 ¶
r3a33e3 r3b35e7 1 1 # boost.m4: Locate Boost headers and libraries for autoconf-based projects. 2 # Copyright (C) 2007 , 2008, 2009, 2010, 2011Benoit Sigoure <tsuna@lrde.epita.fr>2 # Copyright (C) 2007-2011, 2014 Benoit Sigoure <tsuna@lrde.epita.fr> 3 3 # 4 4 # This program is free software: you can redistribute it and/or modify … … 23 23 24 24 m4_define([_BOOST_SERIAL], [m4_translit([ 25 # serial 1625 # serial 22 26 26 ], [# 27 27 ], [])]) … … 60 60 # value of any macro. 61 61 m4_define([_BOOST_SED_CPP], 62 [AC_LANG_PREPROC_REQUIRE()dnl 62 [AC_LANG_PUSH([C++])dnl 63 AC_LANG_PREPROC_REQUIRE()dnl 63 64 AC_REQUIRE([AC_PROG_SED])dnl 64 65 AC_LANG_CONFTEST([AC_LANG_SOURCE([[$2]])]) … … 78 79 [$4]) 79 80 rm -rf conftest* 80 ])# AC_EGREP_CPP 81 AC_LANG_POP([C++])dnl 82 ])# _BOOST_SED_CPP 81 83 82 84 … … 135 137 # If the user provided a value to --with-boost, use it and only it. 136 138 case $with_boost in #( 137 ''|yes) set x '' /usr/local/include /usr/include \ 138 /opt/local/include /opt/include \ 139 C:/Boost/include;; #( 139 ''|yes) set x '' /opt/local/include /usr/local/include /opt/include \ 140 /usr/include C:/Boost/include;; #( 140 141 *) set x "$with_boost/include" "$with_boost";; 141 142 esac … … 223 224 ])# BOOST_REQUIRE 224 225 226 225 227 # BOOST_STATIC() 226 228 # -------------- … … 229 231 AC_DEFUN([BOOST_STATIC], 230 232 [AC_ARG_ENABLE([static-boost], 231 [A C_HELP_STRING([--enable-static-boost],233 [AS_HELP_STRING([--enable-static-boost], 232 234 [Prefer the static boost libraries over the shared ones [no]])], 233 235 [enable_static_boost=yes], 234 236 [enable_static_boost=no])])# BOOST_STATIC 237 235 238 236 239 # BOOST_FIND_HEADER([HEADER-NAME], [ACTION-IF-NOT-FOUND], [ACTION-IF-FOUND]) … … 266 269 267 270 268 # BOOST_FIND_LIB([LIB-NAME], [PREFERRED-RT-OPT], [HEADER-NAME], [CXX-TEST], 269 # [CXX-PROLOGUE]) 270 # ------------------------------------------------------------------------- 271 # Look for the Boost library LIB-NAME (e.g., LIB-NAME = `thread', for 272 # libboost_thread). Check that HEADER-NAME works and check that 273 # libboost_LIB-NAME can link with the code CXX-TEST. The optional argument 274 # CXX-PROLOGUE can be used to include some C++ code before the `main' 275 # function. 271 # BOOST_FIND_LIBS([COMPONENT-NAME], [CANDIDATE-LIB-NAMES], 272 # [PREFERRED-RT-OPT], [HEADER-NAME], [CXX-TEST], 273 # [CXX-PROLOGUE]) 274 # -------------------------------------------------------------- 275 # Look for the Boost library COMPONENT-NAME (e.g., `thread', for 276 # libboost_thread) under the possible CANDIDATE-LIB-NAMES (e.g., 277 # "thread_win32 thread"). Check that HEADER-NAME works and check that 278 # libboost_LIB-NAME can link with the code CXX-TEST. The optional 279 # argument CXX-PROLOGUE can be used to include some C++ code before 280 # the `main' function. 276 281 # 277 282 # Invokes BOOST_FIND_HEADER([HEADER-NAME]) (see above). … … 287 292 # ... If you want to make sure you have a specific version of Boost 288 293 # (eg, >= 1.33) you *must* invoke BOOST_REQUIRE before this macro. 289 AC_DEFUN([BOOST_FIND_LIB ],294 AC_DEFUN([BOOST_FIND_LIBS], 290 295 [AC_REQUIRE([BOOST_REQUIRE])dnl 291 296 AC_REQUIRE([_BOOST_FIND_COMPILER_TAG])dnl … … 301 306 AS_VAR_PUSHDEF([Boost_lib_LDPATH], [boost_cv_lib_$1_LDPATH])dnl 302 307 AS_VAR_PUSHDEF([Boost_lib_LIBS], [boost_cv_lib_$1_LIBS])dnl 303 BOOST_FIND_HEADER([$ 3])308 BOOST_FIND_HEADER([$4]) 304 309 boost_save_CPPFLAGS=$CPPFLAGS 305 310 CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" 306 # Now let's try to find the library. The algorithm is as follows: first look307 # for a given library name according to the user's PREFERRED-RT-OPT. For each308 # library name, we prefer to use the ones that carry the tag (toolset name).309 # Each library is searched through the various standard paths were Boost is310 # usually installed. If we can't find the standard variants, we try to311 # enforce -mt (for instance on MacOSX, libboost_threads.dylib doesn't exist312 # but there's -obviously- libboost_threads-mt.dylib).313 311 AC_CACHE_CHECK([for the Boost $1 library], [Boost_lib], 314 [Boost_lib=no 315 case "$2" in #( 316 mt | mt-) boost_mt=-mt; boost_rtopt=;; #( 317 mt* | mt-*) boost_mt=-mt; boost_rtopt=`expr "X$2" : 'Xmt-*\(.*\)'`;; #( 318 *) boost_mt=; boost_rtopt=$2;; 312 [_BOOST_FIND_LIBS($@)]) 313 case $Boost_lib in #( 314 (no) _AC_MSG_LOG_CONFTEST 315 AC_MSG_ERROR([cannot find the flags to link with Boost $1]) 316 ;; 317 esac 318 AC_SUBST(AS_TR_CPP([BOOST_$1_LDFLAGS]), [$Boost_lib_LDFLAGS])dnl 319 AC_SUBST(AS_TR_CPP([BOOST_$1_LDPATH]), [$Boost_lib_LDPATH])dnl 320 AC_SUBST([BOOST_LDPATH], [$Boost_lib_LDPATH])dnl 321 AC_SUBST(AS_TR_CPP([BOOST_$1_LIBS]), [$Boost_lib_LIBS])dnl 322 CPPFLAGS=$boost_save_CPPFLAGS 323 AS_VAR_POPDEF([Boost_lib])dnl 324 AS_VAR_POPDEF([Boost_lib_LDFLAGS])dnl 325 AS_VAR_POPDEF([Boost_lib_LDPATH])dnl 326 AS_VAR_POPDEF([Boost_lib_LIBS])dnl 327 AC_LANG_POP([C++])dnl 328 fi 329 ]) 330 331 332 # BOOST_FIND_LIB([LIB-NAME], 333 # [PREFERRED-RT-OPT], [HEADER-NAME], [CXX-TEST], 334 # [CXX-PROLOGUE]) 335 # -------------------------------------------------------------- 336 # Backward compatibility wrapper for BOOST_FIND_LIBS. 337 AC_DEFUN([BOOST_FIND_LIB], 338 [BOOST_FIND_LIBS([$1], $@)]) 339 340 341 # _BOOST_FIND_LIBS([LIB-NAME], [CANDIDATE-LIB-NAMES], 342 # [PREFERRED-RT-OPT], [HEADER-NAME], [CXX-TEST], 343 # [CXX-PROLOGUE]) 344 # -------------------------------------------------------------- 345 # Real implementation of BOOST_FIND_LIBS: rely on these local macros: 346 # Boost_lib, Boost_lib_LDFLAGS, Boost_lib_LDPATH, Boost_lib_LIBS 347 # 348 # The algorithm is as follows: first look for a given library name 349 # according to the user's PREFERRED-RT-OPT. For each library name, we 350 # prefer to use the ones that carry the tag (toolset name). Each 351 # library is searched through the various standard paths were Boost is 352 # usually installed. If we can't find the standard variants, we try 353 # to enforce -mt (for instance on MacOSX, libboost_thread.dylib 354 # doesn't exist but there's -obviously- libboost_thread-mt.dylib). 355 AC_DEFUN([_BOOST_FIND_LIBS], 356 [Boost_lib=no 357 case "$3" in #( 358 (mt | mt-) boost_mt=-mt; boost_rtopt=;; #( 359 (mt* | mt-*) boost_mt=-mt; boost_rtopt=`expr "X$3" : 'Xmt-*\(.*\)'`;; #( 360 (*) boost_mt=; boost_rtopt=$3;; 319 361 esac 320 362 if test $enable_static_boost = yes; then … … 323 365 # Find the proper debug variant depending on what we've been asked to find. 324 366 case $boost_rtopt in #( 325 *d*) boost_rt_d=$boost_rtopt;; #(326 *[[sgpn]]*) # Insert the `d' at the right place (in between `sg' and `pn')367 (*d*) boost_rt_d=$boost_rtopt;; #( 368 (*[[sgpn]]*) # Insert the `d' at the right place (in between `sg' and `pn') 327 369 boost_rt_d=`echo "$boost_rtopt" | sed 's/\(s*g*\)\(p*n*\)/\1\2/'`;; #( 328 *) boost_rt_d='-d';;370 (*) boost_rt_d='-d';; 329 371 esac 330 372 # If the PREFERRED-RT-OPT are not empty, prepend a `-'. … … 337 379 boost_save_ac_objext=$ac_objext 338 380 # Generate the test file. 339 AC_LANG_CONFTEST([AC_LANG_PROGRAM([#include <$ 3>340 $ 5], [$4])])381 AC_LANG_CONFTEST([AC_LANG_PROGRAM([#include <$4> 382 $6], [$5])]) 341 383 dnl Optimization hacks: compiling C++ is slow, especially with Boost. What 342 384 dnl we're trying to do here is guess the right combination of link flags … … 360 402 ac_objext=$boost_save_ac_objext 361 403 boost_failed_libs= 362 # Don't bother to ident the 6 nested for loops, only the 2 innermost ones 363 # matter. 404 # Don't bother to ident the following nested for loops, only the 2 405 # innermost ones matter. 406 for boost_lib_ in $2; do 364 407 for boost_tag_ in -$boost_cv_lib_tag ''; do 365 408 for boost_ver_ in -$boost_cv_lib_version ''; do 366 for boost_mt_ in $boost_mt '' -mt; do409 for boost_mt_ in $boost_mt -mt ''; do 367 410 for boost_rtopt_ in $boost_rtopt '' -d; do 368 411 for boost_lib in \ 369 boost_$ 1$boost_tag_$boost_mt_$boost_rtopt_$boost_ver_ \370 boost_$ 1$boost_tag_$boost_rtopt_$boost_ver_ \371 boost_$ 1$boost_tag_$boost_mt_$boost_ver_ \372 boost_$ 1$boost_tag_$boost_ver_412 boost_$boost_lib_$boost_tag_$boost_mt_$boost_rtopt_$boost_ver_ \ 413 boost_$boost_lib_$boost_tag_$boost_rtopt_$boost_ver_ \ 414 boost_$boost_lib_$boost_tag_$boost_mt_$boost_ver_ \ 415 boost_$boost_lib_$boost_tag_$boost_ver_ 373 416 do 374 417 # Avoid testing twice the same lib 375 418 case $boost_failed_libs in #( 376 *@$boost_lib@*) continue;;419 (*@$boost_lib@*) continue;; 377 420 esac 378 421 # If with_boost is empty, we'll search in /lib first, which is not quite … … 381 424 test x"$with_boost" = x && boost_tmp_lib=${boost_cv_inc_path%/include} 382 425 for boost_ldpath in "$boost_tmp_lib/lib" '' \ 383 /usr/local/lib* /usr/lib* \ 384 "$with_boost" C:/Boost/lib /lib* \ 385 /opt/local/lib* /opt/lib* 426 /opt/local/lib* /usr/local/lib* /opt/lib* /usr/lib* \ 427 "$with_boost" C:/Boost/lib /lib* 386 428 do 387 test -e "$boost_ldpath" || continue 429 # Don't waste time with directories that don't exist. 430 if test x"$boost_ldpath" != x && test ! -e "$boost_ldpath"; then 431 continue 432 fi 388 433 boost_save_LDFLAGS=$LDFLAGS 389 434 # Are we looking for a static library? 390 435 case $boost_ldpath:$boost_rtopt_ in #( 391 *?*:*s*) # Yes (Non empty boost_ldpath + s in rt opt)436 (*?*:*s*) # Yes (Non empty boost_ldpath + s in rt opt) 392 437 Boost_lib_LIBS="$boost_ldpath/lib$boost_lib.$libext" 393 438 test -e "$Boost_lib_LIBS" || continue;; #( 394 *) # No: use -lboost_foo to find the shared library.439 (*) # No: use -lboost_foo to find the shared library. 395 440 Boost_lib_LIBS="-l$boost_lib";; 396 441 esac … … 406 451 LIBS=$boost_save_LIBS 407 452 if test x"$Boost_lib" = xyes; then 408 Boost_lib_LDFLAGS="-L$boost_ldpath -Wl,-R$boost_ldpath" 453 # Check or used cached result of whether or not using -R or 454 # -rpath makes sense. Some implementations of ld, such as for 455 # Mac OSX, require -rpath but -R is the flag known to work on 456 # other systems. https://github.com/tsuna/boost.m4/issues/19 457 AC_CACHE_VAL([boost_cv_rpath_link_ldflag], 458 [case $boost_ldpath in 459 '') # Nothing to do. 460 boost_cv_rpath_link_ldflag= 461 boost_rpath_link_ldflag_found=yes;; 462 *) 463 for boost_cv_rpath_link_ldflag in -Wl,-R, -Wl,-rpath,; do 464 LDFLAGS="$boost_save_LDFLAGS -L$boost_ldpath $boost_cv_rpath_link_ldflag$boost_ldpath" 465 LIBS="$boost_save_LIBS $Boost_lib_LIBS" 466 _BOOST_AC_LINK_IFELSE([], 467 [boost_rpath_link_ldflag_found=yes 468 break], 469 [boost_rpath_link_ldflag_found=no]) 470 done 471 ;; 472 esac 473 AS_IF([test "x$boost_rpath_link_ldflag_found" != "xyes"], 474 [AC_MSG_ERROR([Unable to determine whether to use -R or -rpath])]) 475 LDFLAGS=$boost_save_LDFLAGS 476 LIBS=$boost_save_LIBS 477 ]) 478 test x"$boost_ldpath" != x && 479 Boost_lib_LDFLAGS="-L$boost_ldpath $boost_cv_rpath_link_ldflag$boost_ldpath" 409 480 Boost_lib_LDPATH="$boost_ldpath" 410 break 6481 break 7 411 482 else 412 483 boost_failed_libs="$boost_failed_libs@$boost_lib@" … … 418 489 done 419 490 done 491 done # boost_lib_ 420 492 rm -f conftest.$ac_objext 421 493 ]) 422 case $Boost_lib in #( 423 no) _AC_MSG_LOG_CONFTEST 424 AC_MSG_ERROR([cannot find the flags to link with Boost $1]) 425 ;; 426 esac 427 AC_SUBST(AS_TR_CPP([BOOST_$1_LDFLAGS]), [$Boost_lib_LDFLAGS])dnl 428 AC_SUBST(AS_TR_CPP([BOOST_$1_LDPATH]), [$Boost_lib_LDPATH])dnl 429 AC_SUBST([BOOST_LDPATH], [$Boost_lib_LDPATH])dnl 430 AC_SUBST(AS_TR_CPP([BOOST_$1_LIBS]), [$Boost_lib_LIBS])dnl 431 CPPFLAGS=$boost_save_CPPFLAGS 432 AS_VAR_POPDEF([Boost_lib])dnl 433 AS_VAR_POPDEF([Boost_lib_LDFLAGS])dnl 434 AS_VAR_POPDEF([Boost_lib_LDPATH])dnl 435 AS_VAR_POPDEF([Boost_lib_LIBS])dnl 436 AC_LANG_POP([C++])dnl 437 fi 438 ])# BOOST_FIND_LIB 494 439 495 440 496 … … 483 539 BOOST_FIND_HEADER([boost/asio.hpp])]) 484 540 541 485 542 # BOOST_BIMAP() 486 543 # ------------ … … 489 546 [BOOST_FIND_HEADER([boost/bimap.hpp])]) 490 547 548 491 549 # BOOST_BIND() 492 550 # ------------ 493 # Look for Boost.Bind 551 # Look for Boost.Bind. 494 552 BOOST_DEFUN([Bind], 495 553 [BOOST_FIND_HEADER([boost/bind.hpp])]) 554 496 555 497 556 # BOOST_CAST() … … 500 559 BOOST_DEFUN([Cast], 501 560 [BOOST_FIND_HEADER([boost/cast.hpp])]) 561 562 563 # BOOST_CHRONO() 564 # -------------- 565 # Look for Boost.Chrono. 566 BOOST_DEFUN([Chrono], 567 [# Do we have to check for Boost.System? This link-time dependency was 568 # added as of 1.35.0. If we have a version <1.35, we must not attempt to 569 # find Boost.System as it didn't exist by then. 570 if test $boost_major_version -ge 135; then 571 BOOST_SYSTEM([$1]) 572 fi # end of the Boost.System check. 573 boost_filesystem_save_LIBS=$LIBS 574 boost_filesystem_save_LDFLAGS=$LDFLAGS 575 m4_pattern_allow([^BOOST_SYSTEM_(LIBS|LDFLAGS)$])dnl 576 LIBS="$LIBS $BOOST_SYSTEM_LIBS" 577 LDFLAGS="$LDFLAGS $BOOST_SYSTEM_LDFLAGS" 578 BOOST_FIND_LIB([chrono], [$1], 579 [boost/chrono.hpp], 580 [boost::chrono::thread_clock d;]) 581 if test $enable_static_boost = yes && test $boost_major_version -ge 135; then 582 BOOST_FILESYSTEM_LIBS="$BOOST_FILESYSTEM_LIBS $BOOST_SYSTEM_LIBS" 583 fi 584 LIBS=$boost_filesystem_save_LIBS 585 LDFLAGS=$boost_filesystem_save_LDFLAGS 586 ])# BOOST_CHRONO 587 502 588 503 589 # BOOST_CONVERSION() … … 508 594 BOOST_FIND_HEADER([boost/lexical_cast.hpp]) 509 595 ])# BOOST_CONVERSION 596 597 598 # BOOST_CRC() 599 # ----------- 600 # Look for Boost.CRC 601 BOOST_DEFUN([CRC], 602 [BOOST_FIND_HEADER([boost/crc.hpp]) 603 ])# BOOST_CRC 510 604 511 605 … … 539 633 # find Boost.System as it didn't exist by then. 540 634 if test $boost_major_version -ge 135; then 541 BOOST_SYSTEM([$1])635 BOOST_SYSTEM([$1]) 542 636 fi # end of the Boost.System check. 543 637 boost_filesystem_save_LIBS=$LIBS … … 549 643 [boost/filesystem/path.hpp], [boost::filesystem::path p;]) 550 644 if test $enable_static_boost = yes && test $boost_major_version -ge 135; then 551 AC_SUBST([BOOST_FILESYSTEM_LIBS], ["$BOOST_FILESYSTEM_LIBS $BOOST_SYSTEM_LIBS"])645 BOOST_FILESYSTEM_LIBS="$BOOST_FILESYSTEM_LIBS $BOOST_SYSTEM_LIBS" 552 646 fi 553 647 LIBS=$boost_filesystem_save_LIBS … … 556 650 557 651 652 # BOOST_FUSION() 653 # ----------------- 654 # Look for Boost.Fusion 655 BOOST_DEFUN([Fusion], 656 [BOOST_FIND_HEADER([boost/fusion/sequence.hpp])]) 657 658 659 # BOOST_FLYWEIGHT() 660 # ----------------- 661 # Look for Boost.Flyweight. 662 BOOST_DEFUN([Flyweight], 663 [dnl There's a hidden dependency on pthreads. 664 AC_REQUIRE([_BOOST_PTHREAD_FLAG])dnl 665 BOOST_FIND_HEADER([boost/flyweight.hpp]) 666 AC_SUBST([BOOST_FLYWEIGHT_LIBS], [$boost_cv_pthread_flag]) 667 ]) 668 669 558 670 # BOOST_FOREACH() 559 671 # --------------- 560 # Look for Boost.Foreach 672 # Look for Boost.Foreach. 561 673 BOOST_DEFUN([Foreach], 562 674 [BOOST_FIND_HEADER([boost/foreach.hpp])]) … … 565 677 # BOOST_FORMAT() 566 678 # -------------- 567 # Look for Boost.Format 679 # Look for Boost.Format. 568 680 # Note: we can't check for boost/format/format_fwd.hpp because the header isn't 569 681 # standalone. It can't be compiled because it triggers the following error: … … 581 693 582 694 583 # BOOST_ FUSION()695 # BOOST_GEOMETRY() 584 696 # ---------------- 585 # Look for Boost.Fusion 586 BOOST_DEFUN([Fusion], 587 [BOOST_FIND_HEADER([boost/fusion/sequence.hpp])]) 697 # Look for Boost.Geometry (new since 1.47.0). 698 BOOST_DEFUN([Geometry], 699 [BOOST_FIND_HEADER([boost/geometry.hpp]) 700 ])# BOOST_GEOMETRY 588 701 589 702 … … 632 745 # BOOST_LOG([PREFERRED-RT-OPT]) 633 746 # ----------------------------- 634 # Look for Boost.Log For the documentation of PREFERRED-RT-OPT, see the747 # Look for Boost.Log. For the documentation of PREFERRED-RT-OPT, see the 635 748 # documentation of BOOST_FIND_LIB above. 636 749 BOOST_DEFUN([Log], … … 643 756 # BOOST_LOG_SETUP([PREFERRED-RT-OPT]) 644 757 # ----------------------------------- 645 # Look for Boost.Log For the documentation of PREFERRED-RT-OPT, see the758 # Look for Boost.Log. For the documentation of PREFERRED-RT-OPT, see the 646 759 # documentation of BOOST_FIND_LIB above. 647 760 BOOST_DEFUN([Log_Setup], 648 761 [AC_REQUIRE([BOOST_LOG])dnl 649 762 BOOST_FIND_LIB([log_setup], [$1], 650 [boost/log/utility/ init/from_settings.hpp],763 [boost/log/utility/setup/from_settings.hpp], 651 764 [boost::log::basic_settings<char> bs; bs.empty();]) 652 765 ])# BOOST_LOG_SETUP … … 665 778 666 779 780 # BOOST_MPI([PREFERRED-RT-OPT]) 781 # ------------------------------- 782 # Look for Boost MPI. For the documentation of PREFERRED-RT-OPT, see the 783 # documentation of BOOST_FIND_LIB above. Uses MPICXX variable if it is 784 # set, otherwise tries CXX 785 # 786 BOOST_DEFUN([MPI], 787 [boost_save_CXX=${CXX} 788 boost_save_CXXCPP=${CXXCPP} 789 if test x"${MPICXX}" != x; then 790 CXX=${MPICXX} 791 CXXCPP="${MPICXX} -E" 792 fi 793 BOOST_FIND_LIB([mpi], [$1], 794 [boost/mpi.hpp], 795 [int argc = 0; 796 char **argv = 0; 797 boost::mpi::environment env(argc,argv);]) 798 CXX=${boost_save_CXX} 799 CXXCPP=${boost_save_CXXCPP} 800 ])# BOOST_MPI 801 802 803 # BOOST_MPL() 804 # ------------------ 805 # Look for Boost.MPL 806 BOOST_DEFUN([MPL], 807 [BOOST_FIND_HEADER([boost/mpl/for_each.hpp])]) 808 809 667 810 # BOOST_MULTIARRAY() 668 811 # ------------------ 669 812 # Look for Boost.MultiArray 670 813 BOOST_DEFUN([MultiArray], 671 [BOOST_FIND_HEADER([boost/mpl/list.hpp])]) 672 673 674 # BOOST_MMPL() 675 # ------------------ 676 # Look for Boost.MPL 677 BOOST_DEFUN([MPL], 678 [BOOST_FIND_HEADER([boost/mpl/for_each.hpp])]) 814 [BOOST_FIND_HEADER([boost/multi_array.hpp])]) 815 816 817 # BOOST_NUMERIC_UBLAS() 818 # -------------------------- 819 # Look for Boost.NumericUblas (Basic Linear Algebra) 820 BOOST_DEFUN([Numeric_Ublas], 821 [BOOST_FIND_HEADER([boost/numeric/ublas/vector.hpp]) 822 ])# BOOST_NUMERIC_UBLAS 823 679 824 680 825 # BOOST_NUMERIC_CONVERSION() … … 764 909 _BOOST_PYTHON_CONFIG([LIBS], [libs]) 765 910 m4_pattern_allow([^BOOST_PYTHON_MODULE$])dnl 766 BOOST_FIND_LIB ([python], [$1],767 [boost/python.hpp],768 [], [BOOST_PYTHON_MODULE(empty) {}])911 BOOST_FIND_LIBS([python], [python python3], [$1], 912 [boost/python.hpp], 913 [], [BOOST_PYTHON_MODULE(empty) {}]) 769 914 CPPFLAGS=$boost_python_save_CPPFLAGS 770 915 LDFLAGS=$boost_python_save_LDFLAGS … … 812 957 [boost::signal<void ()> s;]) 813 958 ])# BOOST_SIGNALS 959 960 961 # BOOST_SIGNALS2() 962 # ---------------- 963 # Look for Boost.Signals2 (new since 1.39.0). 964 BOOST_DEFUN([Signals2], 965 [BOOST_FIND_HEADER([boost/signals2.hpp]) 966 ])# BOOST_SIGNALS2 814 967 815 968 … … 864 1017 865 1018 866 # BOOST_THREAD S([PREFERRED-RT-OPT])1019 # BOOST_THREAD([PREFERRED-RT-OPT]) 867 1020 # --------------------------------- 868 1021 # Look for Boost.Thread. For the documentation of PREFERRED-RT-OPT, see the 869 1022 # documentation of BOOST_FIND_LIB above. 870 # FIXME: Provide an alias "BOOST_THREAD". 871 BOOST_DEFUN([Threads], 1023 BOOST_DEFUN([Thread], 872 1024 [dnl Having the pthread flag is required at least on GCC3 where 873 1025 dnl boost/thread.hpp would complain if we try to compile without 874 1026 dnl -pthread on GNU/Linux. 875 1027 AC_REQUIRE([_BOOST_PTHREAD_FLAG])dnl 876 boost_threads_save_LIBS=$LIBS 877 boost_threads_save_CPPFLAGS=$CPPFLAGS 878 LIBS="$LIBS $boost_cv_pthread_flag" 879 # Yes, we *need* to put the -pthread thing in CPPFLAGS because with GCC3, 880 # boost/thread.hpp will trigger a #error if -pthread isn't used: 881 # boost/config/requires_threads.hpp:47:5: #error "Compiler threading support 882 # is not turned on. Please set the correct command line options for 883 # threading: -pthread (Linux), -pthreads (Solaris) or -mthreads (Mingw32)" 1028 boost_thread_save_LIBS=$LIBS 1029 boost_thread_save_LDFLAGS=$LDFLAGS 1030 boost_thread_save_CPPFLAGS=$CPPFLAGS 1031 # Link-time dependency from thread to system was added as of 1.49.0. 1032 if test $boost_major_version -ge 149; then 1033 BOOST_SYSTEM([$1]) 1034 fi # end of the Boost.System check. 1035 m4_pattern_allow([^BOOST_SYSTEM_(LIBS|LDFLAGS)$])dnl 1036 LIBS="$LIBS $BOOST_SYSTEM_LIBS $boost_cv_pthread_flag" 1037 LDFLAGS="$LDFLAGS $BOOST_SYSTEM_LDFLAGS" 884 1038 CPPFLAGS="$CPPFLAGS $boost_cv_pthread_flag" 885 BOOST_FIND_LIB([thread], [$1], 886 [boost/thread.hpp], [boost::thread t; boost::mutex m;]) 887 BOOST_THREAD_LIBS="$BOOST_THREAD_LIBS $boost_cv_pthread_flag" 1039 1040 # When compiling for the Windows platform, the threads library is named 1041 # differently. 1042 case $host_os in 1043 (*mingw*) boost_thread_lib_ext=_win32;; 1044 esac 1045 BOOST_FIND_LIBS([thread], [thread$boost_thread_lib_ext], 1046 [$1], 1047 [boost/thread.hpp], [boost::thread t; boost::mutex m;]) 1048 1049 BOOST_THREAD_LIBS="$BOOST_THREAD_LIBS $BOOST_SYSTEM_LIBS $boost_cv_pthread_flag" 1050 BOOST_THREAD_LDFLAGS="$BOOST_SYSTEM_LDFLAGS" 888 1051 BOOST_CPPFLAGS="$BOOST_CPPFLAGS $boost_cv_pthread_flag" 889 LIBS=$boost_threads_save_LIBS 890 CPPFLAGS=$boost_threads_save_CPPFLAGS 891 ])# BOOST_THREADS 1052 LIBS=$boost_thread_save_LIBS 1053 LDFLAGS=$boost_thread_save_LDFLAGS 1054 CPPFLAGS=$boost_thread_save_CPPFLAGS 1055 ])# BOOST_THREAD 1056 1057 AU_ALIAS([BOOST_THREADS], [BOOST_THREAD]) 892 1058 893 1059 … … 938 1104 939 1105 1106 # BOOST_POINTER_CONTAINER() 1107 # ------------------------ 1108 # Look for Boost.PointerContainer 1109 BOOST_DEFUN([Pointer_Container], 1110 [BOOST_FIND_HEADER([boost/ptr_container/ptr_deque.hpp]) 1111 BOOST_FIND_HEADER([boost/ptr_container/ptr_list.hpp]) 1112 BOOST_FIND_HEADER([boost/ptr_container/ptr_vector.hpp]) 1113 BOOST_FIND_HEADER([boost/ptr_container/ptr_array.hpp]) 1114 BOOST_FIND_HEADER([boost/ptr_container/ptr_set.hpp]) 1115 BOOST_FIND_HEADER([boost/ptr_container/ptr_map.hpp]) 1116 ])# BOOST_POINTER_CONTAINER 1117 1118 940 1119 # BOOST_WAVE([PREFERRED-RT-OPT]) 941 1120 # ------------------------------ 942 1121 # NOTE: If you intend to use Wave/Spirit with thread support, make sure you 943 # call BOOST_THREAD Sfirst.1122 # call BOOST_THREAD first. 944 1123 # Look for Boost.Wave. For the documentation of PREFERRED-RT-OPT, see the 945 1124 # documentation of BOOST_FIND_LIB above. … … 950 1129 boost_wave_save_LDFLAGS=$LDFLAGS 951 1130 m4_pattern_allow([^BOOST_((FILE)?SYSTEM|DATE_TIME|THREAD)_(LIBS|LDFLAGS)$])dnl 952 LIBS="$LIBS $BOOST_SYSTEM_LIBS $BOOST_FILESYSTEM_LIBS $BOOST_DATE_TIME_LIBS \1131 LIBS="$LIBS $BOOST_SYSTEM_LIBS $BOOST_FILESYSTEM_LIBS $BOOST_DATE_TIME_LIBS \ 953 1132 $BOOST_THREAD_LIBS" 954 LDFLAGS="$LDFLAGS $BOOST_SYSTEM_LDFLAGS $BOOST_FILESYSTEM_LDFLAGS \1133 LDFLAGS="$LDFLAGS $BOOST_SYSTEM_LDFLAGS $BOOST_FILESYSTEM_LDFLAGS \ 955 1134 $BOOST_DATE_TIME_LDFLAGS $BOOST_THREAD_LDFLAGS" 956 1135 BOOST_FIND_LIB([wave], [$1], … … 976 1155 # _BOOST_PTHREAD_FLAG() 977 1156 # --------------------- 978 # Internal helper for BOOST_THREADS. Based on ACX_PTHREAD: 979 # http://autoconf-archive.cryp.to/acx_pthread.html 1157 # Internal helper for BOOST_THREAD. Computes boost_cv_pthread_flag 1158 # which must be used in CPPFLAGS and LIBS. 1159 # 1160 # Yes, we *need* to put the -pthread thing in CPPFLAGS because with GCC3, 1161 # boost/thread.hpp will trigger a #error if -pthread isn't used: 1162 # boost/config/requires_threads.hpp:47:5: #error "Compiler threading support 1163 # is not turned on. Please set the correct command line options for 1164 # threading: -pthread (Linux), -pthreads (Solaris) or -mthreads (Mingw32)" 1165 # 1166 # Based on ACX_PTHREAD: http://autoconf-archive.cryp.to/acx_pthread.html 980 1167 AC_DEFUN([_BOOST_PTHREAD_FLAG], 981 1168 [AC_REQUIRE([AC_PROG_CXX])dnl … … 1045 1232 ["defined __GNUC__ && __GNUC__ == $1 && __GNUC_MINOR__ == $2 && !defined __ICC @ gcc$1$2"])dnl 1046 1233 1234 # _BOOST_mingw_test(MAJOR, MINOR) 1235 # ----------------------------- 1236 # Internal helper for _BOOST_FIND_COMPILER_TAG. 1237 m4_define([_BOOST_mingw_test], 1238 ["defined __GNUC__ && __GNUC__ == $1 && __GNUC_MINOR__ == $2 && !defined __ICC && \ 1239 (defined WIN32 || defined WINNT || defined _WIN32 || defined __WIN32 \ 1240 || defined __WIN32__ || defined __WINNT || defined __WINNT__) @ mgw$1$2"])dnl 1241 1047 1242 1048 1243 # _BOOST_FIND_COMPILER_TAG() … … 1072 1267 # the same defines as GCC's). 1073 1268 for i in \ 1269 _BOOST_mingw_test(4,8) \ 1270 _BOOST_gcc_test(4, 8) \ 1271 _BOOST_mingw_test(4,7) \ 1272 _BOOST_gcc_test(4, 7) \ 1273 _BOOST_mingw_test(4,6) \ 1074 1274 _BOOST_gcc_test(4, 6) \ 1275 _BOOST_mingw_test(4,5) \ 1075 1276 _BOOST_gcc_test(4, 5) \ 1277 _BOOST_mingw_test(4,4) \ 1076 1278 _BOOST_gcc_test(4, 4) \ 1279 _BOOST_mingw_test(4,3) \ 1077 1280 _BOOST_gcc_test(4, 3) \ 1281 _BOOST_mingw_test(4,2) \ 1078 1282 _BOOST_gcc_test(4, 2) \ 1283 _BOOST_mingw_test(4,1) \ 1079 1284 _BOOST_gcc_test(4, 1) \ 1285 _BOOST_mingw_test(4,0) \ 1080 1286 _BOOST_gcc_test(4, 0) \ 1081 1287 "defined __GNUC__ && __GNUC__ == 3 && !defined __ICC \ … … 1143 1349 AC_DEFUN([_BOOST_GUESS_WHETHER_TO_USE_MT], 1144 1350 [# Check whether we do better use `mt' even though we weren't ask to. 1351 AC_LANG_PUSH([C++])dnl 1145 1352 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 1146 1353 #if defined _REENTRANT || defined _MT || defined __MT__ … … 1150 1357 #endif 1151 1358 ]])], [boost_guess_use_mt=:], [boost_guess_use_mt=false]) 1359 AC_LANG_POP([C++])dnl 1152 1360 ]) 1153 1361 … … 1173 1381 _AS_ECHO_LOG([re-using the existing conftest.$ac_objext]) 1174 1382 AS_IF([_AC_DO_STDERR($ac_link) && { 1175 1176 1383 test -z "$ac_[]_AC_LANG_ABBREV[]_werror_flag" || 1384 test ! -s conftest.err 1177 1385 } && test -s conftest$ac_exeext && { 1178 1179 1386 test "$cross_compiling" = yes || 1387 $as_executable_p conftest$ac_exeext 1180 1388 dnl FIXME: use AS_TEST_X instead when 2.61 is widespread enough. 1181 1389 }], -
TabularUnified m4/qwt.m4 ¶
r3a33e3 r3b35e7 80 80 AC_TRY_LINK( 81 81 [#include <qwt_plot.h>], 82 [QwtPlot * plot = new QwtPlot( QString("Two Curves"));],82 [QwtPlot * plot = new QwtPlot();], 83 83 [mol_ac_have_qwt=true]) 84 84 AC_LANG_RESTORE
Note:
See TracChangeset
for help on using the changeset viewer.