> I believe that -TP should fix the problem, but I cannot test it.
> Set CXX='cl -TP' and check if the tests work better.

I haven't tested this under autoconf, but -TP (or -Tpfile.cc) works
under make in cygwin.  That was some time ago (maybe a year or so) with
MSVC++ 5.x.  My solution was to not use the option but to hack the
autoconf file extension macros to switch to `cpp' if it detected `cl'.

But that was just the tip of the ice-berg...  So while I am at it, a few
more things worth a mention.

MSVC++ always prints the file name out when compiling a file.  I seem to
recall this confused the autoconf macros that tried to detect whether
the compile was spitting out error messages or not.  I think I hacked
the macros to not care about lines with just the file name (MSVC++
doesn't print a colon) when looking for errors.  I haven't looked
closely at the recently proposed changes, but they might do the right
thing.  Should I post my hacked up autoconf macros?

You'll probably want to compile with `cl -nologo' (at least with MSVC++
5.x and below, haven't tried with 6.x yet).  Otherwise you will get a
banner that might be very confusing to the error message guessing logic
:-)

Depending on how extensively you want to support `cl', there are many
more issues to deal with -- sometimes convoluted ones.  Like it doesn't
understand `-l' or `-L' options, so anything that looks for symbols by
linking will probably fail.

Similar observations go for the `df' FORTRAN compiler.  It doesn't even
want to see any `/' characters in file names, they have to be '\' :-) 
It doesn't understand most common unix compiler options either, so
FORTRAN-compiling packages will probably choke if they try anything
non-trivial.

And since this is probably under cygwin, it might be worth mentioning
that `cl' and `df' (or `link' or `lib' or any other native tool) do not
understand cygwin's filesystem mounts or symlinks.  All paths for -I and
-L options must be translated to real windows paths before invoking the
tools -- including relative ones as they might be symlinks!

Cheers,
//lat
-- 
A copy of the universe is not what is required of art; one of
the damned things is ample.  --Rebecca West

Reply via email to