]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/chkconf.h
2 * Name: wx/msw/chkconf.h
3 * Purpose: Compiler-specific configuration checking
8 * Copyright: (c) Julian Smart
9 * Licence: wxWindows licence
12 /* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */
14 #ifndef _WX_MSW_CHKCONF_H_
15 #define _WX_MSW_CHKCONF_H_
17 /* ensure that MSW-specific settings are defined */
18 #ifndef wxUSE_DC_CACHEING
19 # ifdef wxABORT_ON_CONFIG_ERROR
20 # error "wxUSE_DC_CACHEING must be defined"
22 # define wxUSE_DC_CACHEING 1
24 #endif /* wxUSE_DC_CACHEING */
28 * disable the settings which don't work for some compilers
32 * If using PostScript-in-MSW in Univ, must enable PostScript
34 #if defined(__WXUNIVERSAL__) && wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW && !wxUSE_POSTSCRIPT
35 # undef wxUSE_POSTSCRIPT
36 # define wxUSE_POSTSCRIPT 1
39 #ifndef wxUSE_NORLANDER_HEADERS
40 # if (defined(__WATCOMC__) && (__WATCOMC__ >= 1200)) || defined(__WINE__) || ((defined(__MINGW32__) || defined(__CYGWIN__)) && ((__GNUC__>2) ||((__GNUC__==2) && (__GNUC_MINOR__>=95))))
41 # define wxUSE_NORLANDER_HEADERS 1
43 # define wxUSE_NORLANDER_HEADERS 0
48 * We don't want to give an error if wxUSE_UNICODE_MSLU is enabled but
49 * wxUSE_UNICODE is not as this would make it impossible to simply set the
50 * former in wx/setup.h as then the library wouldn't compile in non-Unicode
51 * configurations, so instead simply unset it silently when it doesn't make
54 #if wxUSE_UNICODE_MSLU && !wxUSE_UNICODE
55 # undef wxUSE_UNICODE_MSLU
56 # define wxUSE_UNICODE_MSLU 0
60 * All of the settings below require SEH support (__try/__catch) and can't work
63 #if !defined(_MSC_VER) && \
64 (!defined(__BORLANDC__) || __BORLANDC__ < 0x0550)
65 # undef wxUSE_ON_FATAL_EXCEPTION
66 # define wxUSE_ON_FATAL_EXCEPTION 0
68 # undef wxUSE_CRASHREPORT
69 # define wxUSE_CRASHREPORT 0
71 # undef wxUSE_STACKWALKER
72 # define wxUSE_STACKWALKER 0
73 #endif // compiler doesn't support SEH
75 /* wxUSE_DEBUG_NEW_ALWAYS doesn't work with CodeWarrior */
76 #if defined(__MWERKS__)
77 # undef wxUSE_DEBUG_NEW_ALWAYS
78 # define wxUSE_DEBUG_NEW_ALWAYS 0
81 #if defined(__GNUWIN32__)
82 /* These don't work as expected for mingw32 and cygwin32 */
83 # undef wxUSE_MEMORY_TRACING
84 # define wxUSE_MEMORY_TRACING 0
86 # undef wxUSE_GLOBAL_MEMORY_OPERATORS
87 # define wxUSE_GLOBAL_MEMORY_OPERATORS 0
89 # undef wxUSE_DEBUG_NEW_ALWAYS
90 # define wxUSE_DEBUG_NEW_ALWAYS 0
92 /* some Cygwin versions don't have wcslen */
93 # if defined(__CYGWIN__) || defined(__CYGWIN32__)
94 # if ! ((__GNUC__>2) ||((__GNUC__==2) && (__GNUC_MINOR__>=95)))
96 # define wxUSE_WCHAR_T 0
100 #endif /* __GNUWIN32__ */
102 /* wxUSE_MFC is not defined when using configure as it doesn't make sense for
103 gcc or mingw32 anyhow */
106 #endif /* !defined(wxUSE_MFC) */
108 /* MFC duplicates these operators */
110 # undef wxUSE_GLOBAL_MEMORY_OPERATORS
111 # define wxUSE_GLOBAL_MEMORY_OPERATORS 0
113 # undef wxUSE_DEBUG_NEW_ALWAYS
114 # define wxUSE_DEBUG_NEW_ALWAYS 0
115 #endif /* wxUSE_MFC */
117 #if (defined(__GNUWIN32__) && !wxUSE_NORLANDER_HEADERS)
118 /* GnuWin32 doesn't have appropriate headers for e.g. IUnknown. */
119 # undef wxUSE_DRAG_AND_DROP
120 # define wxUSE_DRAG_AND_DROP 0
123 #if !wxUSE_OWNER_DRAWN && !defined(__WXUNIVERSAL__)
124 # undef wxUSE_CHECKLISTBOX
125 # define wxUSE_CHECKLISTBOX 0
130 # ifdef wxABORT_ON_CONFIG_ERROR
131 # error "wxSpinCtrl requires wxSpinButton on MSW"
133 # undef wxUSE_SPINBTN
134 # define wxUSE_SPINBTN 1
140 Win64-specific checks.
143 # if wxUSE_STACKWALKER
144 /* this is not currently supported under Win64, volunteers needed to
146 # undef wxUSE_STACKWALKER
147 # define wxUSE_STACKWALKER 0
149 # undef wxUSE_CRASHREPORT
150 # define wxUSE_CRASHREPORT 0
152 #endif /* __WIN64__ */
156 Compiler-specific checks.
158 #if defined(__BORLANDC__) && (__BORLANDC__ < 0x500)
159 /* BC++ 4.0 can't compile JPEG library */
160 # undef wxUSE_LIBJPEG
161 # define wxUSE_LIBJPEG 0
164 /* wxUSE_DEBUG_NEW_ALWAYS = 1 not compatible with BC++ in DLL mode */
165 #if defined(__BORLANDC__) && (defined(WXMAKINGDLL) || defined(WXUSINGDLL))
166 # undef wxUSE_DEBUG_NEW_ALWAYS
167 # define wxUSE_DEBUG_NEW_ALWAYS 0
170 /* Early Watcom version don't have good enough wide char support */
171 #if defined(__WXMSW__) && (defined(__WATCOMC__) && __WATCOMC__ < 1200)
172 # undef wxUSE_WCHAR_T
173 # define wxUSE_WCHAR_T 0
176 /* DMC++ doesn't have definitions for date picker control, so use generic control
179 # if wxUSE_DATEPICKCTRL
180 # undef wxUSE_DATEPICKCTRL_GENERIC
181 # undef wxUSE_DATEPICKCTRL
183 # define wxUSE_DATEPICKCTRL 0
184 # define wxUSE_DATEPICKCTRL_GENERIC 1
187 #ifndef wxUSE_UNICODE_MSLU
188 # ifdef wxABORT_ON_CONFIG_ERROR
189 # error "wxUSE_UNICODE_MSLU must be defined."
191 # define wxUSE_UNICODE_MSLU 0
193 #endif /* wxUSE_UNICODE_MSLU */
195 #ifndef wxUSE_UXTHEME
196 # ifdef wxABORT_ON_CONFIG_ERROR
197 # error "wxUSE_UXTHEME must be defined."
199 # define wxUSE_UXTHEME 0
201 #endif /* wxUSE_UXTHEME */
203 #ifndef wxUSE_UXTHEME_AUTO
204 # ifdef wxABORT_ON_CONFIG_ERROR
205 # error "wxUSE_UXTHEME_AUTO must be defined."
207 # define wxUSE_UXTHEME_AUTO 0
209 #endif /* wxUSE_UXTHEME_AUTO */
211 #ifndef wxUSE_MS_HTML_HELP
212 # ifdef wxABORT_ON_CONFIG_ERROR
213 # error "wxUSE_MS_HTML_HELP must be defined."
215 # define wxUSE_MS_HTML_HELP 0
217 #endif /* !defined(wxUSE_MS_HTML_HELP) */
219 #ifndef wxUSE_DIALUP_MANAGER
220 # ifdef wxABORT_ON_CONFIG_ERROR
221 # error "wxUSE_DIALUP_MANAGER must be defined."
223 # define wxUSE_DIALUP_MANAGER 0
225 #endif /* !defined(wxUSE_DIALUP_MANAGER) */
227 #if !wxUSE_DYNAMIC_LOADER
228 # if wxUSE_MS_HTML_HELP
229 # ifdef wxABORT_ON_CONFIG_ERROR
230 # error "wxUSE_MS_HTML_HELP requires wxUSE_DYNAMIC_LOADER."
232 # define wxUSE_MS_HTML_HELP 0
235 # if wxUSE_DIALUP_MANAGER
236 # ifdef wxABORT_ON_CONFIG_ERROR
237 # error "wxUSE_DIALUP_MANAGER requires wxUSE_DYNAMIC_LOADER."
239 # define wxUSE_DIALUP_MANAGER 0
242 #endif /* wxUSE_DYNAMIC_LOADER */
244 #endif /* _WX_MSW_CHKCONF_H_ */