919.2.16
by Monty Taylor
Added check for setting -std=gnu++0x if available. |
1 |
AC_DEFUN([AC_CXX_CHECK_STANDARD],[ |
2 |
AC_CACHE_CHECK([what C++ standard the compiler supports], |
|
3 |
[ac_cv_cxx_standard],[ |
|
4 |
AC_LANG_PUSH(C++)
|
|
5 |
save_CXXFLAGS="${CXXFLAGS}"
|
|
919.2.20
by Monty Taylor
Actually add the -std=gnu++0x flag |
6 |
CXXFLAGS="-std=gnu++0x ${CXXFLAGS}"
|
919.2.16
by Monty Taylor
Added check for setting -std=gnu++0x if available. |
7 |
AC_COMPILE_IFELSE(
|
8 |
[AC_LANG_PROGRAM(
|
|
9 |
[[
|
|
10 |
#include <string>
|
|
919.2.19
by Monty Taylor
Added check for shared_ptr in advance of actually thinking about using it. I think this should cover all platforms we care about... but let's doublecheck. |
11 |
|
12 |
using namespace std;
|
|
919.2.16
by Monty Taylor
Added check for setting -std=gnu++0x if available. |
13 |
]],[[ |
919.2.19
by Monty Taylor
Added check for shared_ptr in advance of actually thinking about using it. I think this should cover all platforms we care about... but let's doublecheck. |
14 |
string foo("test string");
|
919.2.16
by Monty Taylor
Added check for setting -std=gnu++0x if available. |
15 |
]])], |
16 |
[ac_cv_cxx_standard="gnu++0x"], |
|
17 |
[ac_cv_cxx_standard="gnu++98"]) |
|
18 |
CXXFLAGS="${save_CXXFLAGS}" |
|
19 |
AC_LANG_POP() |
|
20 |
]) |
|
919.2.19
by Monty Taylor
Added check for shared_ptr in advance of actually thinking about using it. I think this should cover all platforms we care about... but let's doublecheck. |
21 |
CXXFLAGS="-std=${ac_cv_cxx_standard} ${CXXFLAGS}" |
919.2.16
by Monty Taylor
Added check for setting -std=gnu++0x if available. |
22 |
]) |