config.hpp 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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 implements separate compilation features as described in
  11. // http://www.boost.org/more/separate_compilation.html
  12. // normalize macros ------------------------------------------------------------------//
  13. #if !defined(BOOST_SYSTEM_DYN_LINK) && !defined(BOOST_SYSTEM_STATIC_LINK) \
  14. && !defined(BOOST_ALL_DYN_LINK) && !defined(BOOST_ALL_STATIC_LINK)
  15. # define BOOST_SYSTEM_STATIC_LINK
  16. #endif
  17. #if defined(BOOST_ALL_DYN_LINK) && !defined(BOOST_SYSTEM_DYN_LINK)
  18. # define BOOST_SYSTEM_DYN_LINK
  19. #elif defined(BOOST_ALL_STATIC_LINK) && !defined(BOOST_SYSTEM_STATIC_LINK)
  20. # define BOOST_SYSTEM_STATIC_LINK
  21. #endif
  22. #if defined(BOOST_SYSTEM_DYN_LINK) && defined(BOOST_SYSTEM_STATIC_LINK)
  23. # error Must not define both BOOST_SYSTEM_DYN_LINK and BOOST_SYSTEM_STATIC_LINK
  24. #endif
  25. // enable dynamic or static linking as requested --------------------------------------//
  26. #if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_SYSTEM_DYN_LINK)
  27. # if defined(BOOST_SYSTEM_SOURCE)
  28. # define BOOST_SYSTEM_DECL BOOST_SYMBOL_EXPORT
  29. # else
  30. # define BOOST_SYSTEM_DECL BOOST_SYMBOL_IMPORT
  31. # endif
  32. #else
  33. # define BOOST_SYSTEM_DECL
  34. #endif
  35. // enable automatic library variant selection ----------------------------------------//
  36. #if !defined(BOOST_SYSTEM_SOURCE) && !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_SYSTEM_NO_LIB)
  37. //
  38. // Set the name of our library, this will get undef'ed by auto_link.hpp
  39. // once it's done with it:
  40. //
  41. #define BOOST_LIB_NAME boost_system
  42. //
  43. // If we're importing code from a dll, then tell auto_link.hpp about it:
  44. //
  45. #if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_SYSTEM_DYN_LINK)
  46. # define BOOST_DYN_LINK
  47. #endif
  48. //
  49. // And include the header that does the work:
  50. //
  51. #include <boost/config/auto_link.hpp>
  52. #endif // auto-linking disabled
  53. #endif // BOOST_SYSTEM_CONFIG_HPP