config_all.hpp 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. // (C) Copyright John Maddock 2005.
  2. // Use, modification and distribution are subject to the
  3. // Boost Software License, Version 1.0. (See accompanying file
  4. // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  5. /*
  6. * The gcc include path logic is derived from STLport:
  7. *
  8. * Copyright (c) 1994
  9. * Hewlett-Packard Company
  10. *
  11. * Copyright (c) 1996-1999
  12. * Silicon Graphics Computer Systems, Inc.
  13. *
  14. * Copyright (c) 1997
  15. * Moscow Center for SPARC Technology
  16. *
  17. * Copyright (c) 1999-2003
  18. * Boris Fomitchev
  19. *
  20. * This material is provided "as is", with absolutely no warranty expressed
  21. * or implied. Any use is at your own risk.
  22. *
  23. * Permission to use or copy this software for any purpose is hereby granted
  24. * without fee, provided the above notices are retained on all copies.
  25. * Permission to modify the code and to distribute modified code is granted,
  26. * provided the above notices are retained, and a notice that the code was
  27. * modified is included with the above copyright notice.
  28. *
  29. */
  30. #ifndef BOOST_TR1_DETAIL_CONFIG_ALL_HPP_INCLUDED
  31. # define BOOST_TR1_DETAIL_CONFIG_ALL_HPP_INCLUDED
  32. //
  33. // IMPORTANT: we must figure out the basics, such as how to
  34. // forward to the real std lib headers *without* including
  35. // boost/config.hpp or any of the std lib headers. A classic
  36. // chicken and the egg problem....
  37. //
  38. // Including <cstddef> at least lets us detect STLport:
  39. //
  40. #include <cstddef>
  41. // Including <cstdlib> allows us to use __GLIBCXX__ to
  42. // determine the version of the stdc++ library in use
  43. // under Darwin.
  44. #include <cstdlib>
  45. # if defined(_RWSTD_VER) && _RWSTD_VER >= 0x04010200
  46. # if !defined (__SUNPRO_CC) && !defined (__DECCXX)
  47. # define BOOST_TR1_STD_CHEADER(name) <../include/ansi/name>
  48. # endif
  49. # endif
  50. # if (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)) && !defined(__BORLANDC__)
  51. # ifdef __SUNPRO_CC
  52. // can't use <../stlport/name> since some compilers put stlport in a different directory:
  53. # define BOOST_TR1_STD_HEADER(name) <../stlport4/name>
  54. # elif defined(__PGI)
  55. # define BOOST_TR1_STD_HEADER(name) <../CC/name>
  56. # else
  57. # define BOOST_TR1_STD_HEADER(name) <../stlport/name>
  58. # endif
  59. # elif defined(__PATHSCALE__) && (defined(__STD_RWCOMPILER_H__) || defined(_RWSTD_VER))
  60. # define BOOST_TR1_STD_HEADER(name) <../include/name>
  61. # elif defined(__SUNPRO_CC) && (defined(__STD_RWCOMPILER_H__) || defined(_RWSTD_VER))
  62. # define BOOST_TR1_STD_HEADER(name) <../stdcxx4/name>
  63. # elif defined(__HP_aCC)
  64. // HP aCC include path:
  65. # define BOOST_TR1_STD_HEADER(name) <../include_std/name>
  66. # elif defined(__DECCXX)
  67. # define BOOST_TR1_STD_HEADER(name) <../cxx/name>
  68. # elif defined(__BORLANDC__) && __BORLANDC__ >= 0x570
  69. # define BOOST_TR1_STD_HEADER(name) <../include/dinkumware/name>
  70. # elif defined(__clang__)
  71. # define BOOST_TR1_STD_HEADER(name) <../include/name>
  72. # elif defined(__GNUC__) && __GNUC__ >= 3
  73. # if defined(BOOST_TR1_GCC_INCLUDE_PATH)
  74. # define BOOST_TR1_STD_HEADER(name) <../BOOST_TR1_GCC_INCLUDE_PATH/name>
  75. # elif ( (__GNUC__ == 3 ) && ((__GNUC_MINOR__ == 0) || ((__GNUC_MINOR__ < 3) && defined(__APPLE_CC__))))
  76. # define BOOST_TR1_STD_HEADER(name) <../g++-v3/name>
  77. # else
  78. # if ( ((__GNUC__ == 3 ) && (__GNUC_MINOR__ >= 3)) && (defined(__APPLE_CC__) || defined(__CYGWIN__)))
  79. # define BOOST_TR1_STD_HEADER(name) <../c++/name>
  80. # elif ((__GLIBCXX__ == 20050421) && defined(__APPLE_CC__))
  81. // Some Darwin tools fix libstdc++ at 4.0.0 irrespective of the actual
  82. // compiler version:
  83. # define BOOST_TR1_STD_HEADER(name) <../4.0.0/name>
  84. /*
  85. * Before version 3.4.0 the 0 patch level was not part of the include path:
  86. */
  87. # elif defined (__GNUC_PATCHLEVEL__) && ((__GNUC_PATCHLEVEL__ > 0) || \
  88. (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || \
  89. (__GNUC__ > 3))
  90. # define BOOST_TR1_STD_HEADER(name) <../__GNUC__.__GNUC_MINOR__.__GNUC_PATCHLEVEL__/name>
  91. # else
  92. # define BOOST_TR1_STD_HEADER(name) <../__GNUC__.__GNUC_MINOR__/name>
  93. # endif
  94. # endif
  95. # if !defined(BOOST_TR1_DISABLE_INCLUDE_NEXT) && !defined(__ICC) \
  96. && (defined(linux) || defined(__linux) || defined(__linux__) || defined(__GNU__) || defined(__GLIBC__))
  97. // Disable use of #include_next on Linux as typically we are installed in a directory that is searched
  98. // *after* the std lib include path:
  99. # define BOOST_TR1_DISABLE_INCLUDE_NEXT
  100. # endif
  101. # else
  102. # define BOOST_TR1_STD_HEADER(name) <../include/name>
  103. # endif
  104. #if !defined(BOOST_TR1_STD_CHEADER)
  105. # define BOOST_TR1_STD_CHEADER(name) BOOST_TR1_STD_HEADER(name)
  106. #endif
  107. #if defined(__GNUC__) && !defined(BOOST_HAS_INCLUDE_NEXT)
  108. # define BOOST_HAS_INCLUDE_NEXT
  109. #endif
  110. #ifdef __GXX_EXPERIMENTAL_CXX0X__
  111. # define BOOST_HAS_CPP_0X
  112. #endif
  113. #if defined(_MSC_VER) && (_MSC_VER >= 1600) && !defined(BOOST_HAS_CPP_0X)
  114. # define BOOST_HAS_CPP_0X
  115. #endif
  116. //
  117. // We may be in the middle of parsing boost/config.hpp
  118. // when this header is included, so don't rely on config
  119. // stuff in the rest of this header...
  120. //
  121. // Find our actual std lib:
  122. //
  123. #if defined(BOOST_HAS_INCLUDE_NEXT) && !defined(BOOST_TR1_DISABLE_INCLUDE_NEXT)
  124. //
  125. // We don't take this branch if BOOST_TR1_DISABLE_INCLUDE_NEXT
  126. // is defined as we may be installed in
  127. // /usr/include, in which case #include_next won't work as our
  128. // include path will occur AFTER the regular std lib one :-(
  129. //
  130. # ifndef BOOST_TR1_NO_RECURSION
  131. # define BOOST_TR1_NO_RECURSION
  132. # define BOOST_TR1_NO_CONFIG_ALL_RECURSION
  133. # endif
  134. # include_next <utility>
  135. # if (__GNUC__ < 3)
  136. # include_next <algorithm>
  137. # include_next <iterator>
  138. # endif
  139. # ifdef BOOST_TR1_NO_CONFIG_ALL_RECURSION
  140. # undef BOOST_TR1_NO_CONFIG_ALL_RECURSION
  141. # undef BOOST_TR1_NO_RECURSION
  142. # endif
  143. #else
  144. # include BOOST_TR1_STD_HEADER(utility)
  145. #endif
  146. #include <boost/tr1/detail/config.hpp>
  147. #endif