select_stdlib_config.hpp 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. // Boost compiler configuration selection header file
  2. // (C) Copyright John Maddock 2001 - 2003.
  3. // (C) Copyright Jens Maurer 2001 - 2002.
  4. // Use, modification and distribution are subject to the
  5. // Boost Software License, Version 1.0. (See accompanying file
  6. // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  7. // See http://www.boost.org for most recent version.
  8. // locate which std lib we are using and define BOOST_STDLIB_CONFIG as needed:
  9. // First include <cstddef> to determine if some version of STLport is in use as the std lib
  10. // (do not rely on this header being included since users can short-circuit this header
  11. // if they know whose std lib they are using.)
  12. #ifdef __cplusplus
  13. # include <cstddef>
  14. #else
  15. # include <stddef.h>
  16. #endif
  17. #if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
  18. // STLPort library; this _must_ come first, otherwise since
  19. // STLport typically sits on top of some other library, we
  20. // can end up detecting that first rather than STLport:
  21. # define BOOST_STDLIB_CONFIG "boost/config/stdlib/stlport.hpp"
  22. #else
  23. // If our std lib was not some version of STLport, and has not otherwise
  24. // been detected, then include <utility> as it is about
  25. // the smallest of the std lib headers that includes real C++ stuff.
  26. // Some std libs do not include their C++-related macros in <cstddef>
  27. // so this additional include makes sure we get those definitions.
  28. // Note: do not rely on this header being included since users can short-circuit this
  29. // #include if they know whose std lib they are using.
  30. #if !defined(__LIBCOMO__) && !defined(__STD_RWCOMPILER_H__) && !defined(_RWSTD_VER)\
  31. && !defined(_LIBCPP_VERSION) && !defined(__GLIBCPP__) && !defined(__GLIBCXX__)\
  32. && !defined(__STL_CONFIG_H) && !defined(__MSL_CPP__) && !defined(__IBMCPP__)\
  33. && !defined(MSIPL_COMPILE_H) && !defined(_YVALS) && !defined(_CPPLIB_VER)
  34. #include <utility>
  35. #endif
  36. #if defined(__LIBCOMO__)
  37. // Comeau STL:
  38. #define BOOST_STDLIB_CONFIG "boost/config/stdlib/libcomo.hpp"
  39. #elif defined(__STD_RWCOMPILER_H__) || defined(_RWSTD_VER)
  40. // Rogue Wave library:
  41. # define BOOST_STDLIB_CONFIG "boost/config/stdlib/roguewave.hpp"
  42. #elif defined(_LIBCPP_VERSION)
  43. // libc++
  44. # define BOOST_STDLIB_CONFIG "boost/config/stdlib/libcpp.hpp"
  45. #elif defined(__GLIBCPP__) || defined(__GLIBCXX__)
  46. // GNU libstdc++ 3
  47. # define BOOST_STDLIB_CONFIG "boost/config/stdlib/libstdcpp3.hpp"
  48. #elif defined(__STL_CONFIG_H)
  49. // generic SGI STL
  50. # define BOOST_STDLIB_CONFIG "boost/config/stdlib/sgi.hpp"
  51. #elif defined(__MSL_CPP__)
  52. // MSL standard lib:
  53. # define BOOST_STDLIB_CONFIG "boost/config/stdlib/msl.hpp"
  54. #elif defined(__IBMCPP__) && defined(__COMPILER_VER__) && defined(__MVS__)
  55. // IBM z/OS XL C/C++
  56. # define BOOST_STDLIB_CONFIG "boost/config/stdlib/xlcpp_zos.hpp"
  57. #elif defined(__IBMCPP__)
  58. // take the default VACPP std lib
  59. # define BOOST_STDLIB_CONFIG "boost/config/stdlib/vacpp.hpp"
  60. #elif defined(MSIPL_COMPILE_H)
  61. // Modena C++ standard library
  62. # define BOOST_STDLIB_CONFIG "boost/config/stdlib/modena.hpp"
  63. #elif (defined(_YVALS) && !defined(__IBMCPP__)) || defined(_CPPLIB_VER)
  64. // Dinkumware Library (this has to appear after any possible replacement libraries):
  65. # define BOOST_STDLIB_CONFIG "boost/config/stdlib/dinkumware.hpp"
  66. #elif defined (BOOST_ASSERT_CONFIG)
  67. // this must come last - generate an error if we don't
  68. // recognise the library:
  69. # error "Unknown standard library - please configure and report the results to boost.org"
  70. #endif
  71. #endif
  72. #if 0
  73. //
  74. // This section allows dependency scanners to find all the files we *might* include:
  75. //
  76. # include "boost/config/stdlib/stlport.hpp"
  77. # include "boost/config/stdlib/libcomo.hpp"
  78. # include "boost/config/stdlib/roguewave.hpp"
  79. # include "boost/config/stdlib/libcpp.hpp"
  80. # include "boost/config/stdlib/libstdcpp3.hpp"
  81. # include "boost/config/stdlib/sgi.hpp"
  82. # include "boost/config/stdlib/msl.hpp"
  83. # include "boost/config/stdlib/xlcpp_zos.hpp"
  84. # include "boost/config/stdlib/vacpp.hpp"
  85. # include "boost/config/stdlib/modena.hpp"
  86. # include "boost/config/stdlib/dinkumware.hpp"
  87. #endif