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