Chris@16
|
1 // (C) Copyright John Maddock 2001.
|
Chris@16
|
2 // (C) Copyright Jens Maurer 2001.
|
Chris@16
|
3 // Use, modification and distribution are subject to the
|
Chris@16
|
4 // Boost Software License, Version 1.0. (See accompanying file
|
Chris@16
|
5 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
Chris@16
|
6
|
Chris@16
|
7 // See http://www.boost.org for most recent version.
|
Chris@16
|
8
|
Chris@16
|
9 // config for libstdc++ v3
|
Chris@16
|
10 // not much to go in here:
|
Chris@16
|
11
|
Chris@16
|
12 #define BOOST_GNU_STDLIB 1
|
Chris@16
|
13
|
Chris@16
|
14 #ifdef __GLIBCXX__
|
Chris@16
|
15 #define BOOST_STDLIB "GNU libstdc++ version " BOOST_STRINGIZE(__GLIBCXX__)
|
Chris@16
|
16 #else
|
Chris@16
|
17 #define BOOST_STDLIB "GNU libstdc++ version " BOOST_STRINGIZE(__GLIBCPP__)
|
Chris@16
|
18 #endif
|
Chris@16
|
19
|
Chris@16
|
20 #if !defined(_GLIBCPP_USE_WCHAR_T) && !defined(_GLIBCXX_USE_WCHAR_T)
|
Chris@16
|
21 # define BOOST_NO_CWCHAR
|
Chris@16
|
22 # define BOOST_NO_CWCTYPE
|
Chris@16
|
23 # define BOOST_NO_STD_WSTRING
|
Chris@16
|
24 # define BOOST_NO_STD_WSTREAMBUF
|
Chris@16
|
25 #endif
|
Chris@16
|
26
|
Chris@16
|
27 #if defined(__osf__) && !defined(_REENTRANT) \
|
Chris@16
|
28 && ( defined(_GLIBCXX_HAVE_GTHR_DEFAULT) || defined(_GLIBCPP_HAVE_GTHR_DEFAULT) )
|
Chris@16
|
29 // GCC 3 on Tru64 forces the definition of _REENTRANT when any std lib header
|
Chris@16
|
30 // file is included, therefore for consistency we define it here as well.
|
Chris@16
|
31 # define _REENTRANT
|
Chris@16
|
32 #endif
|
Chris@16
|
33
|
Chris@16
|
34 #ifdef __GLIBCXX__ // gcc 3.4 and greater:
|
Chris@16
|
35 # if defined(_GLIBCXX_HAVE_GTHR_DEFAULT) \
|
Chris@16
|
36 || defined(_GLIBCXX__PTHREADS) \
|
Chris@16
|
37 || defined(_GLIBCXX_HAS_GTHREADS) \
|
Chris@16
|
38 || defined(_WIN32) \
|
Chris@16
|
39 || defined(_AIX)
|
Chris@16
|
40 //
|
Chris@16
|
41 // If the std lib has thread support turned on, then turn it on in Boost
|
Chris@16
|
42 // as well. We do this because some gcc-3.4 std lib headers define _REENTANT
|
Chris@16
|
43 // while others do not...
|
Chris@16
|
44 //
|
Chris@16
|
45 # define BOOST_HAS_THREADS
|
Chris@16
|
46 # else
|
Chris@16
|
47 # define BOOST_DISABLE_THREADS
|
Chris@16
|
48 # endif
|
Chris@16
|
49 #elif defined(__GLIBCPP__) \
|
Chris@16
|
50 && !defined(_GLIBCPP_HAVE_GTHR_DEFAULT) \
|
Chris@16
|
51 && !defined(_GLIBCPP__PTHREADS)
|
Chris@16
|
52 // disable thread support if the std lib was built single threaded:
|
Chris@16
|
53 # define BOOST_DISABLE_THREADS
|
Chris@16
|
54 #endif
|
Chris@16
|
55
|
Chris@16
|
56 #if (defined(linux) || defined(__linux) || defined(__linux__)) && defined(__arm__) && defined(_GLIBCPP_HAVE_GTHR_DEFAULT)
|
Chris@16
|
57 // linux on arm apparently doesn't define _REENTRANT
|
Chris@16
|
58 // so just turn on threading support whenever the std lib is thread safe:
|
Chris@16
|
59 # define BOOST_HAS_THREADS
|
Chris@16
|
60 #endif
|
Chris@16
|
61
|
Chris@16
|
62 #if !defined(_GLIBCPP_USE_LONG_LONG) \
|
Chris@16
|
63 && !defined(_GLIBCXX_USE_LONG_LONG)\
|
Chris@16
|
64 && defined(BOOST_HAS_LONG_LONG)
|
Chris@16
|
65 // May have been set by compiler/*.hpp, but "long long" without library
|
Chris@16
|
66 // support is useless.
|
Chris@16
|
67 # undef BOOST_HAS_LONG_LONG
|
Chris@16
|
68 #endif
|
Chris@16
|
69
|
Chris@16
|
70 // Apple doesn't seem to reliably defined a *unix* macro
|
Chris@16
|
71 #if !defined(CYGWIN) && ( defined(__unix__) \
|
Chris@16
|
72 || defined(__unix) \
|
Chris@16
|
73 || defined(unix) \
|
Chris@16
|
74 || defined(__APPLE__) \
|
Chris@16
|
75 || defined(__APPLE) \
|
Chris@16
|
76 || defined(APPLE))
|
Chris@16
|
77 # include <unistd.h>
|
Chris@16
|
78 #endif
|
Chris@16
|
79
|
Chris@16
|
80 #if defined(__GLIBCXX__) || (defined(__GLIBCPP__) && __GLIBCPP__>=20020514) // GCC >= 3.1.0
|
Chris@16
|
81 # define BOOST_STD_EXTENSION_NAMESPACE __gnu_cxx
|
Chris@16
|
82 # define BOOST_HAS_SLIST
|
Chris@16
|
83 # define BOOST_HAS_HASH
|
Chris@16
|
84 # define BOOST_SLIST_HEADER <ext/slist>
|
Chris@16
|
85 # if !defined(__GNUC__) || __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 3)
|
Chris@16
|
86 # define BOOST_HASH_SET_HEADER <ext/hash_set>
|
Chris@16
|
87 # define BOOST_HASH_MAP_HEADER <ext/hash_map>
|
Chris@16
|
88 # else
|
Chris@16
|
89 # define BOOST_HASH_SET_HEADER <backward/hash_set>
|
Chris@16
|
90 # define BOOST_HASH_MAP_HEADER <backward/hash_map>
|
Chris@16
|
91 # endif
|
Chris@16
|
92 #endif
|
Chris@16
|
93
|
Chris@16
|
94 // stdlibc++ C++0x support is detected via __GNUC__, __GNUC_MINOR__, and possibly
|
Chris@16
|
95 // __GNUC_PATCHLEVEL__ at the suggestion of Jonathan Wakely, one of the stdlibc++
|
Chris@16
|
96 // developers. He also commented:
|
Chris@16
|
97 //
|
Chris@16
|
98 // "I'm not sure how useful __GLIBCXX__ is for your purposes, for instance in
|
Chris@16
|
99 // GCC 4.2.4 it is set to 20080519 but in GCC 4.3.0 it is set to 20080305.
|
Chris@16
|
100 // Although 4.3.0 was released earlier than 4.2.4, it has better C++0x support
|
Chris@16
|
101 // than any release in the 4.2 series."
|
Chris@16
|
102 //
|
Chris@16
|
103 // Another resource for understanding stdlibc++ features is:
|
Chris@16
|
104 // http://gcc.gnu.org/onlinedocs/libstdc++/manual/status.html#manual.intro.status.standard.200x
|
Chris@16
|
105
|
Chris@16
|
106 // C++0x headers in GCC 4.3.0 and later
|
Chris@16
|
107 //
|
Chris@16
|
108 #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 3) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
|
Chris@16
|
109 # define BOOST_NO_CXX11_HDR_ARRAY
|
Chris@16
|
110 # define BOOST_NO_CXX11_HDR_REGEX
|
Chris@16
|
111 # define BOOST_NO_CXX11_HDR_TUPLE
|
Chris@16
|
112 # define BOOST_NO_CXX11_HDR_UNORDERED_MAP
|
Chris@16
|
113 # define BOOST_NO_CXX11_HDR_UNORDERED_SET
|
Chris@16
|
114 # define BOOST_NO_CXX11_HDR_FUNCTIONAL
|
Chris@16
|
115 #endif
|
Chris@16
|
116
|
Chris@16
|
117 // C++0x headers in GCC 4.4.0 and later
|
Chris@16
|
118 //
|
Chris@16
|
119 #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
|
Chris@16
|
120 # define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
|
Chris@16
|
121 # define BOOST_NO_CXX11_HDR_FORWARD_LIST
|
Chris@16
|
122 # define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
Chris@16
|
123 # define BOOST_NO_CXX11_HDR_MUTEX
|
Chris@16
|
124 # define BOOST_NO_CXX11_HDR_RATIO
|
Chris@16
|
125 # define BOOST_NO_CXX11_HDR_SYSTEM_ERROR
|
Chris@16
|
126 # define BOOST_NO_CXX11_SMART_PTR
|
Chris@16
|
127 #else
|
Chris@16
|
128 # define BOOST_HAS_TR1_COMPLEX_INVERSE_TRIG
|
Chris@16
|
129 # define BOOST_HAS_TR1_COMPLEX_OVERLOADS
|
Chris@16
|
130 #endif
|
Chris@16
|
131
|
Chris@16
|
132 #if (!defined(_GLIBCXX_HAS_GTHREADS) || !defined(_GLIBCXX_USE_C99_STDINT_TR1)) && (!defined(BOOST_NO_CXX11_HDR_CONDITION_VARIABLE) || !defined(BOOST_NO_CXX11_HDR_MUTEX))
|
Chris@16
|
133 # define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
|
Chris@16
|
134 # define BOOST_NO_CXX11_HDR_MUTEX
|
Chris@16
|
135 #endif
|
Chris@16
|
136
|
Chris@16
|
137 // C++0x features in GCC 4.5.0 and later
|
Chris@16
|
138 //
|
Chris@16
|
139 #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
|
Chris@16
|
140 # define BOOST_NO_CXX11_NUMERIC_LIMITS
|
Chris@16
|
141 # define BOOST_NO_CXX11_HDR_FUTURE
|
Chris@16
|
142 # define BOOST_NO_CXX11_HDR_RANDOM
|
Chris@16
|
143 #endif
|
Chris@16
|
144
|
Chris@16
|
145 // C++0x features in GCC 4.6.0 and later
|
Chris@16
|
146 //
|
Chris@16
|
147 #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
|
Chris@16
|
148 # define BOOST_NO_CXX11_HDR_TYPEINDEX
|
Chris@16
|
149 #endif
|
Chris@16
|
150
|
Chris@16
|
151 // C++0x features in GCC 4.7.0 and later
|
Chris@16
|
152 //
|
Chris@16
|
153 #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 7) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
|
Chris@16
|
154 // Note that although <chrono> existed prior to 4.7, "stead_clock" is spelled "monotonic_clock"
|
Chris@16
|
155 // so 4.7.0 is the first truely conforming one.
|
Chris@16
|
156 # define BOOST_NO_CXX11_HDR_CHRONO
|
Chris@16
|
157 # define BOOST_NO_CXX11_ALLOCATOR
|
Chris@16
|
158 #endif
|
Chris@16
|
159 // C++0x headers not yet (fully!) implemented
|
Chris@16
|
160 //
|
Chris@16
|
161 # define BOOST_NO_CXX11_HDR_THREAD
|
Chris@16
|
162 # define BOOST_NO_CXX11_HDR_TYPE_TRAITS
|
Chris@16
|
163 # define BOOST_NO_CXX11_HDR_CODECVT
|
Chris@16
|
164 # define BOOST_NO_CXX11_ATOMIC_SMART_PTR
|
Chris@16
|
165
|
Chris@16
|
166 // --- end ---
|