1 // boost/system/config.hpp -----------------------------------------------------------//
3 // Copyright Beman Dawes 2003, 2006
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)
8 // See http://www.boost.org/libs/system for documentation.
10 #ifndef BOOST_SYSTEM_CONFIG_HPP
11 #define BOOST_SYSTEM_CONFIG_HPP
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
17 // This header implements separate compilation features as described in
18 // http://www.boost.org/more/separate_compilation.html
20 // normalize macros ------------------------------------------------------------------//
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
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
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
37 // enable dynamic or static linking as requested --------------------------------------//
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
43 # define BOOST_SYSTEM_DECL BOOST_SYMBOL_IMPORT
46 # define BOOST_SYSTEM_DECL
49 // enable automatic library variant selection ----------------------------------------//
51 #if !defined(BOOST_SYSTEM_SOURCE) && !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_SYSTEM_NO_LIB)
53 // Set the name of our library, this will get undef'ed by auto_link.hpp
54 // once it's done with it:
56 #define BOOST_LIB_NAME boost_system
58 // If we're importing code from a dll, then tell auto_link.hpp about it:
60 #if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_SYSTEM_DYN_LINK)
61 # define BOOST_DYN_LINK
64 // And include the header that does the work:
66 #include <boost/config/auto_link.hpp>
67 #endif // auto-linking disabled
69 #endif // BOOST_SYSTEM_CONFIG_HPP