+dnl ---------------------------------------------------------------------------
+dnl When we are using gcc on OS/2, we want to be either using resources (PM)
+dnl or a more complete POSIX emulation for Motif/GTK+/X11
+dnl ---------------------------------------------------------------------------
+dnl (OS/2-only piece)
+case "${host}" in
+ *-pc-os2_emx | *-pc-os2-emx )
+ dnl Explicitly link -lstdcpp, since we are using "gcc" not "g++"/"c++".
+ LIBS="$LIBS -lstdcpp"
+ if test "$wxUSE_MOTIF" = 1 -o "$wxUSE_GTK" = 1 -o "$wxUSE_X11" = 1; then
+ dnl More complete Unix emulation for unix-like ports
+ dnl by linking in POSIX/2's cExt (if available).
+ AC_CHECK_LIB(cExt, drand48, LIBS="$LIBS -lcExt")
+ else
+ dnl Include resources for the "native" port (wxPM).
+ RESPROGRAMOBJ="\${top_srcdir}/include/wx/os2/wx.res"
+ fi
+ ;;
+esac
+dnl (end of OS/2-only piece)
+
+dnl ---------------------------------------------------------------------------
+dnl When we are using Cygwin with Motif/GTK+, we want it to appear like
+dnl 'just' a POSIX platform, so the Win32 API must not be available
+dnl ---------------------------------------------------------------------------
+dnl (Windows-only piece)
+wants_win32=0
+doesnt_want_win32=0
+case "${host}" in
+ *-*-cygwin*)
+ if test "$wxUSE_MSW" = 1 ; then
+ wants_win32=1
+ else
+ doesnt_want_win32=1
+ fi
+ ;;
+ *-*-mingw*)
+ wants_win32=1
+ ;;
+esac
+
+dnl NB: The two tests bellow are *NOT* mutually exclusive! They should only
+dnl take effect on Cygwin/Mingw and not other platforms.
+if test "$wants_win32" = 1 ; then
+ USE_UNIX=0
+ USE_WIN32=1
+ AC_DEFINE(__WIN32__)
+ AC_DEFINE(__WIN95__)
+ AC_DEFINE(__WINDOWS__)
+ AC_DEFINE(__GNUWIN32__)
+ AC_DEFINE(STRICT)
+ AC_DEFINE(WINVER, 0x0400)
+fi
+if test "$doesnt_want_win32" = 1 ; then
+ USE_UNIX=1
+ USE_WIN32=0
+fi
+dnl (end of Windows-only piece)
+
+if test "$USE_UNIX" = 1 ; then
+ wxUSE_UNIX=yes
+ AC_DEFINE(__UNIX__)
+fi
+