2 * Distributed under the Boost Software License, Version 1.0.
3 * (See accompanying file LICENSE_1_0.txt or copy at
4 * http://www.boost.org/LICENSE_1_0.txt)
6 * Copyright (c) 2012 Hartmut Kaiser
7 * Copyright (c) 2014 Andrey Semashev
10 * \file atomic/detail/config.hpp
12 * This header defines macros for linking with compiled library of Boost.Atomic
15 #ifndef BOOST_ATOMIC_DETAIL_LINK_HPP_INCLUDED_
16 #define BOOST_ATOMIC_DETAIL_LINK_HPP_INCLUDED_
18 #include <boost/atomic/detail/config.hpp>
20 #ifdef BOOST_HAS_PRAGMA_ONCE
24 ///////////////////////////////////////////////////////////////////////////////
25 // Set up dll import/export options
26 #if (defined(BOOST_ATOMIC_DYN_LINK) || defined(BOOST_ALL_DYN_LINK)) && \
27 !defined(BOOST_ATOMIC_STATIC_LINK)
29 #if defined(BOOST_ATOMIC_SOURCE)
30 #define BOOST_ATOMIC_DECL BOOST_SYMBOL_EXPORT
31 #define BOOST_ATOMIC_BUILD_DLL
33 #define BOOST_ATOMIC_DECL BOOST_SYMBOL_IMPORT
36 #endif // building a shared library
38 #ifndef BOOST_ATOMIC_DECL
39 #define BOOST_ATOMIC_DECL
42 ///////////////////////////////////////////////////////////////////////////////
43 // Auto library naming
44 #if !defined(BOOST_ATOMIC_SOURCE) && !defined(BOOST_ALL_NO_LIB) && \
45 !defined(BOOST_ATOMIC_NO_LIB)
47 #define BOOST_LIB_NAME boost_atomic
49 // tell the auto-link code to select a dll when required:
50 #if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_ATOMIC_DYN_LINK)
51 #define BOOST_DYN_LINK
54 #include <boost/config/auto_link.hpp>
56 #endif // auto-linking disabled