From: Vadim Zeitlin Date: Sat, 4 Nov 2006 02:54:19 +0000 (+0000) Subject: add -mno-cygwin detection: we should treat cygwin as Windows, not Unix, when it's... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/032bc940fcde34cc649eaa111cd6aff1cda66104?ds=sidebyside add -mno-cygwin detection: we should treat cygwin as Windows, not Unix, when it's used git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43005 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/configure.in b/configure.in index 859a108055..e9c77d6382 100644 --- a/configure.in +++ b/configure.in @@ -1427,9 +1427,32 @@ case "${host}" in *-*-cygwin*) if test "$wxUSE_MSW" = 1 ; then wants_win32=1 - BAKEFILE_FORCE_PLATFORM=win32 else - doesnt_want_win32=1 + dnl when we use cygwin compiler with -mno-cygwin option it uses mingw32 + dnl headers and libraries, so it's Windows-like in this case + AC_CACHE_CHECK([if -mno-cygwin is in effect], wx_cv_nocygwin, + [ + AC_TRY_COMPILE( + [], + [ + #ifdef __MINGW32__ + choke me + #endif + ], + wx_cv_nocygwin=no, + wx_cv_nocygwin=yes + ) + ] + ) + + if test "$wx_cv_nocygwin" = "yes"; then + wants_win32=1 + else + doesnt_want_win32=1 + fi + fi + if test "$wants_win32" = 1 ; then + BAKEFILE_FORCE_PLATFORM=win32 fi ;; *-*-mingw*)