From 114e21eb1b9fbb738c0880aabf2629f991f5c8c6 Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Sat, 17 Dec 2016 19:37:44 +1300 Subject: [PATCH] Do not override user defined -std option --- configure.ac | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index b8232ee0de..6f6cf25a4c 100644 --- a/configure.ac +++ b/configure.ac @@ -82,16 +82,16 @@ if test "x$squid_host_os" = "solaris" -a "x$GCC" != "x" ; then AC_USE_SYSTEM_EXTENSIONS fi +# If the user did not specify a C++ version. +user_cxx=`echo "$PRESET_CXXFLAGS" | grep -o -E "\-std="` +if test "x$user_cxx" = "x"; then # Check for C++11 compiler support -if test "x$squid_host_os" != "xmingw" ; then + if ! test "x$squid_host_os" = "xmingw" -o "x$squid_host_os" = "xcygwin" -o "x$squid_cv_compiler" = "xclang"; then #BUG 3613: when clang -std=c++0x is used, it activates a "strict mode" # in the system libraries, which makes some c99 methods unavailable # (e.g. strtoll), yet configure detects them as avilable. - case "$CXX" in - *clang++*) ;; #do nothing - *) - AX_CXX_COMPILE_STDCXX_11([noext],[optional]) - esac + AX_CXX_COMPILE_STDCXX_11([noext],[optional]) + fi fi # test for programs -- 2.47.2