blob: 2180de4a024db56c48467f8073a14c6301ebf4cd [file] [log] [blame]
Jeff Thompson86b6d642013-10-17 15:01:56 -07001// ndnboost/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 NDNBOOST_SYSTEM_CONFIG_HPP
11#define NDNBOOST_SYSTEM_CONFIG_HPP
12
13#include <ndnboost/config.hpp>
14#include <ndnboost/system/api_config.hpp> // for NDNBOOST_POSIX_API or NDNBOOST_WINDOWS_API
15
16// This header implements separate compilation features as described in
17// http://www.boost.org/more/separate_compilation.html
18
19// normalize macros ------------------------------------------------------------------//
20
21#if !defined(NDNBOOST_SYSTEM_DYN_LINK) && !defined(NDNBOOST_SYSTEM_STATIC_LINK) \
22 && !defined(NDNBOOST_ALL_DYN_LINK) && !defined(NDNBOOST_ALL_STATIC_LINK)
23# define NDNBOOST_SYSTEM_STATIC_LINK
24#endif
25
26#if defined(NDNBOOST_ALL_DYN_LINK) && !defined(NDNBOOST_SYSTEM_DYN_LINK)
27# define NDNBOOST_SYSTEM_DYN_LINK
28#elif defined(NDNBOOST_ALL_STATIC_LINK) && !defined(NDNBOOST_SYSTEM_STATIC_LINK)
29# define NDNBOOST_SYSTEM_STATIC_LINK
30#endif
31
32#if defined(NDNBOOST_SYSTEM_DYN_LINK) && defined(NDNBOOST_SYSTEM_STATIC_LINK)
33# error Must not define both NDNBOOST_SYSTEM_DYN_LINK and NDNBOOST_SYSTEM_STATIC_LINK
34#endif
35
36// enable dynamic or static linking as requested --------------------------------------//
37
38#if defined(NDNBOOST_ALL_DYN_LINK) || defined(NDNBOOST_SYSTEM_DYN_LINK)
39# if defined(NDNBOOST_SYSTEM_SOURCE)
40# define NDNBOOST_SYSTEM_DECL NDNBOOST_SYMBOL_EXPORT
41# else
42# define NDNBOOST_SYSTEM_DECL NDNBOOST_SYMBOL_IMPORT
43# endif
44#else
45# define NDNBOOST_SYSTEM_DECL
46#endif
47
48// enable automatic library variant selection ----------------------------------------//
49
50#if !defined(NDNBOOST_SYSTEM_SOURCE) && !defined(NDNBOOST_ALL_NO_LIB) && !defined(NDNBOOST_SYSTEM_NO_LIB)
51//
52// Set the name of our library, this will get undef'ed by auto_link.hpp
53// once it's done with it:
54//
55#define NDNBOOST_LIB_NAME ndnboost_system
56//
57// If we're importing code from a dll, then tell auto_link.hpp about it:
58//
59#if defined(NDNBOOST_ALL_DYN_LINK) || defined(NDNBOOST_SYSTEM_DYN_LINK)
60# define NDNBOOST_DYN_LINK
61#endif
62//
63// And include the header that does the work:
64//
65#include <ndnboost/config/auto_link.hpp>
66#endif // auto-linking disabled
67
68#endif // NDNBOOST_SYSTEM_CONFIG_HPP
69