On Fri, Feb 3, 2012 at 10:52 AM, Olaf Lenz <olenz@xxxxxxxxxxxxxxxxxxxx> wrote: > Hi! > > > On 02/03/2012 10:45 AM, Werner LEMBERG wrote: >>> >>> 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. > > > I did not try to be witty. I was really wondering whether the question > was meant as a joke. > The problem of detecting MS Windows with autoconf is much deeper than > not having a macro for it. You simply cannot run autoconf on MS Windows, > as it requires other tools that are not available on Windows, so there > is no macro to detect it. > Or are you talking of Cygwin? MSYS exists too ;) (though MSYS is based on cygwin code). Werner: when using autotools with MSYS or when cross compiling on linux, I check the host. Something like that in configure.ac: AC_CANONICAL_HOST have_windows="no" case "$host_os" in mingw*) have_windows="yes" ;; esac Note that this also detects Windows CE gcc cross compiler. regards Vincent Torri _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx https://lists.gnu.org/mailman/listinfo/autoconf