-#if wxUSE_CRASHREPORT && !wxUSE_ON_FATAL_EXCEPTION
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_CRASHREPORT requires wxUSE_ON_FATAL_EXCEPTION"
-# else
-# undef wxUSE_CRASHREPORT
-# define wxUSE_CRASHREPORT 0
+#if defined(__WXPALMOS__)
+# include "wx/palmos/chkconf.h"
+#elif defined(__WXWINCE__)
+# include "wx/msw/wince/chkconf.h"
+#elif defined(__WXMSW__)
+# include "wx/msw/chkconf.h"
+#elif defined(__WXGTK__)
+# include "wx/gtk/chkconf.h"
+#elif defined(__WXCOCOA__)
+# include "wx/cocoa/chkconf.h"
+#elif defined(__WXMAC__)
+# include "wx/osx/chkconf.h"
+#elif defined(__OS2__)
+# include "wx/os2/chkconf.h"
+#elif defined(__WXMGL__)
+# include "wx/mgl/chkconf.h"
+#elif defined(__WXDFB__)
+# include "wx/dfb/chkconf.h"
+#elif defined(__WXMOTIF__)
+# include "wx/motif/chkconf.h"
+#elif defined(__WXX11__)
+# include "wx/x11/chkconf.h"
+#endif
+
+/*
+ __UNIX__ is also defined under Cygwin but we shouldn't perform these checks
+ there if we're building wxMSW.
+ */
+#if defined(__UNIX__) && !defined(__WXMSW__)
+# include "wx/unix/chkconf.h"
+#endif
+
+#ifdef __WXUNIVERSAL__
+# include "wx/univ/chkconf.h"
+#endif
+
+/*
+ Section 3a: check consistency of the non-GUI settings.
+ */
+
+#if WXWIN_COMPATIBILITY_2_6
+# if !WXWIN_COMPATIBILITY_2_8
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "2.6.X compatibility requires 2.8.X compatibility"
+# else
+# undef WXWIN_COMPATIBILITY_2_8
+# define WXWIN_COMPATIBILITY_2_8 1
+# endif