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
http://www.mingw.org or compile Jikes in Cygwin native mode
by not passing -mno-cygwin in the CXXFLAGS.])
fi
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