From: Amos Jeffries Date: Sat, 21 May 2016 13:00:58 +0000 (+1200) Subject: Do not override user defined -std option X-Git-Tag: SQUID_3_5_20~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2c649f2012a20259bfdcdc33ca38be51e6209eaf;p=thirdparty%2Fsquid.git Do not override user defined -std option --- diff --git a/configure.ac b/configure.ac index c80013bad7..1e64e0ab48 100644 --- a/configure.ac +++ b/configure.ac @@ -95,6 +95,9 @@ fi # Guess the compiler type (sets squid_cv_compiler) SQUID_CC_GUESS_VARIANT +# 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 # # BUG 3613: when clang -std=c++0x is used, it activates a "strict mode" @@ -103,8 +106,9 @@ SQUID_CC_GUESS_VARIANT # # Similar POSIX issues on MinGW 32-bit and Cygwin # -if ! test "x$squid_host_os" = "xmingw" -o "x$squid_host_os" = "xcygwin" -o "x$squid_cv_compiler" = "xclang"; then - AX_CXX_COMPILE_STDCXX_11([noext],[optional]) + if ! test "x$squid_host_os" = "xmingw" -o "x$squid_host_os" = "xcygwin" -o "x$squid_cv_compiler" = "xclang"; then + AX_CXX_COMPILE_STDCXX_11([noext],[optional]) + fi fi # test for programs