[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem detecting Cygwin/Mingw compiler

From: Mo DeJong
Subject: Problem detecting Cygwin/Mingw compiler
Date: Thu, 4 Jan 2001 14:13:26 -0800 (PST)

After the recent changes to AC_CYGWIN and AC_MINGW32, I noticed
a new problem.

Here is a little test that would have worked with the old
approach that tried to compile a file, but it now fails.

dnl     If a mingw compile is detected and cygwin.h is also found
dnl     then error out because they are trying to build with the
dnl     -mno-cygwin flag under Cygwin. It is not supported for C++.
if test "x$MINGW32" = "xyes" &&
    test "x$ac_cv_header_sys_cygwin_h" = "xyes" ; then

    AC_MSG_ERROR([Unable to compile under Cygwin in Mingw mode,
Mingw version of the stdc++ library is not available with Cygwin.
You will need to install the native Mingw tools from or compile Jikes in Cygwin native mode
by not passing -mno-cygwin in the CXXFLAGS.])

The problem is that MINGW32 only gets set if $host is set
to something that includes *mingw32*. When I compile like
this, the host default to the detected build which is cygwin.

.../configure CXXFLAGS="-g -mno-cygwin"

Any ideas? I just don't see how we can detect this case
without compiling something to see if -mno-cygwin is
getting passed to the Cygwin version of gcc.

Mo DeJong
Red Hat Inc

reply via email to

[Prev in Thread] Current Thread [Next in Thread]