Don't try to guess by the things in $ENV{PATH} - use Config. $Config{cc} has whatever C compiler should be used, $Config{make} has whatever make program should be used.
As you don't show any code, I can only give you vague and general hints. You will have to output different postambles depending on the type of make program (nmake, make, dmake), as they all use a different syntax. You will also have to set the CFLAGS variable depending on whether you need -shared or /link.
| [reply] [d/l] [select] |
... the 'make' might run in a different environment to the Makefile.PL
I don't understand what you're getting at with that remark. Usually on Win32, you don't have to concern yourself with the flavour of make that's being used. If $Config{make} is dmake, then perl Makefile.PL will write a dmake-compatible makefile (and the same goes for nmake). Anybody who's using something other than dmake or nmake is "on their own".
As you've found, you do need to concern yourself with the flavour of compiler that's being used. If you know how to code for both cl and gcc, and if you take Corion's advice of relying on $Config{cc}, then that problem should be solved. (Admittedly there are other compilers that can be used on Win32. I'd wait for bug reports from users of those compilers before concerning myself with them.)
Cheers, Rob | [reply] [d/l] |