]> git.saurik.com Git - wxWidgets.git/commitdiff
add -mno-cygwin detection: we should treat cygwin as Windows, not Unix, when it's...
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 4 Nov 2006 02:54:19 +0000 (02:54 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 4 Nov 2006 02:54:19 +0000 (02:54 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43005 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

configure.in

index 859a10805505edf5816b3f6b2c4ef85573f58891..e9c77d6382b729b598999fb013714d60efa5d2c3 100644 (file)
@@ -1427,9 +1427,32 @@ case "${host}" in
   *-*-cygwin*)
       if test "$wxUSE_MSW" = 1 ; then
         wants_win32=1
   *-*-cygwin*)
       if test "$wxUSE_MSW" = 1 ; then
         wants_win32=1
-        BAKEFILE_FORCE_PLATFORM=win32
       else
       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*)
       fi
   ;;
   *-*-mingw*)