setup_config.hpp 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /*
  2. * Copyright Andrey Semashev 2007 - 2013.
  3. * Distributed under the Boost Software License, Version 1.0.
  4. * (See accompanying file LICENSE_1_0.txt or copy at
  5. * http://www.boost.org/LICENSE_1_0.txt)
  6. */
  7. /*!
  8. * \file setup_config.hpp
  9. * \author Andrey Semashev
  10. * \date 14.09.2009
  11. *
  12. * \brief This header is the Boost.Log library implementation, see the library documentation
  13. * at http://www.boost.org/doc/libs/release/libs/log/doc/html/index.html. In this file
  14. * internal configuration macros are defined.
  15. */
  16. #ifndef BOOST_LOG_DETAIL_SETUP_CONFIG_HPP_INCLUDED_
  17. #define BOOST_LOG_DETAIL_SETUP_CONFIG_HPP_INCLUDED_
  18. #include <boost/log/detail/config.hpp>
  19. #ifdef BOOST_HAS_PRAGMA_ONCE
  20. #pragma once
  21. #endif
  22. #if !defined(BOOST_LOG_SETUP_BUILDING_THE_LIB)
  23. // Detect if we're dealing with dll
  24. # if defined(BOOST_LOG_SETUP_DYN_LINK) || defined(BOOST_ALL_DYN_LINK)
  25. # define BOOST_LOG_SETUP_DLL
  26. # endif
  27. # if defined(BOOST_HAS_DECLSPEC) && defined(BOOST_LOG_SETUP_DLL)
  28. # define BOOST_LOG_SETUP_API __declspec(dllimport)
  29. # else
  30. # define BOOST_LOG_SETUP_API
  31. # endif // defined(BOOST_HAS_DECLSPEC)
  32. //
  33. // Automatically link to the correct build variant where possible.
  34. //
  35. # if !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_LOG_SETUP_NO_LIB)
  36. # define BOOST_LIB_NAME boost_log_setup
  37. # if defined(BOOST_LOG_SETUP_DLL)
  38. # define BOOST_DYN_LINK
  39. # endif
  40. # include <boost/config/auto_link.hpp>
  41. # endif // auto-linking disabled
  42. #else // !defined(BOOST_LOG_SETUP_BUILDING_THE_LIB)
  43. # if defined(BOOST_HAS_DECLSPEC) && defined(BOOST_LOG_SETUP_DLL)
  44. # define BOOST_LOG_SETUP_API __declspec(dllexport)
  45. # elif defined(__GNUC__) && __GNUC__ >= 4 && (defined(linux) || defined(__linux) || defined(__linux__))
  46. # define BOOST_LOG_SETUP_API __attribute__((visibility("default")))
  47. # else
  48. # define BOOST_LOG_SETUP_API
  49. # endif
  50. #endif // !defined(BOOST_LOG_SETUP_BUILDING_THE_LIB)
  51. #endif // BOOST_LOG_DETAIL_SETUP_CONFIG_HPP_INCLUDED_