1// boost/system/config.hpp -----------------------------------------------------------//
2
3// Copyright Beman Dawes 2003, 2006
4
5// Distributed under the Boost Software License, Version 1.0. (See accompanying
6// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7
8// See http://www.boost.org/libs/system for documentation.
9
10#ifndef BOOST_SYSTEM_CONFIG_HPP
11#define BOOST_SYSTEM_CONFIG_HPP
12
13#include <boost/config.hpp>
14#include <boost/predef/platform.h>
15#include <boost/system/api_config.hpp> // for BOOST_POSIX_API or BOOST_WINDOWS_API
16
17// This header implements separate compilation features as described in
18// http://www.boost.org/more/separate_compilation.html
19
20// normalize macros ------------------------------------------------------------------//
21
22#if !defined(BOOST_SYSTEM_DYN_LINK) && !defined(BOOST_SYSTEM_STATIC_LINK) \
23 && !defined(BOOST_ALL_DYN_LINK) && !defined(BOOST_ALL_STATIC_LINK)
24# define BOOST_SYSTEM_STATIC_LINK
25#endif
26
27#if defined(BOOST_ALL_DYN_LINK) && !defined(BOOST_SYSTEM_DYN_LINK)
28# define BOOST_SYSTEM_DYN_LINK
29#elif defined(BOOST_ALL_STATIC_LINK) && !defined(BOOST_SYSTEM_STATIC_LINK)
30# define BOOST_SYSTEM_STATIC_LINK
31#endif
32
33#if defined(BOOST_SYSTEM_DYN_LINK) && defined(BOOST_SYSTEM_STATIC_LINK)
34# error Must not define both BOOST_SYSTEM_DYN_LINK and BOOST_SYSTEM_STATIC_LINK
35#endif
36
37// enable dynamic or static linking as requested --------------------------------------//
38
39#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_SYSTEM_DYN_LINK)
40# if defined(BOOST_SYSTEM_SOURCE)
41# define BOOST_SYSTEM_DECL BOOST_SYMBOL_EXPORT
42# else
43# define BOOST_SYSTEM_DECL BOOST_SYMBOL_IMPORT
44# endif
45#else
46# define BOOST_SYSTEM_DECL
47#endif
48
49// enable automatic library variant selection ----------------------------------------//
50
51#if !defined(BOOST_SYSTEM_SOURCE) && !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_SYSTEM_NO_LIB)
52//
53// Set the name of our library, this will get undef'ed by auto_link.hpp
54// once it's done with it:
55//
56#define BOOST_LIB_NAME boost_system
57//
58// If we're importing code from a dll, then tell auto_link.hpp about it:
59//
60#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_SYSTEM_DYN_LINK)
61# define BOOST_DYN_LINK
62#endif
63//
64// And include the header that does the work:
65//
66#include <boost/config/auto_link.hpp>
67#endif // auto-linking disabled
68
69#endif // BOOST_SYSTEM_CONFIG_HPP
70
71

source code of boost/boost/system/config.hpp