Changeset f08ae7


Ignore:
Timestamp:
Oct 10, 2011, 4:58:24 PM (13 years ago)
Author:
Frederik Heber <heber@…>
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:
bae8b0
Parents:
78d5b2
git-author:
Frederik Heber <heber@…> (09/07/11 16:35:59)
git-committer:
Frederik Heber <heber@…> (10/10/11 16:58:24)
Message:

Extension of usage of Tsuna's boost.m4 macro.

  • boost.m4 from https://github.com/tsuna/boost.m4.git (serial 16 + updates).
  • LinearAlgebra does not depend on any boost libs only two headers and CodePatterns.
  • Presence and Usability of every boost header and lib is now checked.
  • Using updated ax_codepatterns.m4.
  • FIX: boost has not been possible to link with if not residing under some default path. This is now possible.
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • LinearAlgebra/configure.ac

    r78d5b2 rf08ae7  
    104104AC_CHECK_LIB(m, sqrt, , AC_MSG_ERROR([compatible libc math library not found]))
    105105
    106 # Boost libraries
    107 BOOST_REQUIRE([1.40])
    108 BOOST_EXCEPTION
    109 
    110106# CodePatterns library (needs operator<<(.., range<>) )
    111107AM_PATH_CODEPATTERNS([1.0.13], $have_debug,,[AC_MSG_ERROR([Missing CodePatterns library, please specify PKG_CONFIG_PATH or use --with-codepatterns...])])
     108
     109# boost headers
     110BOOST_REQUIRE([1.40])
     111BOOST_BIND
     112BOOST_EXCEPTION
    112113
    113114# Checks for header files.
  • LinearAlgebra/src/LinearAlgebra/Makefile.am

    r78d5b2 rf08ae7  
    55
    66AM_LDFLAGS = ${CodePatterns_LIBS} -ldl
    7 AM_CPPFLAGS = ${BOOST_CPPFLAGS} ${CodePatterns_CFLAGS}
     7AM_CPPFLAGS = $(BOOST_CPPFLAGS) ${CodePatterns_CFLAGS}
    88
    99LINALGSOURCE = \
  • LinearAlgebra/src/unittests/Makefile.am

    r78d5b2 rf08ae7  
    44INCLUDES = -I$(top_srcdir)/src/LinearAlgebra
    55
    6 AM_LDFLAGS = ${CodePatterns_LIBS} $(CPPUNIT_LIBS) -ldl $(BOOST_EXCEPTION_LDFLAGS)
    7 AM_CPPFLAGS = ${BOOST_CPPFLAGS} $(CPPUNIT_CFLAGS) ${CodePatterns_CFLAGS}
     6AM_LDFLAGS = ${CodePatterns_LIBS} $(CPPUNIT_LIBS) -ldl
     7AM_CPPFLAGS = $(CPPUNIT_CFLAGS) ${CodePatterns_CFLAGS}
    88
    99TESTS = \
     
    2323GSLLIBS = \
    2424        ../LinearAlgebra/libLinearAlgebra.la \
    25         ${CodePatterns_LIBS} \
    26         $(BOOST_EXCEPTION_LIBS)
     25        ${CodePatterns_LIBS}
    2726
    2827TESTSOURCES = \
  • configure.ac

    r78d5b2 rf08ae7  
    112112AC_CHECK_LIB(m, sqrt, , AC_MSG_ERROR([compatible libc math library not found]))
    113113
    114 # Boost libraries
     114# Boost
    115115BOOST_REQUIRE([1.40])
     116
     117# Boost headers only
     118BOOST_ANY
     119BOOST_BIND
     120BOOST_CONVERSION
    116121BOOST_EXCEPTION
     122BOOST_FOREACH
     123BOOST_FUNCTION
     124BOOST_PREPROCESSOR
     125BOOST_RANDOM
     126BOOST_SMART_PTR
     127BOOST_TOKENIZER
     128
     129# Boost headers with libraries
    117130BOOST_FILESYSTEM
    118131BOOST_PROGRAM_OPTIONS
    119 BOOST_RANDOM
     132#BOOST_SERIALIZATION
    120133BOOST_THREADS
    121134
     
    125138#AX_CHECK_GLU
    126139#AC_MSG_NOTICE(["GLU_CFLAGS: $GLU_CFLAGS, GLU_CXXFLAGS: $GLU_CXXFLAGS, GLU_LDFLAGS: $GLU_LDFLAGS, GLU_LIBS: $GLU_LIBS"])
     140
    127141
    128142# CodePatterns library (needs Observer::Channels )
  • m4/ax_codepatterns.m4

    r78d5b2 rf08ae7  
    66[
    77AC_REQUIRE([BOOST_THREADS])
     8AC_REQUIRE([BOOST_REQUIRE])
    89
    910AC_ARG_WITH(codepatterns,[  --with-codepatterns=PFX   Prefix where CodePatterns is installed (optional)],
     
    4344      AC_PATH_PROG(CodePatterns_CONFIG, codepatterns-config, no)
    4445      if test "x$CodePatterns_CONFIG" = xno && test x$codepatterns_prefix != x ; then
    45         AC_MSG_CHECKING([for alternative codepatterns-config location])
    4646        if test -e $codepatterns_prefix/bin/codepatterns-config; then
    4747          codepatterns_pkgconfig=no
    4848          CodePatterns_CONFIG="$codepatterns_prefix/bin/codepatterns-config"
    49           AC_MSG_RESULT([yes])
    50         else
    51           AC_MSG_RESULT([no])
    5249        fi
    5350      fi
  • m4/boost.m4

    r78d5b2 rf08ae7  
    2323
    2424m4_define([_BOOST_SERIAL], [m4_translit([
    25 # serial 15
     25# serial 16
    2626], [#
    2727], [])])
     
    459459])
    460460
     461
     462# BOOST_ANY()
     463# ------------
     464# Look for Boost.Any
     465BOOST_DEFUN([Any],
     466[BOOST_FIND_HEADER([boost/any.hpp])])
     467
     468
    461469# BOOST_ARRAY()
    462470# -------------
     
    502510
    503511# BOOST_EXCEPTION()
    504 # ---------------
     512# ------------
    505513# Look for Boost.Exception
    506514BOOST_DEFUN([Exception],
     
    589597
    590598
     599# BOOST_ITERATOR()
     600# ------------
     601# Look for Boost.Iterator
     602BOOST_DEFUN([Iterator],
     603[BOOST_FIND_HEADER([boost/iterator/iterator_adaptor.hpp])])
     604
     605
    591606# BOOST_LAMBDA()
    592607# --------------
     
    594609BOOST_DEFUN([Lambda],
    595610[BOOST_FIND_HEADER([boost/lambda/lambda.hpp])])
     611
     612
     613# BOOST_LOG([PREFERRED-RT-OPT])
     614# -----------------------------
     615# Look for Boost.Log For the documentation of PREFERRED-RT-OPT, see the
     616# documentation of BOOST_FIND_LIB above.
     617BOOST_DEFUN([Log],
     618[BOOST_FIND_LIB([log], [$1],
     619    [boost/log/core/core.hpp],
     620    [boost::log::attribute a; a.get_value();])
     621])# BOOST_LOG
     622
     623
     624# BOOST_LOG_SETUP([PREFERRED-RT-OPT])
     625# -----------------------------------
     626# Look for Boost.Log For the documentation of PREFERRED-RT-OPT, see the
     627# documentation of BOOST_FIND_LIB above.
     628BOOST_DEFUN([Log_Setup],
     629[AC_REQUIRE([BOOST_LOG])dnl
     630BOOST_FIND_LIB([log_setup], [$1],
     631    [boost/log/utility/init/from_settings.hpp],
     632    [boost::log::basic_settings<char> bs; bs.empty();])
     633])# BOOST_LOG_SETUP
    596634
    597635
     
    635673BOOST_DEFUN([Preprocessor],
    636674[BOOST_FIND_HEADER([boost/preprocessor/repeat.hpp])])
     675
     676
     677# BOOST_RANDOM()
     678# --------------------
     679# Look for Boost.Random
     680BOOST_DEFUN([Random],
     681[BOOST_FIND_HEADER([boost/random/random_number_generator.hpp])])
     682
     683
     684# BOOST_UNORDERED()
     685# -----------------
     686# Look for Boost.Unordered
     687BOOST_DEFUN([Unordered],
     688[BOOST_FIND_HEADER([boost/unordered_map.hpp])])
     689
     690
     691# BOOST_UUID()
     692# ------------
     693# Look for Boost.Uuid
     694BOOST_DEFUN([Uuid],
     695[BOOST_FIND_HEADER([boost/uuid/uuid.hpp])])
    637696
    638697
     
    678737
    679738
    680 # BOOST_RANDOM()
    681 # ---------------
    682 # Look for Boost.Random
    683 BOOST_DEFUN([Random],
    684 [BOOST_FIND_HEADER([boost/random/uniform_int.hpp])])
    685 
    686 
    687739# BOOST_REF()
    688740# -----------
     
    712764                [std::ostream* o = 0; // Cheap way to get an ostream...
    713765                boost::archive::text_oarchive t(*o);])
    714 ])# BOOST_SIGNALS
     766])# BOOST_SERIALIZATION
    715767
    716768
  • src/Actions/unittests/Makefile.am

    r78d5b2 rf08ae7  
    2727        ../libMolecuilderUI.la
    2828
     29# note that DummyUI inherits Dialog which depends on boost/file_system ...
     30
    2931ActionRegistryUnitTest_SOURCES = $(top_srcdir)/src/unittests/UnitTestMain.cpp \
    3032        ../Actions/unittests/ActionRegistryUnitTest.cpp \
     
    3638        ../Actions/unittests/ActionSequenceUnitTest.hpp \
    3739        ../Actions/unittests/stubs/DummyUI.hpp
    38 ActionSequenceUnitTest_LDADD = ${ACTIONLIBS}
     40ActionSequenceUnitTest_LDADD = \
     41        ${ACTIONLIBS} \
     42        $(BOOST_FILESYSTEM_LDFLAGS) $(BOOST_FILESYSTEM_LIBS) \
     43        $(BOOST_SYSTEM_LDFLAGS) $(BOOST_SYSTEM_LIBS)
    3944
    4045AtomsCalculationUnitTest_SOURCES = $(top_srcdir)/src/unittests/UnitTestMain.cpp \
     
    4752        ../Actions/unittests/ManipulateAtomsUnitTest.hpp \
    4853        ../Actions/unittests/stubs/DummyUI.hpp
    49 ManipulateAtomsUnitTest_LDADD = ${ACTIONLIBS}
     54ManipulateAtomsUnitTest_LDADD = \
     55        ${ACTIONLIBS} \
     56        $(BOOST_FILESYSTEM_LDFLAGS) $(BOOST_FILESYSTEM_LIBS) \
     57        $(BOOST_SYSTEM_LDFLAGS) $(BOOST_SYSTEM_LIBS)
    5058
    5159
  • src/Makefile.am

    r78d5b2 rf08ae7  
    1414include UIElements/Makefile.am
    1515
    16 AM_LDFLAGS = -ldl
     16AM_LDFLAGS = -ldl ${BOOST_LDFLAGS}
    1717AM_CPPFLAGS = ${BOOST_CPPFLAGS} ${CodePatterns_CFLAGS}
    1818
  • src/RandomNumbers/Makefile.am

    r78d5b2 rf08ae7  
    55
    66# Position-Independent Code necessary for shared library
    7 #AM_LDFLAGS = ${CodePatterns_LIBS} $(CPPUNIT_LIBS) -ldl
     7#AM_LDFLAGS = ${CodePatterns_LIBS} $(CPPUNIT_LIBS) -ldl ${BOOST_LDFLAGS}
    88#AM_CPPFLAGS = ${BOOST_CPPFLAGS} $(CPPUNIT_CFLAGS) ${CodePatterns_CFLAGS}
    99
  • src/RandomNumbers/unittests/Makefile.am

    r78d5b2 rf08ae7  
    44#INCLUDES = -I$(top_srcdir)/src
    55
    6 #AM_LDFLAGS = ${CodePatterns_LIBS} $(CPPUNIT_LIBS) -ldl
     6#AM_LDFLAGS = ${CodePatterns_LIBS} $(CPPUNIT_LIBS) -ldl ${BOOST_LDFLAGS}
    77#AM_CPPFLAGS = ${BOOST_CPPFLAGS} $(CPPUNIT_CFLAGS) ${CodePatterns_CFLAGS}
    88
  • src/UIElements/Makefile.am

    r78d5b2 rf08ae7  
    271271        $(top_builddir)/LinearAlgebra/src/LinearAlgebra/libLinearAlgebra.la \
    272272        libMolecuilderRandomNumbers.la \
    273         $(CodePatterns_LIBS) \
    274         $(BOOST_FILESYSTEM_LIBS) \
    275         $(BOOST_PROGRAM_OPTIONS_LIBS) \
    276         $(BOOST_SYSTEM_LIBS)
     273        ${CodePatterns_LIBS} \
     274        $(BOOST_PROGRAM_OPTIONS_LDFLAGS) $(BOOST_PROGRAM_OPTIONS_LIBS) \
     275        $(BOOST_FILESYSTEM_LDFLAGS) $(BOOST_FILESYSTEM_LIBS) \
     276        $(BOOST_SYSTEM_LDFLAGS) $(BOOST_SYSTEM_LIBS)
    277277
    278278libMolecuilderQtUI_la_LIBADD = \
    279        ${QT_LIBS} \
    280        -lQtOpenGL \
    281        ${GLU_LIBS}
     279        ${QT_LIBS} \
     280        -lQtOpenGL \
     281        ${GLU_LIBS}
    282282
    283283
  • src/unittests/Makefile.am

    r78d5b2 rf08ae7  
    1616INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/LinearAlgebra/src
    1717
    18 AM_LDFLAGS = ${CodePatterns_LIBS} $(CPPUNIT_LIBS) -ldl $(BOOST_FILESYSTEM_LDFLAGS) $(BOOST_PROGRAM_OPTIONS_LDFLAGS) $(BOOST_SYSTEM_LDFLAGS) $(BOOST_THREAD_LDFLAGS)
     18AM_LDFLAGS = ${CodePatterns_LIBS} $(CPPUNIT_LIBS) -ldl
    1919AM_CPPFLAGS = ${BOOST_CPPFLAGS} $(CPPUNIT_CFLAGS) ${CodePatterns_CFLAGS}
    2020
     
    4343noinst_PROGRAMS += $(GENERALTESTS) TestRunner
    4444
    45 BOOST_LIB = $(BOOST_PROGRAM_OPTIONS_LIBS) $(BOOST_FILESYSTEM_LIBS) $(BOOST_SYSTEM_LIBS) $(BOOST_THREAD_LIBS)
     45BOOST_LIB = \
     46        $(BOOST_PROGRAM_OPTIONS_LDFLAGS) $(BOOST_PROGRAM_OPTIONS_LIBS) \
     47        $(BOOST_FILESYSTEM_LDFLAGS) $(BOOST_FILESYSTEM_LIBS)
    4648
    4749ALLLIBS = \
Note: See TracChangeset for help on using the changeset viewer.