1 # Check if $CXX does or can be made to support C++11 by adding switches.
2 # If $CXX explicitly selects a language standard, then
3 # refrain from overriding this choice.
4 AC_DEFUN([AX_CXX_COMPILE_STDCXX_11_NO_OVERRIDE], [dnl
6 echo $CXX | $GREP -e "-std=" > /dev/null 2> /dev/null
8 _AX_CXX_COMPILE_STDCXX_11_DEFAULT
10 AX_CXX_COMPILE_STDCXX_11([noext], [optional])
14 # Check if $CXX supports C++11 by default (without adding switches).
15 # This is a trimmed down version of AX_CXX_COMPILE_STDCXX_11
16 # that reuses its _AX_CXX_COMPILE_STDCXX_testbody_11.
17 AC_DEFUN([_AX_CXX_COMPILE_STDCXX_11_DEFAULT], [dnl
18 AC_LANG_PUSH([C++])dnl
20 AC_CACHE_CHECK(whether $CXX supports C++11 features by default,
21 ax_cv_cxx_compile_cxx11,
22 [AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_11])],
23 [ax_cv_cxx_compile_cxx11=yes],
24 [ax_cv_cxx_compile_cxx11=no])])
25 if test x$ax_cv_cxx_compile_cxx11 = xyes; then
29 if test x$ac_success = xno; then
33 AC_DEFINE(HAVE_CXX11,1,
34 [define if the compiler supports basic C++11 syntax])