Werner LEMBERG skrev 2012-02-03 10:45: > >>> is there an autoconf macro to detect MS Windows? >> >> Is that a joke? The trouble is, that autoconf requires a shell and >> M4, which Windows doesn't provide (only in Cygwin). So MS Windows is >> detected when autoconf/configure does not run... > > Very witty :-) No, it's not a joke. I don't want to detect the > compiler or the build environment, but I want a macro which detects > the Windows GUI abilities, similar to macro which detects the > availability of X11, regardless of the platform. (don't listen the Olaf, he's obviously ignorant, I use autotools on Windows almost daily. Sometimes with Cygwin providing the needed tools, sometimes with MSYS providing the tools, but there are other options as well, such as cross-compiling from *nix) You do as you do with whatever else you are requiring. Check if #include <windows.h> is there, and check if you can link with some API of your choice. However, there is (at least) one caveat and that is the calling convention used by Windows API. A standard link test, as is usually done by Autoconf, will use the cdecl calling convention and the Windows API uses the stdcall calling convention and the symbols are decorated, so you need to #include <windows.h> in the link test in order to get the calling convention right. At least that's what I have found to be cleanest. Cheers, Peter _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx https://lists.gnu.org/mailman/listinfo/autoconf