From 57abd19f9dec553a2f6ad133076a364ab1ec1c2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20=C3=81vila=20de=20Esp=C3=ADndola?= Date: Wed, 28 Sep 2011 17:49:18 -0400 Subject: [PATCH] Bug 689609 - Move the changes back in. Needs a clobber. r=re-revert. --- configure.in | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/configure.in b/configure.in index 49046aa572e..ba5b608975d 100644 --- a/configure.in +++ b/configure.in @@ -2824,24 +2824,28 @@ fi AC_SUBST(_MOZ_RTTI_FLAGS_ON) -dnl Check whether we can use gcc's c++0x mode +dnl Check whether we can use gcc's c++0x mode. We check for some basic +dnl features that we need. AC_LANG_CPLUSPLUS if test "$GNU_CXX"; then _SAVE_CXXFLAGS=$CXXFLAGS CXXFLAGS="$CXXFLAGS -std=gnu++0x" - if test -z "$_MOZ_USE_RTTI"; then - CXXFLAGS="$CXXFLAGS $_MOZ_RTTI_FLAGS" - AC_CACHE_CHECK(for gcc c++0x headers bug without rtti, - ac_cv_cxx0x_headers_bug, - [AC_TRY_COMPILE([#include ], [], - ac_cv_cxx0x_headers_bug="no", - ac_cv_cxx0x_headers_bug="yes")]) - CXXFLAGS="$_SAVE_CXXFLAGS" - if test "$ac_cv_cxx0x_headers_bug" = "no"; then - CXXFLAGS="$CXXFLAGS -std=gnu++0x" - fi + CXXFLAGS="$CXXFLAGS $_MOZ_RTTI_FLAGS" + AC_CACHE_CHECK(for c++0x support, + ac_cv_cxx0x_support, + [AC_TRY_COMPILE([#include + #include + void f(int&&);], [ + int a; + f(std::move(a)); + ], + ac_cv_cxx0x_support="yes", + ac_cv_cxx0x_support="no")]) + CXXFLAGS="$_SAVE_CXXFLAGS" + if test "$ac_cv_cxx0x_support" = "yes"; then + CXXFLAGS="$CXXFLAGS -std=gnu++0x" fi fi