source: m4/ax_boost_filesystem.m4@ ad011c

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 ad011c was 6940bb, checked in by Frederik Heber <heber@…>, 14 years ago

FIX: Forgot to add m4 scripts for boost::filesystem.

  • Property mode set to 100644
File size: 4.6 KB
Line 
1# ===========================================================================
2# http://www.gnu.org/software/autoconf-archive/ax_boost_filesystem.html
3# ===========================================================================
4#
5# SYNOPSIS
6#
7# AX_BOOST_FILESYSTEM
8#
9# DESCRIPTION
10#
11# Test for Filesystem 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_FILESYSTEM_LIB)
18#
19# And sets:
20#
21# HAVE_BOOST_FILESYSTEM
22#
23# LICENSE
24#
25# Copyright (c) 2009 Thomas Porschberg <thomas@randspringer.de>
26# Copyright (c) 2009 Michael Tindal
27# Copyright (c) 2009 Roman Rybalko <libtorrent@romanr.info>
28#
29# Copying and distribution of this file, with or without modification, are
30# permitted in any medium without royalty provided the copyright notice
31# and this notice are preserved. This file is offered as-is, without any
32# warranty.
33
34#serial 21
35
36AC_DEFUN([AX_BOOST_FILESYSTEM],
37[
38 AC_ARG_WITH([boost-filesystem],
39 AS_HELP_STRING([--with-boost-filesystem@<:@=special-lib@:>@],
40 [use the Filesystem library from boost - it is possible to specify a certain library for the linker
41 e.g. --with-boost-filesystem=boost_filesystem-gcc-mt ]),
42 [
43 if test "$withval" = "no"; then
44 want_boost="no"
45 elif test "$withval" = "yes"; then
46 want_boost="yes"
47 ax_boost_user_filesystem_lib=""
48 else
49 want_boost="yes"
50 ax_boost_user_filesystem_lib="$withval"
51 fi
52 ],
53 [want_boost="yes"]
54 )
55
56 if test "x$want_boost" = "xyes"; then
57 AC_REQUIRE([AC_PROG_CC])
58 CPPFLAGS_SAVED="$CPPFLAGS"
59 CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
60 export CPPFLAGS
61
62 LDFLAGS_SAVED="$LDFLAGS"
63 LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
64 export LDFLAGS
65
66 LIBS_SAVED=$LIBS
67 LIBS="$LIBS $BOOST_SYSTEM_LIB"
68 export LIBS
69
70 AC_CACHE_CHECK(whether the Boost::Filesystem library is available,
71 ax_cv_boost_filesystem,
72 [AC_LANG_PUSH([C++])
73 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/filesystem/path.hpp>]],
74 [[using namespace boost::filesystem;
75 path my_path( "foo/bar/data.txt" );
76 return 0;]])],
77 ax_cv_boost_filesystem=yes, ax_cv_boost_filesystem=no)
78 AC_LANG_POP([C++])
79 ])
80 if test "x$ax_cv_boost_filesystem" = "xyes"; then
81 AC_DEFINE(HAVE_BOOST_FILESYSTEM,,[define if the Boost::Filesystem library is available])
82 BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
83 if test "x$ax_boost_user_filesystem_lib" = "x"; then
84 for libextension in `ls $BOOSTLIBDIR/libboost_filesystem*.so* $BOOSTLIBDIR/libboost_filesystem*.dylib* $BOOSTLIBDIR/libboost_filesystem*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_filesystem.*\)\.so.*$;\1;' -e 's;^lib\(boost_filesystem.*\)\.a*$;\1;' -e 's;^lib\(boost_filesystem.*\)\.dylib$;\1;'` ; do
85 ax_lib=${libextension}
86 AC_CHECK_LIB($ax_lib, exit,
87 [BOOST_FILESYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_FILESYSTEM_LIB) link_filesystem="yes"; break],
88 [link_filesystem="no"])
89 done
90 if test "x$link_program_options" != "xyes"; then
91 for libextension in `ls $BOOSTLIBDIR/boost_filesystem*.{dll,a}* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_filesystem.*\)\.dll.*$;\1;' -e 's;^\(boost_filesystem.*\)\.a*$;\1;'` ; do
92 ax_lib=${libextension}
93 AC_CHECK_LIB($ax_lib, exit,
94 [BOOST_FILESYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_FILESYSTEM_LIB) link_filesystem="yes"; break],
95 [link_filesystem="no"])
96 done
97 fi
98 else
99 for ax_lib in $ax_boost_user_filesystem_lib boost_filesystem-$ax_boost_user_filesystem_lib; do
100 AC_CHECK_LIB($ax_lib, exit,
101 [BOOST_FILESYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_FILESYSTEM_LIB) link_filesystem="yes"; break],
102 [link_filesystem="no"])
103 done
104
105 fi
106 if test "x$ax_lib" = "x"; then
107 AC_MSG_ERROR(Could not find a version of the library!)
108 fi
109 if test "x$link_filesystem" != "xyes"; then
110 AC_MSG_ERROR(Could not link against $ax_lib !)
111 fi
112 fi
113
114 CPPFLAGS="$CPPFLAGS_SAVED"
115 LDFLAGS="$LDFLAGS_SAVED"
116 LIBS="$LIBS_SAVED"
117 fi
118])
Note: See TracBrowser for help on using the repository browser.