diff options
author | Paul Baltescu <pauldb89@gmail.com> | 2013-05-23 20:42:26 +0100 |
---|---|---|
committer | Paul Baltescu <pauldb89@gmail.com> | 2013-05-23 20:42:26 +0100 |
commit | 4ab38fecf0f49c5132a5d5ea748d03e0acfa36c2 (patch) | |
tree | 8e250d99f4a381eae865a15b6eb43b0f77b68479 /m4 | |
parent | 35d2c095ba6a912272f2fcc8322ece4213ada82b (diff) | |
parent | 1d96c9c9c521edfca1d10e4d8c5064f79fda3ec5 (diff) |
Merge branch 'master' of github.com:pauldb89/cdec
Diffstat (limited to 'm4')
-rw-r--r-- | m4/ax_cxx_compile_stdcxx_11.m4 | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/m4/ax_cxx_compile_stdcxx_11.m4 b/m4/ax_cxx_compile_stdcxx_11.m4 index 1bc31128..f6cf4a15 100644 --- a/m4/ax_cxx_compile_stdcxx_11.m4 +++ b/m4/ax_cxx_compile_stdcxx_11.m4 @@ -74,6 +74,7 @@ AC_DEFUN([AX_CXX_COMPILE_STDCXX_11], [dnl ac_success=yes fi + restore_it="$CXXFLAGS" m4_if([$1], [noext], [], [dnl if test x$ac_success = xno; then for switch in -std=gnu++11 -std=gnu++0x; do @@ -87,7 +88,8 @@ AC_DEFUN([AX_CXX_COMPILE_STDCXX_11], [dnl [eval $cachevar=no]) CXXFLAGS="$ac_save_CXXFLAGS"]) if eval test x\$$cachevar = xyes; then - CXXFLAGS="$CXXFLAGS $switch" + CXXFLAGS="$CXXFLAGS" + c11switch="$switch" ac_success=yes break fi @@ -107,12 +109,15 @@ AC_DEFUN([AX_CXX_COMPILE_STDCXX_11], [dnl [eval $cachevar=no]) CXXFLAGS="$ac_save_CXXFLAGS"]) if eval test x\$$cachevar = xyes; then - CXXFLAGS="$CXXFLAGS $switch" + CXXFLAGS="$CXXFLAGS" + c11switch="$switch" ac_success=yes break fi done fi]) + CXXFLAGS="$restore_it" + AC_SUBST([CXX11_SWITCH], ["$c11switch"]) AC_LANG_POP([C++]) if test x$ax_cxx_compile_cxx11_required = xtrue; then if test x$ac_success = xno; then |