From 7e97b671be6016258e17968190683e86b713f77a Mon Sep 17 00:00:00 2001 From: Christian Engwer <christi@dune-project.org> Date: Wed, 24 Sep 2008 20:24:26 +0000 Subject: [PATCH] fix GXX0X .--std=c++0x should not be added to the CXXFLAGS, but CXX should be updaten [[Imported from SVN: r5288]] --- m4/static_assert.m4 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/m4/static_assert.m4 b/m4/static_assert.m4 index edf548469..b7899b8df 100644 --- a/m4/static_assert.m4 +++ b/m4/static_assert.m4 @@ -5,17 +5,17 @@ AC_DEFUN([GXX0X],[ [try to enabel c++0x feature for g++ [[default=yes]]]), [gxx0xcheck=$enable], [gxx0xcheck=yes]) - AC_LANG_PUSH([C++]) if test "x$GXX" = xyes && test "x$gxx0xcheck" = xyes; then AC_MSG_CHECKING([whether g++ accepts -std=c++0x]) - ac_save_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS -std=c++0x" + ac_save_CXX="$CXX" + CXX="$CXX -std=c++0x" + AC_LANG_PUSH([C++]) AC_TRY_COMPILE([],[],[ AC_MSG_RESULT(yes)], [ - CXXFLAGS="$ac_save_CXXFLAGS" + CXX="$ac_save_CXX" AC_MSG_RESULT(no)]) + AC_LANG_POP fi - AC_LANG_POP ]) AC_DEFUN([STATIC_ASSERT_CHECK],[ -- GitLab