source: m4/ax_boost_program_options.m4@ d6eb80

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
Last change on this file since d6eb80 was fa861b, checked in by Frederik Heber <heber@…>, 15 years ago

Included BOOST library MPL into autoconf setup.

  • Property mode set to 100644
File size: 4.5 KB
Line 
1# ===========================================================================
2# http://www.nongnu.org/autoconf-archive/ax_boost_program_options.html
3# ===========================================================================
4#
5# SYNOPSIS
6#
7# AX_BOOST_PROGRAM_OPTIONS
8#
9# DESCRIPTION
10#
11# Test for program options library from the Boost C++ libraries. The macro
12# requires a preceding call to AX_BOOST_BASE. Further documentation is
13# available at <http://randspringer.de/boost/index.html>.
14#
15# This macro calls:
16#
17# AC_SUBST(BOOST_PROGRAM_OPTIONS_LIB)
18#
19# And sets:
20#
21# HAVE_BOOST_PROGRAM_OPTIONS
22#
23# LICENSE
24#
25# Copyright (c) 2009 Thomas Porschberg <thomas@randspringer.de>
26#
27# Copying and distribution of this file, with or without modification, are
28# permitted in any medium without royalty provided the copyright notice
29# and this notice are preserved.
30
31AC_DEFUN([AX_BOOST_PROGRAM_OPTIONS],
32[
33 AC_ARG_WITH([boost-program-options],
34 AS_HELP_STRING([--with-boost-program-options@<:@=special-lib@:>@],
35 [use the program options library from boost - it is possible to specify a certain library for the linker
36 e.g. --with-boost-program-options=boost_program_options-gcc-mt-1_33_1 ]),
37 [
38 if test "$withval" = "no"; then
39 want_boost="no"
40 elif test "$withval" = "yes"; then
41 want_boost="yes"
42 ax_boost_user_program_options_lib=""
43 else
44 want_boost="yes"
45 ax_boost_user_program_options_lib="$withval"
46 fi
47 ],
48 [want_boost="yes"]
49 )
50
51 if test "x$want_boost" = "xyes"; then
52 AC_REQUIRE([AC_PROG_CC])
53 export want_boost
54 CPPFLAGS_SAVED="$CPPFLAGS"
55 CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
56 export CPPFLAGS
57 LDFLAGS_SAVED="$LDFLAGS"
58 LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
59 export LDFLAGS
60 AC_CACHE_CHECK([whether the Boost::Program_Options library is available],
61 ax_cv_boost_program_options,
62 [AC_LANG_PUSH(C++)
63 AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[@%:@include <boost/program_options.hpp>
64 ]],
65 [[boost::program_options::options_description generic("Generic options");
66 return 0;]]),
67 ax_cv_boost_program_options=yes, ax_cv_boost_program_options=no)
68 AC_LANG_POP([C++])
69 ])
70 if test "$ax_cv_boost_program_options" = yes; then
71 AC_DEFINE(HAVE_BOOST_PROGRAM_OPTIONS,,[define if the Boost::PROGRAM_OPTIONS library is available])
72 BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
73 if test "x$ax_boost_user_program_options_lib" = "x"; then
74 for libextension in `ls $BOOSTLIBDIR/libboost_program_options*.so* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_program_options.*\)\.so.*$;\1;'` `ls $BOOSTLIBDIR/libboost_program_options*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_program_options.*\)\.a*$;\1;'` ; do
75 ax_lib=${libextension}
76 AC_CHECK_LIB($ax_lib, exit,
77 [BOOST_PROGRAM_OPTIONS_LIB="-l$ax_lib"; AC_SUBST(BOOST_PROGRAM_OPTIONS_LIB) link_program_options="yes"; break],
78 [link_program_options="no"])
79 done
80 if test "x$link_program_options" != "xyes"; then
81 for libextension in `ls $BOOSTLIBDIR/boost_program_options*.dll* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_program_options.*\)\.dll.*$;\1;'` `ls $BOOSTLIBDIR/boost_program_options*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_program_options.*\)\.a*$;\1;'` ; do
82 ax_lib=${libextension}
83 AC_CHECK_LIB($ax_lib, exit,
84 [BOOST_PROGRAM_OPTIONS_LIB="-l$ax_lib"; AC_SUBST(BOOST_PROGRAM_OPTIONS_LIB) link_program_options="yes"; break],
85 [link_program_options="no"])
86 done
87 fi
88 else
89 for ax_lib in $ax_boost_user_program_options_lib boost_program_options-$ax_boost_user_program_options_lib; do
90 AC_CHECK_LIB($ax_lib, main,
91 [BOOST_PROGRAM_OPTIONS_LIB="-l$ax_lib"; AC_SUBST(BOOST_PROGRAM_OPTIONS_LIB) link_program_options="yes"; break],
92 [link_program_options="no"])
93 done
94 fi
95 if test "x$link_program_options" != "xyes"; then
96 AC_MSG_ERROR([Could not link against [$ax_lib] !])
97 fi
98 fi
99 CPPFLAGS="$CPPFLAGS_SAVED"
100 LDFLAGS="$LDFLAGS_SAVED"
101 fi
102])
Note: See TracBrowser for help on using the repository browser.