From: Francesco Chemolli Date: Fri, 17 Apr 2015 07:15:52 +0000 (+0200) Subject: Detect and use libc++, needed for clang c++11 support X-Git-Tag: merge-candidate-3-v1~172 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0378fbca85276b16b435dfc86e90b8b6d9ece1b0;p=thirdparty%2Fsquid.git Detect and use libc++, needed for clang c++11 support --- diff --git a/configure.ac b/configure.ac index 076623db65..11c3bce52a 100644 --- a/configure.ac +++ b/configure.ac @@ -95,6 +95,17 @@ fi # Check for C++11 compiler support AX_CXX_COMPILE_STDCXX_11([noext],[optional]) +# check whether libc++ is needed (required for clang on freebsd and MacOS) +SQUID_CC_REQUIRE_ARGUMENT([squid_cv_stdlib_libcxx], [-stdlib=libc++],[[ +#include +]], [[ +std::cout << ""; return 0; +]]) +if test "x$squid_cv_stdlib_libcxx" = "xyes" ; then + CXX="$CXX -stdlib=libc++" + BUILDCXX="$BUILDCXX -stdlib=libc++" +fi + # test for programs AC_PROG_RANLIB AC_PROG_CPP