]>
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_INICONF must be defined."
62 # define wxUSE_INICONF 0
64 #endif /* !defined(wxUSE_INICONF) */
67 # ifdef wxABORT_ON_CONFIG_ERROR
68 # error "wxUSE_OLE must be defined."
72 #endif /* !defined(wxUSE_OLE) */
74 #ifndef wxUSE_OLE_AUTOMATION
75 # ifdef wxABORT_ON_CONFIG_ERROR
76 # error "wxUSE_OLE_AUTOMATION must be defined."
78 # define wxUSE_OLE_AUTOMATION 0
80 #endif /* !defined(wxUSE_OLE_AUTOMATION) */
82 #ifndef wxUSE_TASKBARICON_BALLOONS
83 # ifdef wxABORT_ON_CONFIG_ERROR
84 # error "wxUSE_TASKBARICON_BALLOONS must be defined."
86 # define wxUSE_TASKBARICON_BALLOONS 0
88 #endif /* wxUSE_TASKBARICON_BALLOONS */
90 #ifndef wxUSE_UNICODE_MSLU
91 # ifdef wxABORT_ON_CONFIG_ERROR
92 # error "wxUSE_UNICODE_MSLU must be defined."
94 # define wxUSE_UNICODE_MSLU 0
96 #endif /* wxUSE_UNICODE_MSLU */
99 # ifdef wxABORT_ON_CONFIG_ERROR
100 # error "wxUSE_UXTHEME must be defined."
102 # define wxUSE_UXTHEME 0
104 #endif /* wxUSE_UXTHEME */
107 * We don't want to give an error if wxUSE_UNICODE_MSLU is enabled but
108 * wxUSE_UNICODE is not as this would make it impossible to simply set the
109 * former in wx/setup.h as then the library wouldn't compile in non-Unicode
110 * configurations, so instead simply unset it silently when it doesn't make
113 #if wxUSE_UNICODE_MSLU && !wxUSE_UNICODE
114 # undef wxUSE_UNICODE_MSLU
115 # define wxUSE_UNICODE_MSLU 0
120 * disable the settings which don't work for some compilers
123 #ifndef wxUSE_NORLANDER_HEADERS
124 # if ( wxCHECK_WATCOM_VERSION(1,0) || defined(__WINE__) ) || \
125 ((defined(__MINGW32__) || defined(__CYGWIN__)) && ((__GNUC__>2) ||((__GNUC__==2) && (__GNUC_MINOR__>=95))))
126 # define wxUSE_NORLANDER_HEADERS 1
128 # define wxUSE_NORLANDER_HEADERS 0
133 * See WINVER definition in wx/msw/wrapwin.h for the explanation of this test
136 #if (defined(__VISUALC__) && (__VISUALC__ < 1300)) && \
137 (!defined(WINVER) || WINVER < 0x0500)
138 # undef wxUSE_TASKBARICON_BALLOONS
139 # define wxUSE_TASKBARICON_BALLOONS 0
143 * All of the settings below require SEH support (__try/__catch) and can't work
146 #if !defined(_MSC_VER) && \
147 (!defined(__BORLANDC__) || __BORLANDC__ < 0x0550)
148 # undef wxUSE_ON_FATAL_EXCEPTION
149 # define wxUSE_ON_FATAL_EXCEPTION 0
151 # undef wxUSE_CRASHREPORT
152 # define wxUSE_CRASHREPORT 0
154 # undef wxUSE_STACKWALKER
155 # define wxUSE_STACKWALKER 0
156 #endif /* compiler doesn't support SEH */
158 #if defined(__GNUWIN32__)
159 /* These don't work as expected for mingw32 and cygwin32 */
160 # undef wxUSE_MEMORY_TRACING
161 # define wxUSE_MEMORY_TRACING 0
163 # undef wxUSE_GLOBAL_MEMORY_OPERATORS
164 # define wxUSE_GLOBAL_MEMORY_OPERATORS 0
166 # undef wxUSE_DEBUG_NEW_ALWAYS
167 # define wxUSE_DEBUG_NEW_ALWAYS 0
169 /* some Cygwin versions don't have wcslen */
170 # if defined(__CYGWIN__) || defined(__CYGWIN32__)
171 # if ! ((__GNUC__>2) ||((__GNUC__==2) && (__GNUC_MINOR__>=95)))
172 # undef wxUSE_WCHAR_T
173 # define wxUSE_WCHAR_T 0
177 #endif /* __GNUWIN32__ */
179 /* wxUSE_MFC is not defined when using configure as it doesn't make sense for
180 gcc or mingw32 anyhow */
183 #endif /* !defined(wxUSE_MFC) */
185 /* MFC duplicates these operators */
187 # undef wxUSE_GLOBAL_MEMORY_OPERATORS
188 # define wxUSE_GLOBAL_MEMORY_OPERATORS 0
190 # undef wxUSE_DEBUG_NEW_ALWAYS
191 # define wxUSE_DEBUG_NEW_ALWAYS 0
192 #endif /* wxUSE_MFC */
194 #if (defined(__GNUWIN32__) && !wxUSE_NORLANDER_HEADERS)
195 /* GnuWin32 doesn't have appropriate headers for e.g. IUnknown. */
196 # undef wxUSE_DRAG_AND_DROP
197 # define wxUSE_DRAG_AND_DROP 0
200 #if !wxUSE_OWNER_DRAWN && !defined(__WXUNIVERSAL__)
201 # undef wxUSE_CHECKLISTBOX
202 # define wxUSE_CHECKLISTBOX 0
207 # ifdef wxABORT_ON_CONFIG_ERROR
208 # error "wxSpinCtrl requires wxSpinButton on MSW"
210 # undef wxUSE_SPINBTN
211 # define wxUSE_SPINBTN 1
217 Win64-specific checks.
220 # if wxUSE_STACKWALKER
221 # undef wxUSE_CRASHREPORT
222 # define wxUSE_CRASHREPORT 0
224 #endif /* __WIN64__ */
228 Compiler-specific checks.
234 #if __BORLANDC__ < 0x500
235 /* BC++ 4.0 can't compile JPEG library */
236 # undef wxUSE_LIBJPEG
237 # define wxUSE_LIBJPEG 0
240 /* wxUSE_DEBUG_NEW_ALWAYS = 1 not compatible with BC++ in DLL mode */
241 #if defined(WXMAKINGDLL) || defined(WXUSINGDLL)
242 # undef wxUSE_DEBUG_NEW_ALWAYS
243 # define wxUSE_DEBUG_NEW_ALWAYS 0
246 #endif /* __BORLANDC__ */
248 /* DMC++ doesn't have definitions for date picker control, so use generic control
251 # if wxUSE_DATEPICKCTRL
252 # undef wxUSE_DATEPICKCTRL_GENERIC
253 # undef wxUSE_DATEPICKCTRL
255 # define wxUSE_DATEPICKCTRL 0
256 # define wxUSE_DATEPICKCTRL_GENERIC 1
262 un/redefine the options which we can't compile (after checking that they're
267 # undef wxUSE_ACTIVEX
268 # define wxUSE_ACTIVEX 0
269 # endif /* wxUSE_ACTIVEX */
271 # if wxUSE_UNICODE_MSLU
272 # undef wxUSE_UNICODE_MSLU
273 # define wxUSE_UNICODE_MSLU 0
274 # endif /* wxUSE_UNICODE_MSLU */
275 #endif /* __WINE__ */
278 /* check settings consistency for MSW-specific ones */
279 #if wxUSE_CRASHREPORT && !wxUSE_ON_FATAL_EXCEPTION
280 # ifdef wxABORT_ON_CONFIG_ERROR
281 # error "wxUSE_CRASHREPORT requires wxUSE_ON_FATAL_EXCEPTION"
283 # undef wxUSE_CRASHREPORT
284 # define wxUSE_CRASHREPORT 0
286 #endif /* wxUSE_CRASHREPORT */
290 # ifdef wxABORT_ON_CONFIG_ERROR
291 # error "wxActiveXContainer requires wxVariant"
293 # undef wxUSE_ACTIVEX
294 # define wxUSE_ACTIVEX 0
298 # if wxUSE_OLE_AUTOMATION
299 # ifdef wxABORT_ON_CONFIG_ERROR
300 # error "wxAutomationObject requires wxVariant"
302 # undef wxUSE_OLE_AUTOMATION
303 # define wxUSE_OLE_AUTOMATION 0
306 #endif /* !wxUSE_VARIANT */
308 #if !wxUSE_DYNAMIC_LOADER
309 # if wxUSE_MS_HTML_HELP
310 # ifdef wxABORT_ON_CONFIG_ERROR
311 # error "wxUSE_MS_HTML_HELP requires wxUSE_DYNAMIC_LOADER."
313 # undef wxUSE_MS_HTML_HELP
314 # define wxUSE_MS_HTML_HELP 0
317 # if wxUSE_DIALUP_MANAGER
318 # ifdef wxABORT_ON_CONFIG_ERROR
319 # error "wxUSE_DIALUP_MANAGER requires wxUSE_DYNAMIC_LOADER."
321 # undef wxUSE_DIALUP_MANAGER
322 # define wxUSE_DIALUP_MANAGER 0
325 #endif /* !wxUSE_DYNAMIC_LOADER */
327 #if !wxUSE_DYNLIB_CLASS
328 # if wxUSE_DC_TRANSFORM_MATRIX
329 # ifdef wxABORT_ON_CONFIG_ERROR
330 # error "wxUSE_DC_TRANSFORM_MATRIX requires wxUSE_DYNLIB_CLASS"
332 # undef wxUSE_DC_TRANSFORM_MATRIX
333 # define wxUSE_DC_TRANSFORM_MATRIX 0
337 # ifdef wxABORT_ON_CONFIG_ERROR
338 # error "wxUSE_UXTHEME requires wxUSE_DYNLIB_CLASS"
340 # undef wxUSE_UXTHEME
341 # define wxUSE_UXTHEME 0
345 # ifdef wxABORT_ON_CONFIG_ERROR
346 # error "wxUSE_MEDIACTRL requires wxUSE_DYNLIB_CLASS"
348 # undef wxUSE_MEDIACTRL
349 # define wxUSE_MEDIACTRL 0
353 # ifdef wxABORT_ON_CONFIG_ERROR
354 # error "wxUSE_INKEDIT requires wxUSE_DYNLIB_CLASS"
356 # undef wxUSE_INKEDIT
357 # define wxUSE_INKEDIT 0
360 #endif /* !wxUSE_DYNLIB_CLASS */
364 # ifdef wxABORT_ON_CONFIG_ERROR
365 # error "wxActiveXContainer requires wxUSE_OLE"
367 # undef wxUSE_ACTIVEX
368 # define wxUSE_ACTIVEX 0
373 # ifdef wxABORT_ON_CONFIG_ERROR
374 # error "wxUSE_DATAOBJ requires wxUSE_OLE"
376 # undef wxUSE_DATAOBJ
377 # define wxUSE_DATAOBJ 0
381 # if wxUSE_OLE_AUTOMATION
382 # ifdef wxABORT_ON_CONFIG_ERROR
383 # error "wxAutomationObject requires wxUSE_OLE"
385 # undef wxUSE_OLE_AUTOMATION
386 # define wxUSE_OLE_AUTOMATION 0
389 #endif /* !wxUSE_OLE */
393 # ifdef wxABORT_ON_CONFIG_ERROR
394 # error "wxMediaCtl requires wxActiveXContainer"
396 # undef wxUSE_MEDIACTRL
397 # define wxUSE_MEDIACTRL 0
401 # ifdef wxABORT_ON_CONFIG_ERROR
402 # error "wxWebView requires wxActiveXContainer under MSW"
408 #endif /* !wxUSE_ACTIVEX */
412 # ifdef wxABORT_ON_CONFIG_ERROR
413 # error "wxFileSystemWatcher requires wxThread under MSW"
415 # undef wxUSE_FSWATCHER
416 # define wxUSE_FSWATCHER 0
419 #endif /* !wxUSE_THREADS */
422 #if !wxUSE_OLE_AUTOMATION
424 # ifdef wxABORT_ON_CONFIG_ERROR
425 # error "wxWebView requires wxUSE_OLE_AUTOMATION under MSW"
431 #endif /* !wxUSE_OLE_AUTOMATION */
433 #if defined(__WXUNIVERSAL__) && wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW && !wxUSE_POSTSCRIPT
434 # undef wxUSE_POSTSCRIPT
435 # define wxUSE_POSTSCRIPT 1
438 #endif /* _WX_MSW_CHKCONF_H_ */