config.hpp 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. // boost/system/config.hpp -----------------------------------------------------------//
  2. // Copyright Beman Dawes 2003, 2006
  3. // Distributed under the Boost Software License, Version 1.0. (See accompanying
  4. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  5. // See http://www.boost.org/libs/system for documentation.
  6. #ifndef BOOST_SYSTEM_CONFIG_HPP
  7. #define BOOST_SYSTEM_CONFIG_HPP
  8. #include <boost/config.hpp>
  9. #include <boost/system/api_config.hpp> // for BOOST_POSIX_API or BOOST_WINDOWS_API
  10. // This header implemented separate compilation features as described in
  11. // http://www.boost.org/more/separate_compilation.html
  12. //
  13. // It's only retained for compatibility now that the library is header-only.
  14. // normalize macros ------------------------------------------------------------------//
  15. #if !defined(BOOST_SYSTEM_DYN_LINK) && !defined(BOOST_SYSTEM_STATIC_LINK) \
  16. && !defined(BOOST_ALL_DYN_LINK) && !defined(BOOST_ALL_STATIC_LINK)
  17. # define BOOST_SYSTEM_STATIC_LINK
  18. #endif
  19. #if defined(BOOST_ALL_DYN_LINK) && !defined(BOOST_SYSTEM_DYN_LINK)
  20. # define BOOST_SYSTEM_DYN_LINK
  21. #elif defined(BOOST_ALL_STATIC_LINK) && !defined(BOOST_SYSTEM_STATIC_LINK)
  22. # define BOOST_SYSTEM_STATIC_LINK
  23. #endif
  24. #if defined(BOOST_SYSTEM_DYN_LINK) && defined(BOOST_SYSTEM_STATIC_LINK)
  25. # error Must not define both BOOST_SYSTEM_DYN_LINK and BOOST_SYSTEM_STATIC_LINK
  26. #endif
  27. // enable dynamic or static linking as requested --------------------------------------//
  28. #if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_SYSTEM_DYN_LINK)
  29. # if defined(BOOST_SYSTEM_SOURCE)
  30. # define BOOST_SYSTEM_DECL BOOST_SYMBOL_EXPORT
  31. # else
  32. # define BOOST_SYSTEM_DECL BOOST_SYMBOL_IMPORT
  33. # endif
  34. #else
  35. # define BOOST_SYSTEM_DECL
  36. #endif
  37. #endif // BOOST_SYSTEM_CONFIG_HPP