From: Francesco Chemolli Date: Fri, 24 Aug 2012 10:54:03 +0000 (+0200) Subject: Bug 3613: relax standard-compliance strctness on clang to enable build X-Git-Tag: sourceformat-review-1~64^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1e6c52769af33c3023bfb2555fa199be6e2a87fd;p=thirdparty%2Fsquid.git Bug 3613: relax standard-compliance strctness on clang to enable build When clang is invoked with the -std=c++0x option, it won't make available some system functions defined in c99. For some reason configure fails to detect this, and so the built-in implementation is not invoked. This change prevents enabling the -std=c++0x option for clang. --- diff --git a/configure.ac b/configure.ac index 175eda783a..033c3776e2 100644 --- a/configure.ac +++ b/configure.ac @@ -67,7 +67,13 @@ fi AX_CXX_COMPILE_STDCXX_0X if test "x$ax_cv_cxx_compile_cxx0x_cxx" = "xyes" -a \ "x$squid_host_os" != "xmingw" ; then - CXXFLAGS="$CXXFLAGS -std=c++0x" + #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 + *) CXXFLAGS="$CXXFLAGS -std=c++0x" ;; + esac fi # test for programs