diff options
Diffstat (limited to 'm4/depend.m4')
-rw-r--r-- | m4/depend.m4 | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/m4/depend.m4 b/m4/depend.m4 index 4d6ff228e..d0b24dce1 100644 --- a/m4/depend.m4 +++ b/m4/depend.m4 @@ -92,11 +92,17 @@ AC_CACHE_CHECK([dependency style of $depcc], if depmode=$depmode \ source=conftest.c object=conftest.o \ depfile=conftest.Po tmpdepfile=conftest.TPo \ - $SHELL ./depcomp $depcc -c -o conftest.o conftest.c >/dev/null 2>&1 && + $SHELL ./depcomp $depcc -c -o conftest.o conftest.c \ + >/dev/null 2>conftest.err && grep conftest.h conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - am_cv_$1_dependencies_compiler_type=$depmode - break + # icc doesn't choke on unknown options, it will just issue warnings + # (even with -Werror). So we grep stderr for any message + # that says an option was ignored. + if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else + am_cv_$1_dependencies_compiler_type=$depmode + break + fi fi done |