diff options
-rw-r--r-- | configure.ac | 14 |
1 files changed, 13 insertions, 1 deletions
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 <stdlib.h>" > 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 |