root/trunk/config/ax_boost_filesystem.m4

Revision 524, 3.2 kB (checked in by andreas, 16 months ago)

+ added GNU autotools build environment
+ raster and gdal input isn't tested. Not working currently...
+ *-input.so plugins created. Change loader in source or link plugin to correct place
+ use pkg-config uninstalled feature

-> define project root to PKG_CONFIG_PATH to use mapnik without installation

+ added various library checks
+ don't install fonts
+ don't use included AGG

-> check for a installed libagg

+ Added Makefile for c++ demo
+ don't build any python wrapper stuff

-> this follows if all other building works

+ added Anjuta file

-> not needed to build anything, but helps much if you use Anjuta

Line 
1dnl @synopsis AX_BOOST_FILESYSTEM
2dnl
3dnl Test for Filesystem library from the Boost C++ libraries. The macro
4dnl requires a preceding call to AX_BOOST_BASE. Further documentation
5dnl is available at <http://randspringer.de/boost/index.html>.
6dnl
7dnl This macro calls:
8dnl
9dnl   AC_SUBST(BOOST_FILESYSTEM_LIB)
10dnl
11dnl And sets:
12dnl
13dnl   HAVE_BOOST_FILESYSTEM
14dnl
15dnl @category InstalledPackages
16dnl @category Cxx
17dnl @author Thomas Porschberg <thomas@randspringer.de>
18dnl @author Michael Tindal <mtindal@paradoxpoint.com>
19dnl @version 2006-06-15
20dnl @license AllPermissive
21
22AC_DEFUN([AX_BOOST_FILESYSTEM],
23[
24        AC_ARG_WITH([boost-filesystem],
25        AS_HELP_STRING([--with-boost-filesystem@<:@=special-lib@:>@],
26                   [use the Filesystem library from boost - it is possible to specify a certain library for the linker
27                        e.g. --with-boost-filesystem=boost_filesystem-gcc-mt ]),
28        [
29        if test "$withval" = "no"; then
30                        want_boost="no"
31        elif test "$withval" = "yes"; then
32            want_boost="yes"
33            ax_boost_user_filesystem_lib=""
34        else
35                    want_boost="yes"
36                ax_boost_user_filesystem_lib="$withval"
37                fi
38        ],
39        [want_boost="yes"]
40        )
41
42        if test "x$want_boost" = "xyes"; then
43        AC_REQUIRE([AC_PROG_CC])
44                CPPFLAGS_SAVED="$CPPFLAGS"
45                CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
46                export CPPFLAGS
47
48                LDFLAGS_SAVED="$LDFLAGS"
49                LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
50                export LDFLAGS
51
52        AC_CACHE_CHECK(whether the Boost::Filesystem library is available,
53                                           ax_cv_boost_filesystem,
54        [AC_LANG_PUSH([C++])
55         AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[@%:@include <boost/filesystem/path.hpp>]],
56                                   [[using namespace boost::filesystem;
57                                   path my_path( "foo/bar/data.txt" );
58                                   return 0;]]),
59                                               ax_cv_boost_filesystem=yes, ax_cv_boost_filesystem=no)
60         AC_LANG_POP([C++])
61                ])
62                if test "x$ax_cv_boost_filesystem" = "xyes"; then
63                        AC_DEFINE(HAVE_BOOST_FILESYSTEM,,[define if the Boost::Filesystem library is available])
64                        BN=boost_filesystem
65            if test "x$ax_boost_user_filesystem_lib" = "x"; then
66                        for ax_lib in $BN $BN-$CC $BN-$CC-mt $BN-$CC-mt-s $BN-$CC-s \
67                              lib$BN lib$BN-$CC lib$BN-$CC-mt lib$BN-$CC-mt-s lib$BN-$CC-s \
68                              $BN-mgw $BN-mgw $BN-mgw-mt $BN-mgw-mt-s $BN-mgw-s ; do
69                                    AC_CHECK_LIB($ax_lib, main,
70                                 [BOOST_FILESYSTEM_LIB="-l$ax_lib" AC_SUBST(BOOST_FILESYSTEM_LIB) link_filesystem="yes" break],
71                                 [link_filesystem="no"])
72                                done
73            else
74               for ax_lib in $ax_boost_user_filesystem_lib $BN-$ax_boost_user_filesystem_lib; do
75                                      AC_CHECK_LIB($ax_lib, main,
76                                   [BOOST_FILESYSTEM_LIB="-l$ax_lib" AC_SUBST(BOOST_FILESYSTEM_LIB) link_filesystem="yes" break],
77                                   [link_filesystem="no"])
78                  done
79
80            fi
81                        if test "x$link_filesystem" = "xno"; then
82                                AC_MSG_ERROR(Could not link against $ax_lib !)
83                        fi
84                fi
85
86                CPPFLAGS="$CPPFLAGS_SAVED"
87        LDFLAGS="$LDFLAGS_SAVED"
88        fi
89])
Note: See TracBrowser for help on using the browser.