Imported Upstream version 3.2.2
[debian/gnuradio] / config / ax_boost_serialization.m4
1 #
2 # SYNOPSIS
3 #
4 #   AX_BOOST_SERIALIZATION
5 #
6 # DESCRIPTION
7 #
8 #   Test for Serialization library from the Boost C++ libraries. The macro
9 #   requires a preceding call to AX_BOOST_BASE.
10 #
11 #   This macro calls:
12 #
13 #     AC_SUBST(BOOST_SERIALIZATION_LIB)
14 #
15 #   And sets:
16 #
17 #     HAVE_BOOST_SERIALIZATION
18 #
19 # COPYLEFT
20 #
21 #   Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de>
22 #   Copyright (c) 2008 Free Software Foundation, Inc.
23 #
24 #   Copying and distribution of this file, with or without modification, are
25 #   permitted in any medium without royalty provided the copyright notice
26 #   and this notice are preserved.
27
28 AC_DEFUN([AX_BOOST_SERIALIZATION],
29 [
30     AC_REQUIRE([AX_BOOST_BASE])
31     _AX_BOOST_CHECK([boost_serialization],
32                     [@%:@include <fstream>
33                      @%:@include <boost/archive/text_oarchive.hpp>
34                      @%:@include <boost/archive/text_iarchive.hpp>],
35                     [std::ofstream ofs("filename");
36                      boost::archive::text_oarchive oa(ofs);
37                      return 0;])
38 ])