|
@@ -661,6 +661,7 @@ GCC3DEB
|
|
|
GCC3_CXXFLAGS
|
|
GCC3_CXXFLAGS
|
|
|
GCC3_CFLAGS
|
|
GCC3_CFLAGS
|
|
|
CCDEPMODE
|
|
CCDEPMODE
|
|
|
|
|
+HAVE_CXX11
|
|
|
CC
|
|
CC
|
|
|
OBJEXT
|
|
OBJEXT
|
|
|
EXEEXT
|
|
EXEEXT
|
|
@@ -3168,6 +3169,249 @@ $as_echo "$egg_cv_var_ccpipe" >&6; }
|
|
|
fi
|
|
fi
|
|
|
fi
|
|
fi
|
|
|
|
|
|
|
|
|
|
+ ax_cxx_compile_cxx11_required=false
|
|
|
|
|
+ ac_ext=cpp
|
|
|
|
|
+ac_cpp='$CXXCPP $CPPFLAGS'
|
|
|
|
|
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
|
|
|
|
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
|
|
|
|
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
|
|
|
|
|
+ ac_success=no
|
|
|
|
|
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
|
|
|
|
|
+$as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
|
|
|
|
|
+if ${ax_cv_cxx_compile_cxx11+:} false; then :
|
|
|
|
|
+ $as_echo_n "(cached) " >&6
|
|
|
|
|
+else
|
|
|
|
|
+ cat build/confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
|
|
|
+/* end build/confdefs.h. */
|
|
|
|
|
+
|
|
|
|
|
+ template <typename T>
|
|
|
|
|
+ struct check
|
|
|
|
|
+ {
|
|
|
|
|
+ static_assert(sizeof(int) <= sizeof(T), "not big enough");
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ struct Base {
|
|
|
|
|
+ virtual void f() {}
|
|
|
|
|
+ };
|
|
|
|
|
+ struct Child : public Base {
|
|
|
|
|
+ virtual void f() override {}
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ typedef check<check<bool>> right_angle_brackets;
|
|
|
|
|
+
|
|
|
|
|
+ int a;
|
|
|
|
|
+ decltype(a) b;
|
|
|
|
|
+
|
|
|
|
|
+ typedef check<int> check_type;
|
|
|
|
|
+ check_type c;
|
|
|
|
|
+ check_type&& cr = static_cast<check_type&&>(c);
|
|
|
|
|
+
|
|
|
|
|
+ auto d = a;
|
|
|
|
|
+ auto l = [](){};
|
|
|
|
|
+ // Prevent Clang error: unused variable 'l' [-Werror,-Wunused-variable]
|
|
|
|
|
+ struct use_l { use_l() { l(); } };
|
|
|
|
|
+
|
|
|
|
|
+ // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
|
|
|
|
|
+ // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function because of this
|
|
|
|
|
+ namespace test_template_alias_sfinae {
|
|
|
|
|
+ struct foo {};
|
|
|
|
|
+
|
|
|
|
|
+ template<typename T>
|
|
|
|
|
+ using member = typename T::member_type;
|
|
|
|
|
+
|
|
|
|
|
+ template<typename T>
|
|
|
|
|
+ void func(...) {}
|
|
|
|
|
+
|
|
|
|
|
+ template<typename T>
|
|
|
|
|
+ void func(member<T>*) {}
|
|
|
|
|
+
|
|
|
|
|
+ void test();
|
|
|
|
|
+
|
|
|
|
|
+ void test() {
|
|
|
|
|
+ func<foo>(0);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+_ACEOF
|
|
|
|
|
+if ac_fn_cxx_try_compile "$LINENO"; then :
|
|
|
|
|
+ ax_cv_cxx_compile_cxx11=yes
|
|
|
|
|
+else
|
|
|
|
|
+ ax_cv_cxx_compile_cxx11=no
|
|
|
|
|
+fi
|
|
|
|
|
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
|
|
|
|
+fi
|
|
|
|
|
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
|
|
|
|
|
+$as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
|
|
|
|
|
+ if test x$ax_cv_cxx_compile_cxx11 = xyes; then
|
|
|
|
|
+ ac_success=yes
|
|
|
|
|
+ fi
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ if test x$ac_success = xno; then
|
|
|
|
|
+ for switch in -std=c++11 -std=c++0x; do
|
|
|
|
|
+ cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
|
|
|
|
|
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
|
|
|
|
|
+$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
|
|
|
|
|
+if eval \${$cachevar+:} false; then :
|
|
|
|
|
+ $as_echo_n "(cached) " >&6
|
|
|
|
|
+else
|
|
|
|
|
+ ac_save_CXXFLAGS="$CXXFLAGS"
|
|
|
|
|
+ CXXFLAGS="$CXXFLAGS $switch"
|
|
|
|
|
+ cat build/confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
|
|
|
+/* end build/confdefs.h. */
|
|
|
|
|
+
|
|
|
|
|
+ template <typename T>
|
|
|
|
|
+ struct check
|
|
|
|
|
+ {
|
|
|
|
|
+ static_assert(sizeof(int) <= sizeof(T), "not big enough");
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ struct Base {
|
|
|
|
|
+ virtual void f() {}
|
|
|
|
|
+ };
|
|
|
|
|
+ struct Child : public Base {
|
|
|
|
|
+ virtual void f() override {}
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ typedef check<check<bool>> right_angle_brackets;
|
|
|
|
|
+
|
|
|
|
|
+ int a;
|
|
|
|
|
+ decltype(a) b;
|
|
|
|
|
+
|
|
|
|
|
+ typedef check<int> check_type;
|
|
|
|
|
+ check_type c;
|
|
|
|
|
+ check_type&& cr = static_cast<check_type&&>(c);
|
|
|
|
|
+
|
|
|
|
|
+ auto d = a;
|
|
|
|
|
+ auto l = [](){};
|
|
|
|
|
+ // Prevent Clang error: unused variable 'l' [-Werror,-Wunused-variable]
|
|
|
|
|
+ struct use_l { use_l() { l(); } };
|
|
|
|
|
+
|
|
|
|
|
+ // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
|
|
|
|
|
+ // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function because of this
|
|
|
|
|
+ namespace test_template_alias_sfinae {
|
|
|
|
|
+ struct foo {};
|
|
|
|
|
+
|
|
|
|
|
+ template<typename T>
|
|
|
|
|
+ using member = typename T::member_type;
|
|
|
|
|
+
|
|
|
|
|
+ template<typename T>
|
|
|
|
|
+ void func(...) {}
|
|
|
|
|
+
|
|
|
|
|
+ template<typename T>
|
|
|
|
|
+ void func(member<T>*) {}
|
|
|
|
|
+
|
|
|
|
|
+ void test();
|
|
|
|
|
+
|
|
|
|
|
+ void test() {
|
|
|
|
|
+ func<foo>(0);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+_ACEOF
|
|
|
|
|
+if ac_fn_cxx_try_compile "$LINENO"; then :
|
|
|
|
|
+ eval $cachevar=yes
|
|
|
|
|
+else
|
|
|
|
|
+ eval $cachevar=no
|
|
|
|
|
+fi
|
|
|
|
|
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
|
|
|
|
+ CXXFLAGS="$ac_save_CXXFLAGS"
|
|
|
|
|
+fi
|
|
|
|
|
+eval ac_res=\$$cachevar
|
|
|
|
|
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
|
|
|
|
|
+$as_echo "$ac_res" >&6; }
|
|
|
|
|
+ if eval test x\$$cachevar = xyes; then
|
|
|
|
|
+ CXXFLAGS="$CXXFLAGS $switch"
|
|
|
|
|
+ ac_success=yes
|
|
|
|
|
+ break
|
|
|
|
|
+ fi
|
|
|
|
|
+ done
|
|
|
|
|
+ fi
|
|
|
|
|
+ ac_ext=cpp
|
|
|
|
|
+ac_cpp='$CXXCPP $CPPFLAGS'
|
|
|
|
|
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
|
|
|
|
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
|
|
|
|
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
|
|
|
|
|
+
|
|
|
|
|
+ if test x$ax_cxx_compile_cxx11_required = xtrue; then
|
|
|
|
|
+ if test x$ac_success = xno; then
|
|
|
|
|
+ as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5
|
|
|
|
|
+ fi
|
|
|
|
|
+ else
|
|
|
|
|
+ if test x$ac_success = xno; then
|
|
|
|
|
+ HAVE_CXX11=0
|
|
|
|
|
+ { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
|
|
|
|
|
+$as_echo "$as_me: No compiler with C++11 support was found" >&6;}
|
|
|
|
|
+ else
|
|
|
|
|
+ HAVE_CXX11=1
|
|
|
|
|
+
|
|
|
|
|
+$as_echo "#define HAVE_CXX11 1" >>build/confdefs.h
|
|
|
|
|
+
|
|
|
|
|
+ fi
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ fi
|
|
|
|
|
+
|
|
|
|
|
+if [ "${HAVE_CXX11}" -eq 0 ]; then
|
|
|
|
|
+
|
|
|
|
|
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler understands -std=c++0x" >&5
|
|
|
|
|
+$as_echo_n "checking whether the compiler understands -std=c++0x... " >&6; }
|
|
|
|
|
+if ${ax_cv_prog_cc_cxx0x+:} false; then :
|
|
|
|
|
+ $as_echo_n "(cached) " >&6
|
|
|
|
|
+else
|
|
|
|
|
+
|
|
|
|
|
+ ac_ext=cpp
|
|
|
|
|
+ac_cpp='$CXXCPP $CPPFLAGS'
|
|
|
|
|
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
|
|
|
|
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
|
|
|
|
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
|
|
|
|
|
+
|
|
|
|
|
+ ac_saved_flags="$CXXFLAGS"
|
|
|
|
|
+ CXXFLAGS="-Werror -std=c++0x"
|
|
|
|
|
+ cat build/confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
|
|
|
+/* end build/confdefs.h. */
|
|
|
|
|
+
|
|
|
|
|
+int
|
|
|
|
|
+main ()
|
|
|
|
|
+{
|
|
|
|
|
+
|
|
|
|
|
+ ;
|
|
|
|
|
+ return 0;
|
|
|
|
|
+}
|
|
|
|
|
+_ACEOF
|
|
|
|
|
+if ac_fn_cxx_try_compile "$LINENO"; then :
|
|
|
|
|
+ ax_cv_prog_cc_cxx0x="yes"
|
|
|
|
|
+else
|
|
|
|
|
+ ax_cv_prog_cc_cxx0x="no"
|
|
|
|
|
+fi
|
|
|
|
|
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
|
|
|
|
+ CXXFLAGS="$ac_saved_flags"
|
|
|
|
|
+ ac_ext=cpp
|
|
|
|
|
+ac_cpp='$CXXCPP $CPPFLAGS'
|
|
|
|
|
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
|
|
|
|
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
|
|
|
|
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+fi
|
|
|
|
|
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_prog_cc_cxx0x" >&5
|
|
|
|
|
+$as_echo "$ax_cv_prog_cc_cxx0x" >&6; }
|
|
|
|
|
+
|
|
|
|
|
+ if [ "$ax_cv_prog_cc_cxx0x" = "yes" ]; then
|
|
|
|
|
+ CXXFLAGS="$CXXFLAGS -std=c++0x"
|
|
|
|
|
+ elif [ -n "" ]; then
|
|
|
|
|
+ cat << 'EOF' >&2
|
|
|
|
|
+configure: error:
|
|
|
|
|
+
|
|
|
|
|
+ Your OS or C++ compiler does not support -std=c++0x.
|
|
|
|
|
+ This compile flag is required.
|
|
|
|
|
+
|
|
|
|
|
+EOF
|
|
|
|
|
+ exit 1
|
|
|
|
|
+ fi
|
|
|
|
|
+
|
|
|
|
|
+fi
|
|
|
|
|
|
|
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler understands -fcolor-diagnostics" >&5
|
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler understands -fcolor-diagnostics" >&5
|
|
|
$as_echo_n "checking whether the compiler understands -fcolor-diagnostics... " >&6; }
|
|
$as_echo_n "checking whether the compiler understands -fcolor-diagnostics... " >&6; }
|