+#if wxUSE_BMPBUTTON
+# if !wxUSE_BUTTON
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_BMPBUTTON requires wxUSE_BUTTON"
+# else
+# undef wxUSE_BUTTON
+# define wxUSE_BUTTON 1
+# endif
+# endif
+#endif /* wxUSE_BMPBUTTON */
+
+#if wxUSE_NOTEBOOK || wxUSE_LISTBOOK || wxUSE_CHOICEBOOK
+# if defined(wxUSE_BOOKCTRL) && !wxUSE_BOOKCTRL
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_BOOKCTRL must be set."
+# else
+# undef wxUSE_BOOKCTRL
+# endif
+# endif
+
+# ifndef wxUSE_BOOKCTRL
+# define wxUSE_BOOKCTRL 1
+# endif
+#endif /* wxUSE_NOTEBOOK */
+
+#if wxUSE_LISTBOOK
+# if !wxUSE_LISTCTRL
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxListbook requires wxListCtrl"
+# else
+# undef wxUSE_LISTCTRL
+# define wxUSE_LISTCTRL 1
+# endif
+# endif
+#endif /* wxUSE_LISTBOOK */
+
+#if wxUSE_CHOICEBOOK
+# if !wxUSE_CHOICE
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxChoicebook requires wxChoice"
+# else
+# undef wxUSE_CHOICE
+# define wxUSE_CHOICE 1
+# endif
+# endif
+#endif /* wxUSE_CHOICEBOOK */
+
+/* don't attempt to use native status bar on the platforms not having it */
+#ifndef wxUSE_NATIVE_STATUSBAR
+# define wxUSE_NATIVE_STATUSBAR 0
+#elif wxUSE_NATIVE_STATUSBAR
+# if defined(__WXUNIVERSAL__) || !( defined(__WXMSW__) || \
+ defined(__WXMAC__) || \
+ defined(__WXPALMOS__) )
+# undef wxUSE_NATIVE_STATUSBAR
+# define wxUSE_NATIVE_STATUSBAR 0
+# endif
+#endif
+
+/* wxUniv-specific dependencies */
+#if defined(__WXUNIVERSAL__)
+# if (wxUSE_COMBOBOX || wxUSE_MENUS) && !wxUSE_POPUPWIN
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_POPUPWIN must be defined to use comboboxes/menus"
+# else
+# undef wxUSE_POPUPWIN
+# define wxUSE_POPUPWIN 1
+# endif
+# endif
+
+# if wxUSE_COMBOBOX
+# if !wxUSE_LISTBOX
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxComboBox requires wxListBox in wxUniversal"
+# else
+# undef wxUSE_LISTBOX
+# define wxUSE_LISTBOX 1
+# endif
+# endif
+# endif /* wxUSE_COMBOBOX */
+
+# if wxUSE_RADIOBTN
+# if !wxUSE_CHECKBOX
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_RADIOBTN requires wxUSE_CHECKBOX in wxUniversal"
+# else
+# undef wxUSE_CHECKBOX
+# define wxUSE_CHECKBOX 1
+# endif
+# endif
+# endif /* wxUSE_RADIOBTN */
+
+# if wxUSE_TEXTCTRL
+# if !wxUSE_CARET
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxTextCtrl requires wxCaret in wxUniversal"
+# else
+# undef wxUSE_CARET
+# define wxUSE_CARET 1
+# endif
+# endif /* wxUSE_CARET */
+
+# if !wxUSE_SCROLLBAR
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxTextCtrl requires wxScrollBar in wxUniversal"
+# else
+# undef wxUSE_SCROLLBAR
+# define wxUSE_SCROLLBAR 1
+# endif
+# endif /* wxUSE_SCROLLBAR */
+# endif /* wxUSE_TEXTCTRL */
+#endif /* __WXUNIVERSAL__ */
+
+/* wxGTK-specific dependencies */
+#ifdef __WXGTK__
+# ifndef __WXUNIVERSAL__
+# if wxUSE_MDI_ARCHITECTURE && !wxUSE_MENUS
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "MDI requires wxUSE_MENUS in wxGTK"
+# else
+# undef wxUSE_MENUS
+# define wxUSE_MENUS 1
+# endif
+# endif
+# endif /* !__WXUNIVERSAL__ */
+
+# if wxUSE_JOYSTICK
+# if !wxUSE_THREADS
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxJoystick requires threads in wxGTK"
+# else
+# undef wxUSE_JOYSTICK
+# define wxUSE_JOYSTICK 0
+# endif
+# endif
+# endif
+#endif /* wxGTK && !wxUniv */
+
+/* wxMSW-specific dependencies */
+#ifdef __WXMSW__
+# ifndef wxUSE_UNICODE_MSLU
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_UNICODE_MSLU must be defined."
+# else
+# define wxUSE_UNICODE_MSLU 0
+# endif
+# endif /* wxUSE_UNICODE_MSLU */
+# ifndef wxUSE_UXTHEME
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_UXTHEME must be defined."
+# else
+# define wxUSE_UXTHEME 0
+# endif
+# endif /* wxUSE_UXTHEME */
+# ifndef wxUSE_UXTHEME_AUTO
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_UXTHEME_AUTO must be defined."
+# else
+# define wxUSE_UXTHEME_AUTO 0
+# endif
+# endif /* wxUSE_UXTHEME_AUTO */
+# ifndef wxUSE_MS_HTML_HELP
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_MS_HTML_HELP must be defined."
+# else
+# define wxUSE_MS_HTML_HELP 0
+# endif
+# endif /* !defined(wxUSE_MS_HTML_HELP) */
+# ifndef wxUSE_DIALUP_MANAGER
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_DIALUP_MANAGER must be defined."
+# else
+# define wxUSE_DIALUP_MANAGER 0
+# endif
+# endif /* !defined(wxUSE_DIALUP_MANAGER) */
+
+# if !wxUSE_DYNAMIC_LOADER
+# if wxUSE_MS_HTML_HELP
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_MS_HTML_HELP requires wxUSE_DYNAMIC_LOADER."
+# else
+# define wxUSE_DYNAMIC_LOADER 1
+# endif
+# endif
+# if wxUSE_DIALUP_MANAGER
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_DIALUP_MANAGER requires wxUSE_DYNAMIC_LOADER."
+# else
+# define wxUSE_DYNAMIC_LOADER 1
+# endif
+# endif
+# endif /* wxUSE_DYNAMIC_LOADER */
+
+#endif /* wxMSW */
+
+/* wxMAC-specific dependencies */
+#ifdef __WXMAC__
+# if wxUSE_UNICODE
+# if !TARGET_CARBON
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_UNICODE is only supported for Carbon Targets."
+# else
+# define wxUSE_UNICODE 0
+# endif
+# endif
+# endif
+#endif /* wxMAC */
+/* wxMotif-specific dependencies */
+#if defined(__WXMOTIF__) && wxUSE_NOTEBOOK && !wxUSE_TAB_DIALOG
+# undef wxUSE_TAB_DIALOG
+# define wxUSE_TAB_DIALOG 1
+#endif
+
+/* wxMGL-specific dependencies */
+#ifdef __WXMGL__
+# if !wxUSE_PALETTE
+# error "wxMGL requires wxUSE_PALETTE=1"
+# endif
+#endif /* wxMGL */
+
+/* Hopefully we can emulate these dialogs in due course */
+#if defined(__SMARTPHONE__) && defined(__WXWINCE__)
+# ifdef wxUSE_COLOURDLG
+# undef wxUSE_COLOURDLG
+# define wxUSE_COLOURDLG 0
+# endif
+#endif /* __SMARTPHONE__ && __WXWINCE__ */
+
+
+/* generic controls dependencies */
+#if !defined(__WXMSW__) || defined(__WXUNIVERSAL__)
+# if wxUSE_FONTDLG || wxUSE_FILEDLG || wxUSE_CHOICEDLG
+ /* all common controls are needed by these dialogs */
+# if !defined(wxUSE_CHOICE) || \
+ !defined(wxUSE_TEXTCTRL) || \
+ !defined(wxUSE_BUTTON) || \
+ !defined(wxUSE_CHECKBOX) || \
+ !defined(wxUSE_STATTEXT)
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "These common controls are needed by common dialogs"
+# else
+# undef wxUSE_CHOICE
+# define wxUSE_CHOICE 1
+# undef wxUSE_TEXTCTRL
+# define wxUSE_TEXTCTRL 1
+# undef wxUSE_BUTTON
+# define wxUSE_BUTTON 1
+# undef wxUSE_CHECKBOX
+# define wxUSE_CHECKBOX 1
+# undef wxUSE_STATTEXT
+# define wxUSE_STATTEXT 1
+# endif
+# endif
+# endif
+#endif /* !wxMSW || wxUniv */
+
+/* common dependencies */