fix doc example typo
[boost.git] / boost / serialization / config.hpp
blob4c4eb683f951189b6885d673e0d8cfd399222ac0
1 // note lack of include guards. This is intentional
3 // config.hpp ---------------------------------------------//
5 // (c) Copyright Robert Ramey 2004
6 // Use, modification, and distribution is subject to the Boost Software
7 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
8 // http://www.boost.org/LICENSE_1_0.txt)
10 // See library home page at http://www.boost.org/libs/serialization
12 //----------------------------------------------------------------------------//
14 // This header implements separate compilation features as described in
15 // http://www.boost.org/more/separate_compilation.html
17 #include <boost/config.hpp>
18 #include <boost/detail/workaround.hpp>
19 #include <boost/preprocessor/facilities/empty.hpp>
21 // note: this version incorporates the related code into the the
22 // the same library as BOOST_ARCHIVE. This could change some day in the
23 // future
25 // if BOOST_SERIALIZATION_DECL is defined undefine it now:
26 #ifdef BOOST_SERIALIZATION_DECL
27 #undef BOOST_SERIALIZATION_DECL
28 #endif
30 #ifdef BOOST_HAS_DECLSPEC // defined in config system
31 // we need to import/export our code only if the user has specifically
32 // asked for it by defining either BOOST_ALL_DYN_LINK if they want all boost
33 // libraries to be dynamically linked, or BOOST_SERIALIZATION_DYN_LINK
34 // if they want just this one to be dynamically liked:
35 #if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_SERIALIZATION_DYN_LINK)
36 #if !defined(BOOST_DYN_LINK)
37 #define BOOST_DYN_LINK
38 #endif
39 // export if this is our own source, otherwise import:
40 #if defined(BOOST_SERIALIZATION_SOURCE)
41 #if defined(__BORLANDC__)
42 #define BOOST_SERIALIZATION_DECL(T) T __export
43 #else
44 #define BOOST_SERIALIZATION_DECL(T) __declspec(dllexport) T
45 #endif
46 #else
47 #if defined(__BORLANDC__)
48 #define BOOST_SERIALIZATION_DECL(T) T __import
49 #else
50 #define BOOST_SERIALIZATION_DECL(T) __declspec(dllimport) T
51 #endif
52 #endif // defined(BOOST_SERIALIZATION_SOURCE)
53 #endif // defined(BOOST_ALL_DYN_LINK) || defined(BOOST_SERIALIZATION_DYN_LINK)
54 #endif // BOOST_HAS_DECLSPEC
56 // if BOOST_SERIALIZATION_DECL isn't defined yet define it now:
57 #ifndef BOOST_SERIALIZATION_DECL
58 #define BOOST_SERIALIZATION_DECL(T) T
59 #endif
61 // enable automatic library variant selection ------------------------------//
63 #if !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_SERIALIZATION_NO_LIB) \
64 && !defined(BOOST_ARCHIVE_SOURCE) && !defined(BOOST_WARCHIVE_SOURCE) \
65 && !defined(BOOST_SERIALIZATION_SOURCE)
67 // Set the name of our library, this will get undef'ed by auto_link.hpp
68 // once it's done with it:
70 #define BOOST_LIB_NAME boost_serialization
72 // If we're importing code from a dll, then tell auto_link.hpp about it:
74 #if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_SERIALIZATION_DYN_LINK)
75 # define BOOST_DYN_LINK
76 #endif
78 // And include the header that does the work:
80 #include <boost/config/auto_link.hpp>
82 #endif