config.hpp 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. // (C) Copyright David Abrahams 2000.
  2. // Distributed under the Boost Software License, Version 1.0. (See
  3. // accompanying file LICENSE_1_0.txt or copy at
  4. // http://www.boost.org/LICENSE_1_0.txt)
  5. //
  6. // The author gratefully acknowleges the support of Dragon Systems, Inc., in
  7. // producing this work.
  8. // Revision History:
  9. // 04 Mar 01 Some fixes so it will compile with Intel C++ (Dave Abrahams)
  10. #ifndef CONFIG_DWA052200_H_
  11. # define CONFIG_DWA052200_H_
  12. # include <boost/config.hpp>
  13. # include <boost/detail/workaround.hpp>
  14. # ifdef BOOST_NO_OPERATORS_IN_NAMESPACE
  15. // A gcc bug forces some symbols into the global namespace
  16. # define BOOST_PYTHON_BEGIN_CONVERSION_NAMESPACE
  17. # define BOOST_PYTHON_END_CONVERSION_NAMESPACE
  18. # define BOOST_PYTHON_CONVERSION
  19. # define BOOST_PYTHON_IMPORT_CONVERSION(x) using ::x
  20. # else
  21. # define BOOST_PYTHON_BEGIN_CONVERSION_NAMESPACE namespace boost { namespace python {
  22. # define BOOST_PYTHON_END_CONVERSION_NAMESPACE }} // namespace boost::python
  23. # define BOOST_PYTHON_CONVERSION boost::python
  24. # define BOOST_PYTHON_IMPORT_CONVERSION(x) void never_defined() // so we can follow the macro with a ';'
  25. # endif
  26. # if defined(BOOST_MSVC)
  27. # pragma warning (disable : 4786) // disable truncated debug symbols
  28. # pragma warning (disable : 4251) // disable exported dll function
  29. # pragma warning (disable : 4800) //'int' : forcing value to bool 'true' or 'false'
  30. # pragma warning (disable : 4275) // non dll-interface class
  31. # elif defined(__ICL) && __ICL < 600 // Intel C++ 5
  32. # pragma warning(disable: 985) // identifier was truncated in debug information
  33. # endif
  34. // The STLport puts all of the standard 'C' library names in std (as far as the
  35. // user is concerned), but without it you need a fix if you're using MSVC or
  36. // Intel C++
  37. # if defined(BOOST_NO_STDC_NAMESPACE)
  38. # define BOOST_CSTD_
  39. # else
  40. # define BOOST_CSTD_ std
  41. # endif
  42. /*****************************************************************************
  43. *
  44. * Set up dll import/export options:
  45. *
  46. ****************************************************************************/
  47. // backwards compatibility:
  48. #ifdef BOOST_PYTHON_STATIC_LIB
  49. # define BOOST_PYTHON_STATIC_LINK
  50. # elif !defined(BOOST_PYTHON_DYNAMIC_LIB)
  51. # define BOOST_PYTHON_DYNAMIC_LIB
  52. #endif
  53. #if defined(BOOST_PYTHON_DYNAMIC_LIB)
  54. # if defined(BOOST_SYMBOL_EXPORT)
  55. # if defined(BOOST_PYTHON_SOURCE)
  56. # define BOOST_PYTHON_DECL BOOST_SYMBOL_EXPORT
  57. # define BOOST_PYTHON_DECL_FORWARD BOOST_SYMBOL_FORWARD_EXPORT
  58. # define BOOST_PYTHON_DECL_EXCEPTION BOOST_EXCEPTION_EXPORT
  59. # define BOOST_PYTHON_BUILD_DLL
  60. # else
  61. # define BOOST_PYTHON_DECL BOOST_SYMBOL_IMPORT
  62. # define BOOST_PYTHON_DECL_FORWARD BOOST_SYMBOL_FORWARD_IMPORT
  63. # define BOOST_PYTHON_DECL_EXCEPTION BOOST_EXCEPTION_IMPORT
  64. # endif
  65. # endif
  66. #endif
  67. #ifndef BOOST_PYTHON_DECL
  68. # define BOOST_PYTHON_DECL
  69. #endif
  70. #ifndef BOOST_PYTHON_DECL_FORWARD
  71. # define BOOST_PYTHON_DECL_FORWARD
  72. #endif
  73. #ifndef BOOST_PYTHON_DECL_EXCEPTION
  74. # define BOOST_PYTHON_DECL_EXCEPTION
  75. #endif
  76. #if BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(60590042))
  77. // Replace broken Tru64/cxx offsetof macro
  78. # define BOOST_PYTHON_OFFSETOF(s_name, s_member) \
  79. ((size_t)__INTADDR__(&(((s_name *)0)->s_member)))
  80. #else
  81. # define BOOST_PYTHON_OFFSETOF offsetof
  82. #endif
  83. // enable automatic library variant selection ------------------------------//
  84. #if !defined(BOOST_PYTHON_SOURCE) && !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_PYTHON_NO_LIB)
  85. //
  86. // Set the name of our library, this will get undef'ed by auto_link.hpp
  87. // once it's done with it:
  88. //
  89. #define _BOOST_PYTHON_CONCAT(N, M, m) N ## M ## m
  90. #define BOOST_PYTHON_CONCAT(N, M, m) _BOOST_PYTHON_CONCAT(N, M, m)
  91. #define BOOST_LIB_NAME BOOST_PYTHON_CONCAT(boost_python, PY_MAJOR_VERSION, PY_MINOR_VERSION)
  92. //
  93. // If we're importing code from a dll, then tell auto_link.hpp about it:
  94. //
  95. #ifdef BOOST_PYTHON_DYNAMIC_LIB
  96. # define BOOST_DYN_LINK
  97. #endif
  98. //
  99. // And include the header that does the work:
  100. //
  101. #include <boost/config/auto_link.hpp>
  102. #endif // auto-linking disabled
  103. #undef BOOST_PYTHON_CONCAT
  104. #undef _BOOST_PYTHON_CONCAT
  105. #ifndef BOOST_PYTHON_NO_PY_SIGNATURES
  106. #define BOOST_PYTHON_SUPPORTS_PY_SIGNATURES // enables smooth transition
  107. #endif
  108. #if !defined(BOOST_ATTRIBUTE_UNUSED) && defined(__GNUC__) && (__GNUC__ >= 4)
  109. # define BOOST_ATTRIBUTE_UNUSED __attribute__((unused))
  110. #endif
  111. #endif // CONFIG_DWA052200_H_