From 2c649f2012a20259bfdcdc33ca38be51e6209eaf Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Sun, 22 May 2016 01:00:58 +1200 Subject: [PATCH] Do not override user defined -std option --- configure.ac | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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 -- 2.47.2