]>
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 */
19 # ifdef wxABORT_ON_CONFIG_ERROR
20 # error "wxUSE_ACTIVEX must be defined."
22 # define wxUSE_ACTIVEX 0
24 #endif /* !defined(wxUSE_ACTIVEX) */
26 #ifndef wxUSE_CRASHREPORT
27 # ifdef wxABORT_ON_CONFIG_ERROR
28 # error "wxUSE_CRASHREPORT must be defined."
30 # define wxUSE_CRASHREPORT 0
32 #endif /* !defined(wxUSE_CRASHREPORT) */
34 #ifndef wxUSE_DC_CACHEING
35 # ifdef wxABORT_ON_CONFIG_ERROR
36 # error "wxUSE_DC_CACHEING must be defined"
38 # define wxUSE_DC_CACHEING 1
40 #endif /* wxUSE_DC_CACHEING */
42 #ifndef wxUSE_DIALUP_MANAGER
43 # ifdef wxABORT_ON_CONFIG_ERROR
44 # error "wxUSE_DIALUP_MANAGER must be defined."
46 # define wxUSE_DIALUP_MANAGER 0
48 #endif /* !defined(wxUSE_DIALUP_MANAGER) */
50 #ifndef wxUSE_MS_HTML_HELP
51 # ifdef wxABORT_ON_CONFIG_ERROR
52 # error "wxUSE_MS_HTML_HELP must be defined."
54 # define wxUSE_MS_HTML_HELP 0
56 #endif /* !defined(wxUSE_MS_HTML_HELP) */
59 # ifdef wxABORT_ON_CONFIG_ERROR
60 # error "wxUSE_OLE must be defined."
64 #endif /* !defined(wxUSE_OLE) */
66 #ifndef wxUSE_OLE_AUTOMATION
67 # ifdef wxABORT_ON_CONFIG_ERROR
68 # error "wxUSE_OLE_AUTOMATION must be defined."
70 # define wxUSE_OLE_AUTOMATION 0
72 #endif /* !defined(wxUSE_OLE_AUTOMATION) */
74 #ifndef wxUSE_UNICODE_MSLU
75 # ifdef wxABORT_ON_CONFIG_ERROR
76 # error "wxUSE_UNICODE_MSLU must be defined."
78 # define wxUSE_UNICODE_MSLU 0
80 #endif /* wxUSE_UNICODE_MSLU */
83 # ifdef wxABORT_ON_CONFIG_ERROR
84 # error "wxUSE_UXTHEME must be defined."
86 # define wxUSE_UXTHEME 0
88 #endif /* wxUSE_UXTHEME */
91 * We don't want to give an error if wxUSE_UNICODE_MSLU is enabled but
92 * wxUSE_UNICODE is not as this would make it impossible to simply set the
93 * former in wx/setup.h as then the library wouldn't compile in non-Unicode
94 * configurations, so instead simply unset it silently when it doesn't make
97 #if wxUSE_UNICODE_MSLU && !wxUSE_UNICODE
98 # undef wxUSE_UNICODE_MSLU
99 # define wxUSE_UNICODE_MSLU 0
104 * disable the settings which don't work for some compilers
107 #ifndef wxUSE_NORLANDER_HEADERS
108 # if ( wxCHECK_WATCOM_VERSION(1,0) || defined(__WINE__) ) || \
109 ((defined(__MINGW32__) || defined(__CYGWIN__)) && ((__GNUC__>2) ||((__GNUC__==2) && (__GNUC_MINOR__>=95))))
110 # define wxUSE_NORLANDER_HEADERS 1
112 # define wxUSE_NORLANDER_HEADERS 0
117 * All of the settings below require SEH support (__try/__catch) and can't work
120 #if !defined(_MSC_VER) && \
121 (!defined(__BORLANDC__) || __BORLANDC__ < 0x0550)
122 # undef wxUSE_ON_FATAL_EXCEPTION
123 # define wxUSE_ON_FATAL_EXCEPTION 0
125 # undef wxUSE_CRASHREPORT
126 # define wxUSE_CRASHREPORT 0
128 # undef wxUSE_STACKWALKER
129 # define wxUSE_STACKWALKER 0
130 #endif /* compiler doesn't support SEH */
132 /* wxUSE_DEBUG_NEW_ALWAYS doesn't work with CodeWarrior */
133 #if defined(__MWERKS__)
134 # undef wxUSE_DEBUG_NEW_ALWAYS
135 # define wxUSE_DEBUG_NEW_ALWAYS 0
138 #if defined(__GNUWIN32__)
139 /* These don't work as expected for mingw32 and cygwin32 */
140 # undef wxUSE_MEMORY_TRACING
141 # define wxUSE_MEMORY_TRACING 0
143 # undef wxUSE_GLOBAL_MEMORY_OPERATORS
144 # define wxUSE_GLOBAL_MEMORY_OPERATORS 0
146 # undef wxUSE_DEBUG_NEW_ALWAYS
147 # define wxUSE_DEBUG_NEW_ALWAYS 0
149 /* some Cygwin versions don't have wcslen */
150 # if defined(__CYGWIN__) || defined(__CYGWIN32__)
151 # if ! ((__GNUC__>2) ||((__GNUC__==2) && (__GNUC_MINOR__>=95)))
152 # undef wxUSE_WCHAR_T
153 # define wxUSE_WCHAR_T 0
157 #endif /* __GNUWIN32__ */
159 /* wxUSE_MFC is not defined when using configure as it doesn't make sense for
160 gcc or mingw32 anyhow */
163 #endif /* !defined(wxUSE_MFC) */
165 /* MFC duplicates these operators */
167 # undef wxUSE_GLOBAL_MEMORY_OPERATORS
168 # define wxUSE_GLOBAL_MEMORY_OPERATORS 0
170 # undef wxUSE_DEBUG_NEW_ALWAYS
171 # define wxUSE_DEBUG_NEW_ALWAYS 0
172 #endif /* wxUSE_MFC */
174 #if (defined(__GNUWIN32__) && !wxUSE_NORLANDER_HEADERS)
175 /* GnuWin32 doesn't have appropriate headers for e.g. IUnknown. */
176 # undef wxUSE_DRAG_AND_DROP
177 # define wxUSE_DRAG_AND_DROP 0
180 #if !wxUSE_OWNER_DRAWN && !defined(__WXUNIVERSAL__)
181 # undef wxUSE_CHECKLISTBOX
182 # define wxUSE_CHECKLISTBOX 0
187 # ifdef wxABORT_ON_CONFIG_ERROR
188 # error "wxSpinCtrl requires wxSpinButton on MSW"
190 # undef wxUSE_SPINBTN
191 # define wxUSE_SPINBTN 1
197 Win64-specific checks.
200 # if wxUSE_STACKWALKER
201 /* this is not currently supported under Win64, volunteers needed to
203 # undef wxUSE_STACKWALKER
204 # define wxUSE_STACKWALKER 0
206 # undef wxUSE_CRASHREPORT
207 # define wxUSE_CRASHREPORT 0
209 #endif /* __WIN64__ */
213 Compiler-specific checks.
215 #if defined(__BORLANDC__) && (__BORLANDC__ < 0x500)
216 /* BC++ 4.0 can't compile JPEG library */
217 # undef wxUSE_LIBJPEG
218 # define wxUSE_LIBJPEG 0
221 /* wxUSE_DEBUG_NEW_ALWAYS = 1 not compatible with BC++ in DLL mode */
222 #if defined(__BORLANDC__) && (defined(WXMAKINGDLL) || defined(WXUSINGDLL))
223 # undef wxUSE_DEBUG_NEW_ALWAYS
224 # define wxUSE_DEBUG_NEW_ALWAYS 0
227 /* DMC++ doesn't have definitions for date picker control, so use generic control
230 # if wxUSE_DATEPICKCTRL
231 # undef wxUSE_DATEPICKCTRL_GENERIC
232 # undef wxUSE_DATEPICKCTRL
234 # define wxUSE_DATEPICKCTRL 0
235 # define wxUSE_DATEPICKCTRL_GENERIC 1
241 un/redefine the options which we can't compile (after checking that they're
246 # undef wxUSE_ACTIVEX
247 # define wxUSE_ACTIVEX 0
248 # endif /* wxUSE_ACTIVEX */
250 # if wxUSE_UNICODE_MSLU
251 # undef wxUSE_UNICODE_MSLU
252 # define wxUSE_UNICODE_MSLU 0
253 # endif /* wxUSE_UNICODE_MSLU */
254 #endif /* __WINE__ */
257 /* check settings consistency for MSW-specific ones */
258 #if wxUSE_CRASHREPORT && !wxUSE_ON_FATAL_EXCEPTION
259 # ifdef wxABORT_ON_CONFIG_ERROR
260 # error "wxUSE_CRASHREPORT requires wxUSE_ON_FATAL_EXCEPTION"
262 # undef wxUSE_CRASHREPORT
263 # define wxUSE_CRASHREPORT 0
265 #endif /* wxUSE_CRASHREPORT */
269 # ifdef wxABORT_ON_CONFIG_ERROR
270 # error "wxActiveXContainer requires wxVariant"
272 # undef wxUSE_ACTIVEX
273 # define wxUSE_ACTIVEX 0
277 # if wxUSE_OLE_AUTOMATION
278 # ifdef wxABORT_ON_CONFIG_ERROR
279 # error "wxAutomationObject requires wxVariant"
281 # undef wxUSE_OLE_AUTOMATION
282 # define wxUSE_OLE_AUTOMATION 0
285 #endif /* !wxUSE_VARIANT */
287 #if !wxUSE_DYNAMIC_LOADER
288 # if wxUSE_MS_HTML_HELP
289 # ifdef wxABORT_ON_CONFIG_ERROR
290 # error "wxUSE_MS_HTML_HELP requires wxUSE_DYNAMIC_LOADER."
292 # undef wxUSE_MS_HTML_HELP
293 # define wxUSE_MS_HTML_HELP 0
296 # if wxUSE_DIALUP_MANAGER
297 # ifdef wxABORT_ON_CONFIG_ERROR
298 # error "wxUSE_DIALUP_MANAGER requires wxUSE_DYNAMIC_LOADER."
300 # undef wxUSE_DIALUP_MANAGER
301 # define wxUSE_DIALUP_MANAGER 0
304 #endif /* !wxUSE_DYNAMIC_LOADER */
306 #if !wxUSE_DYNLIB_CLASS
308 # ifdef wxABORT_ON_CONFIG_ERROR
309 # error "wxUSE_UXTHEME requires wxUSE_DYNLIB_CLASS"
311 # undef wxUSE_UXTHEME
312 # define wxUSE_UXTHEME 0
316 # ifdef wxABORT_ON_CONFIG_ERROR
317 # error "wxUSE_MEDIACTRL requires wxUSE_DYNLIB_CLASS"
319 # undef wxUSE_MEDIACTRL
320 # define wxUSE_MEDIACTRL 0
324 # ifdef wxABORT_ON_CONFIG_ERROR
325 # error "wxUSE_INKEDIT requires wxUSE_DYNLIB_CLASS"
327 # undef wxUSE_INKEDIT
328 # define wxUSE_INKEDIT 0
331 #endif /* !wxUSE_DYNLIB_CLASS */
335 # ifdef wxABORT_ON_CONFIG_ERROR
336 # error "wxActiveXContainer requires wxUSE_OLE"
338 # undef wxUSE_ACTIVEX
339 # define wxUSE_ACTIVEX 0
344 # ifdef wxABORT_ON_CONFIG_ERROR
345 # error "wxUSE_DATAOBJ requires wxUSE_OLE"
347 # undef wxUSE_DATAOBJ
348 # define wxUSE_DATAOBJ 0
352 # if wxUSE_OLE_AUTOMATION
353 # ifdef wxABORT_ON_CONFIG_ERROR
354 # error "wxAutomationObject requires wxUSE_OLE"
356 # undef wxUSE_OLE_AUTOMATION
357 # define wxUSE_OLE_AUTOMATION 0
360 #endif /* !wxUSE_OLE */
364 # ifdef wxABORT_ON_CONFIG_ERROR
365 # error "wxMediaCtl requires wxActiveXContainer"
367 # undef wxUSE_MEDIACTRL
368 # define wxUSE_MEDIACTRL 0
371 #endif /* !wxUSE_ACTIVEX */
373 #if defined(__WXUNIVERSAL__) && wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW && !wxUSE_POSTSCRIPT
374 # undef wxUSE_POSTSCRIPT
375 # define wxUSE_POSTSCRIPT 1
378 #endif /* _WX_MSW_CHKCONF_H_ */