Define "sane." My OSSBuild environment actually replicates what the Visual Studio command prompts do -- so the LIB, INCLUDE, and PATH env vars. are updated to have the exact same paths on them that using the VS command prompt would have (well I do add a couple more). I went to great lengths to follow suit (including reading the registry in the same way). See
https://github.com/ossbuild/ossbuild-env/blob/master/windows/packages/msys/ossbuild/ms-tools.sh#L481 for the details. In the end, they look like:
LIB=/c/Program Files (x86)/Microsoft Visual Studio 10.0/VC/LIB:/c/Program Files (x86)/Microsoft Visual Studio 10.0/VC/ATLMFC/LIB:/c/Program Files/Microsoft SDKs/Windows/v6.0A/lib:/c/Program Files/Java/jdk1.7.0_15/lib:/c/Program Files (x86)/Windows Installer XML v3.5/SDK/lib
INCLUDE=/c/Program Files (x86)/Microsoft Visual Studio 10.0/VC/INCLUDE:/c/Program Files (x86)/Microsoft Visual Studio 10.0/VC/ATLMFC/INCLUDE:/c/Program Files/Microsoft SDKs/Windows/v6.0A/include:/c/Program Files/Java/jdk1.7.0
_15/include:/c/Program Files (x86)/Windows Installer XML v3.5/SDK/inc
It should be close enough to the recommended Windows dev environment. I do use an older Platform SDK -- the one bundled w/ Visual Studio. In my case, v6.0, not v7.0. I wouldn't think that'd make a big difference (not for JNA and libffi's needs). At any rate, when I use this environment to compile the JNA native lib, the MS tools version doesn't get through configure. Presumably there's something in the LIB/INCLUDE env vars it didn't like. The error was that it couldn't create an executable (and config.log was not helpful at all). I know those are on the path:
dhoyt@tinuviel /d/work/jna
$ cl
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
Copyright (C) Microsoft Corporation. All rights reserved.
usage: cl [ option... ] filename... [ /link linkoption... ]
dhoyt@tinuviel /d/work/jna
$ ld
ld: no input files