1 # ============================================================================
2 # http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_0x.html
3 # ============================================================================
7 # AX_CXX_COMPILE_STDCXX_0X
11 # Check for baseline language coverage in the compiler for the C++0x
14 # This macro is deprecated and has been superseded by the
15 # AX_CXX_COMPILE_STDCXX_11 macro which should be used instead.
19 # Copyright (c) 2008 Benjamin Kosnik <bkoz@redhat.com>
21 # Copying and distribution of this file, with or without modification, are
22 # permitted in any medium without royalty provided the copyright notice
23 # and this notice are preserved. This file is offered as-is, without any
28 AU_ALIAS([AC_CXX_COMPILE_STDCXX_0X], [AX_CXX_COMPILE_STDCXX_0X])
29 AC_DEFUN([AX_CXX_COMPILE_STDCXX_0X], [
30 AC_OBSOLETE([$0], [; use AX_CXX_COMPILE_STDCXX_11 instead])
31 AC_CACHE_CHECK(if g++ supports C++0x features without additional flags,
32 ax_cv_cxx_compile_cxx0x_native,
39 static_assert(sizeof(int) <= sizeof(T), "not big enough");
42 typedef check<check<bool>> right_angle_brackets;
47 typedef check<int> check_type;
49 check_type&& cr = static_cast<check_type&&>(c);],,
50 ax_cv_cxx_compile_cxx0x_native=yes, ax_cv_cxx_compile_cxx0x_native=no)
54 AC_CACHE_CHECK(if g++ supports C++0x features with -std=c++0x,
55 ax_cv_cxx_compile_cxx0x_cxx,
64 static_assert(sizeof(int) <= sizeof(T), "not big enough");
67 typedef check<check<bool>> right_angle_brackets;
72 typedef check<int> check_type;
74 check_type&& cr = static_cast<check_type&&>(c);],,
75 ax_cv_cxx_compile_cxx0x_cxx=yes, ax_cv_cxx_compile_cxx0x_cxx=no)
80 AC_CACHE_CHECK(if g++ supports C++0x features with -std=gnu++0x,
81 ax_cv_cxx_compile_cxx0x_gxx,
85 CXX="$CXX -std=gnu++0x"
90 static_assert(sizeof(int) <= sizeof(T), "not big enough");
93 typedef check<check<bool>> right_angle_brackets;
98 typedef check<int> check_type;
100 check_type&& cr = static_cast<check_type&&>(c);],,
101 ax_cv_cxx_compile_cxx0x_gxx=yes, ax_cv_cxx_compile_cxx0x_gxx=no)
106 if test "$ax_cv_cxx_compile_cxx0x_native" = yes ||
107 test "$ax_cv_cxx_compile_cxx0x_cxx" = yes ||
108 test "$ax_cv_cxx_compile_cxx0x_gxx" = yes; then
109 AC_DEFINE(HAVE_STDCXX_0X,,[Define if g++ supports C++0x features. ])