Cpp: Set -std=c++11 also if CXXCPP is already set

* m4/ax_cxx_compile_stdxx.m4 (AX_CXX_COMPILE_STDCXX): Set CXXCPP if
neccessary.

--
This fixes the build with scan-build where CXXCPP is already set but
does not include stdc++11. While this deviates from the
autotools-archive version of the script it does not make sense
to me first to check if stdc++11 needs to be set and then not
set it.
This commit is contained in:
Andre Heinecke 2016-05-24 14:10:16 +02:00
parent 09803c4a81
commit b107fc8a92

View File

@ -82,9 +82,7 @@ AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl
CXX="$ac_save_CXX"]) CXX="$ac_save_CXX"])
if eval test x\$$cachevar = xyes; then if eval test x\$$cachevar = xyes; then
CXX="$CXX $switch" CXX="$CXX $switch"
if test -n "$CXXCPP" ; then
CXXCPP="$CXXCPP $switch" CXXCPP="$CXXCPP $switch"
fi
ac_success=yes ac_success=yes
break break
fi fi
@ -108,9 +106,7 @@ AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl
CXX="$ac_save_CXX"]) CXX="$ac_save_CXX"])
if eval test x\$$cachevar = xyes; then if eval test x\$$cachevar = xyes; then
CXX="$CXX $switch" CXX="$CXX $switch"
if test -n "$CXXCPP" ; then
CXXCPP="$CXXCPP $switch" CXXCPP="$CXXCPP $switch"
fi
ac_success=yes ac_success=yes
break break
fi fi