From 8050a6b4d7e2afd82a8e329180e0c035da3af3e7 Mon Sep 17 00:00:00 2001 From: Ralf Wildenhues Date: Mon, 9 Mar 2009 22:06:22 +0100 Subject: [PATCH] Relax depcomp test for MSVC to not require minuso. * m4/depend.m4 (_AM_DEPENDENCIES): When checking the msvisualcpp and msvcmsys depmodes, do not require `-c -o' to work just yet. It is not needed by the depcomp script for these depmodes, and works around the ordering issue between the tests. Report by Peter Rosin. Signed-off-by: Ralf Wildenhues --- ChangeLog | 9 +++++++++ m4/depend.m4 | 26 ++++++++++++++++++-------- 2 files changed, 27 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6f53021..ed02a80 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2009-03-09 Ralf Wildenhues + + Relax depcomp test for MSVC to not require minuso. + * m4/depend.m4 (_AM_DEPENDENCIES): When checking the msvisualcpp + and msvcmsys depmodes, do not require `-c -o' to work just yet. + It is not needed by the depcomp script for these depmodes, and + works around the ordering issue between the tests. + Report by Peter Rosin. + 2009-03-09 Peter Rosin * tests/compile2.test: Fix typo. diff --git a/m4/depend.m4 b/m4/depend.m4 index fd09373..451312a 100644 --- a/m4/depend.m4 +++ b/m4/depend.m4 @@ -1,12 +1,12 @@ ## -*- Autoconf -*- -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 9 +# serial 10 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, @@ -80,6 +80,12 @@ AC_CACHE_CHECK([dependency style of $depcc], done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll @@ -90,19 +96,23 @@ AC_CACHE_CHECK([dependency style of $depcc], break fi ;; + msvisualcpp | msvcmsys) + # This compiler won't grok `-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; none) break ;; esac - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message -- 2.7.4