From b957190edfc40e1fea99e4781c95aea0bd6fce5e Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Thu, 12 Nov 2015 18:19:11 +0100 Subject: [PATCH] Work around clang-cl -FIIntrin.h workaround Change-Id: I71e0de9e13718c1a6cd11339aba740effa2e0476 --- configure.ac | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 5737d68d3dac..58a6ad769a46 100644 --- a/configure.ac +++ b/configure.ac @@ -3684,7 +3684,19 @@ if test "$_os" = "WINNT"; then dnl localized AC_MSG_CHECKING([the dependency generation prefix (cl.exe -showIncludes)]) echo "#include " > conftest.c - SHOWINCLUDES_PREFIX=`$CC $CFLAGS -c -showIncludes conftest.c 2>/dev/null | \ + dnl Filter out -FIIntrin.h when CC points at clang-cl.exe and needs to + dnl explicitly state that argument: + my_CC= + for i in $CC; do + case $i in + -FIIntrin.h) + ;; + *) + my_CC="$my_CC $i" + ;; + esac + done + SHOWINCLUDES_PREFIX=`$my_CC $CFLAGS -c -showIncludes conftest.c 2>/dev/null | \ grep 'stdlib\.h' | head -n1 | sed 's/ [[[:alpha:]]]:.*//'` rm -f conftest.c conftest.obj if test -z "$SHOWINCLUDES_PREFIX"; then