automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Make depmode=cpp work with Microsoft Visual C++ on MSYS.


From: Peter Rosin
Subject: Re: Make depmode=cpp work with Microsoft Visual C++ on MSYS.
Date: Mon, 09 Mar 2009 21:51:14 +0100
User-agent: Thunderbird 2.0.0.19 (Windows/20081209)

Den 2009-03-04 00:07 skrev Ralf Wildenhues:
* Peter Rosin wrote on Wed, Jan 28, 2009 at 12:57:43PM CET:
But if you are looking for bugs to squash, one obvious problem is
that the standard
AC_PROG_CC
AM_PROG_CC_C_O
puts the dependency check before the -c -o check, which forces losers
like me to configure CC=".../path/to/compile cl" for the dependency
checker to work (as it compiles in subdirs with -c -o). Can some m4
magic be applied so that the dependency check is moved down or the
-c -o check moved up, that would be much appreciated!

Not a really nice fix, but I've come up with this below.  Can you try
it (at least the tests/dep* tests from automake, please)?

depcomp.test is ok,
depcomp2.test and depcomp3.test are not applicable (forces gcc)
depcomp4.test fails with missing makedepend.
depcomp5.test forces icc
depcomp6.test works fine (choke me triggers and the exit status is 0)
depcomp7.test fails with no libtool.

The thing bothering me most is that it won't fix things for other
compilers not grokking `-c -o'.  OTOH I think it is fairly safe.

I also tested this by applying the same set of changes to an already
generated libtool configure script (from the pr-msvc-support branch).
But I did use copy-paste though, so I'm pretty certain that I didn't
foul things up...

Then I ran:

../configure --enable-dependency-tracking CC=cl CFLAGS="-MD -Zi" \
 CXX=cl CXXFLAGS="-MD -Zi" LD=link NM="dumpbin -symbols" \
 AR=lib STRIP=: RANLIB=: F77=no FC=no

and everything went fine. I got:

checking dependency style of cl... msvcmsys

however, I had to fix a tiny bug, see below.

@@ -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

I'm missing an equal sign in the above line.

I.e. works with:
+      am__minus_obj=

I like this patch.

Cheers,
Peter




reply via email to

[Prev in Thread] Current Thread [Next in Thread]