+ifneq (,$(findstring $(MINGW32VERSION),2.8 2.9-early))
+# Earlier versions of this makefile defined the following macros
+# explicitly; mingw versions since at least '2.95-late' define
+# them already.
+ OBSOLETE_DEFINES = -D_X86_=1 -DWIN32 -D_WIN32 -D__WIN32__
+endif
+# But cygwin doesn't define them, at least through its version
+# 2.95.3-4 of gcc.
+ifneq ($(MINGW32),1)
+ OBSOLETE_DEFINES = -D_X86_=1 -DWIN32 -D_WIN32 -D__WIN32__
+endif
+
+ifneq (,$(findstring $(MINGW32VERSION),2.8 2.9-early 2.95-late))
+# Versions prior to 3.0 require -fvtable-thunks for OLE support.
+# All code must be built with this option, even C++ libraries you
+# only link to, including system libraries. This option can cause
+# subtle problems with multiple inheritance.
+ _THUNK_WORKAROUND=-fvtable-thunks
+endif
+
+ifeq (,$(findstring $(MINGW32VERSION),2.8 2.9-early))
+# Versions since 2.95.2-1 support '-shared', which makes linking
+# a dll *much* faster; and the accompanying windres supports
+# '--use-temp-file', which is more robust.
+ LD_SUPPORTS_SHARED=yes
+ _USE_TEMP_FILE_IF_SUPPORTED=--use-temp-file
+# Use the WIN32 wxDirDialog only if we have a recent mingw version
+ RECENT_MINGW=yes
+endif
+
+ifeq (,$(findstring $(MINGW32VERSION),2.8 2.9-early 2.95-late))
+# Versions since 3.0 provide win32api.h . An old comment said to
+# define this 'if you have w32api >= 0.5', but mingw 2.95.2-1
+# has no such header.
+ifndef WINE
+ _USE_W32API_HEADER_IF_SUPPORTED = -DHAVE_W32API_H
+endif
+#
+# Revision 1.70.2.6 of this file suggested '--pipe' for mingw but
+# not for cygwin, and only for version 3.0 or later. Since then,
+# the advice given here
+# http://mail.gnu.org/pipermail/autoconf/2000-July/005479.html
+# is followed, and '--pipe' is not used unless you specify it on
+# the make command line, e.g.
+# make CXXFLAGS=--pipe CFLAGS=--pipe -f makefile.g95
+#
+endif
+
+# Define the C++ and C compiler respectively
+ifndef WINE
+CXX = $(CROSS)g++
+CC = $(CROSS)gcc
+else
+CXX = wineg++
+CC = winegcc
+endif