]>
Commit | Line | Data |
---|---|---|
01ebf752 JS |
1 | /* |
2 | * Name: wx/msw/chkconf.h | |
3 | * Purpose: Compiler-specific configuration checking | |
4 | * Author: Julian Smart | |
5 | * Modified by: | |
6 | * Created: 01/02/97 | |
7 | * RCS-ID: $Id$ | |
8 | * Copyright: (c) Julian Smart | |
65571936 | 9 | * Licence: wxWindows licence |
01ebf752 JS |
10 | */ |
11 | ||
34cbe514 RN |
12 | /* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */ |
13 | ||
01ebf752 JS |
14 | #ifndef _WX_MSW_CHKCONF_H_ |
15 | #define _WX_MSW_CHKCONF_H_ | |
16 | ||
74987083 | 17 | /* ensure that MSW-specific settings are defined */ |
07b1232d VZ |
18 | #ifndef wxUSE_ACTIVEX |
19 | # ifdef wxABORT_ON_CONFIG_ERROR | |
20 | # error "wxUSE_ACTIVEX must be defined." | |
21 | # else | |
22 | # define wxUSE_ACTIVEX 0 | |
23 | # endif | |
24 | #endif /* !defined(wxUSE_ACTIVEX) */ | |
25 | ||
26 | #ifndef wxUSE_CRASHREPORT | |
27 | # ifdef wxABORT_ON_CONFIG_ERROR | |
28 | # error "wxUSE_CRASHREPORT must be defined." | |
29 | # else | |
30 | # define wxUSE_CRASHREPORT 0 | |
31 | # endif | |
32 | #endif /* !defined(wxUSE_CRASHREPORT) */ | |
33 | ||
74987083 VZ |
34 | #ifndef wxUSE_DC_CACHEING |
35 | # ifdef wxABORT_ON_CONFIG_ERROR | |
36 | # error "wxUSE_DC_CACHEING must be defined" | |
37 | # else | |
38 | # define wxUSE_DC_CACHEING 1 | |
39 | # endif | |
40 | #endif /* wxUSE_DC_CACHEING */ | |
41 | ||
07b1232d VZ |
42 | #ifndef wxUSE_DIALUP_MANAGER |
43 | # ifdef wxABORT_ON_CONFIG_ERROR | |
44 | # error "wxUSE_DIALUP_MANAGER must be defined." | |
45 | # else | |
46 | # define wxUSE_DIALUP_MANAGER 0 | |
47 | # endif | |
48 | #endif /* !defined(wxUSE_DIALUP_MANAGER) */ | |
74987083 | 49 | |
07b1232d VZ |
50 | #ifndef wxUSE_MS_HTML_HELP |
51 | # ifdef wxABORT_ON_CONFIG_ERROR | |
52 | # error "wxUSE_MS_HTML_HELP must be defined." | |
53 | # else | |
54 | # define wxUSE_MS_HTML_HELP 0 | |
55 | # endif | |
56 | #endif /* !defined(wxUSE_MS_HTML_HELP) */ | |
01ebf752 | 57 | |
61873536 VZ |
58 | #ifndef wxUSE_INICONF |
59 | # ifdef wxABORT_ON_CONFIG_ERROR | |
60 | # error "wxUSE_INICONF must be defined." | |
61 | # else | |
62 | # define wxUSE_INICONF 0 | |
63 | # endif | |
64 | #endif /* !defined(wxUSE_INICONF) */ | |
65 | ||
07b1232d VZ |
66 | #ifndef wxUSE_OLE |
67 | # ifdef wxABORT_ON_CONFIG_ERROR | |
68 | # error "wxUSE_OLE must be defined." | |
69 | # else | |
70 | # define wxUSE_OLE 0 | |
71 | # endif | |
72 | #endif /* !defined(wxUSE_OLE) */ | |
12bdd77c | 73 | |
07b1232d VZ |
74 | #ifndef wxUSE_OLE_AUTOMATION |
75 | # ifdef wxABORT_ON_CONFIG_ERROR | |
76 | # error "wxUSE_OLE_AUTOMATION must be defined." | |
77 | # else | |
78 | # define wxUSE_OLE_AUTOMATION 0 | |
79 | # endif | |
80 | #endif /* !defined(wxUSE_OLE_AUTOMATION) */ | |
81 | ||
23bd008a VZ |
82 | #ifndef wxUSE_TASKBARICON_BALLOONS |
83 | # ifdef wxABORT_ON_CONFIG_ERROR | |
84 | # error "wxUSE_TASKBARICON_BALLOONS must be defined." | |
85 | # else | |
86 | # define wxUSE_TASKBARICON_BALLOONS 0 | |
87 | # endif | |
88 | #endif /* wxUSE_TASKBARICON_BALLOONS */ | |
89 | ||
07b1232d VZ |
90 | #ifndef wxUSE_UNICODE_MSLU |
91 | # ifdef wxABORT_ON_CONFIG_ERROR | |
92 | # error "wxUSE_UNICODE_MSLU must be defined." | |
93 | # else | |
94 | # define wxUSE_UNICODE_MSLU 0 | |
95 | # endif | |
96 | #endif /* wxUSE_UNICODE_MSLU */ | |
97 | ||
98 | #ifndef wxUSE_UXTHEME | |
99 | # ifdef wxABORT_ON_CONFIG_ERROR | |
100 | # error "wxUSE_UXTHEME must be defined." | |
101 | # else | |
102 | # define wxUSE_UXTHEME 0 | |
103 | # endif | |
104 | #endif /* wxUSE_UXTHEME */ | |
105 | ||
820a7a1b VZ |
106 | /* |
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 | |
111 | * sense. | |
112 | */ | |
113 | #if wxUSE_UNICODE_MSLU && !wxUSE_UNICODE | |
114 | # undef wxUSE_UNICODE_MSLU | |
115 | # define wxUSE_UNICODE_MSLU 0 | |
219b657f JS |
116 | #endif |
117 | ||
07b1232d | 118 | |
219b657f | 119 | /* |
07b1232d | 120 | * disable the settings which don't work for some compilers |
219b657f JS |
121 | */ |
122 | ||
07b1232d VZ |
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 | |
127 | # else | |
128 | # define wxUSE_NORLANDER_HEADERS 0 | |
129 | # endif | |
820a7a1b VZ |
130 | #endif |
131 | ||
23bd008a VZ |
132 | /* |
133 | * See WINVER definition in wx/msw/wrapwin.h for the explanation of this test | |
134 | * logic. | |
135 | */ | |
136 | #if (defined(__VISUALC__) && (__VISUALC__ < 1300)) && \ | |
137 | (!defined(WINVER) || WINVER < 0x0500) | |
138 | # undef wxUSE_TASKBARICON_BALLOONS | |
139 | # define wxUSE_TASKBARICON_BALLOONS 0 | |
140 | #endif | |
141 | ||
b3dfbbc9 | 142 | /* |
3e3a3e17 VZ |
143 | * All of the settings below require SEH support (__try/__catch) and can't work |
144 | * without it. | |
b3dfbbc9 | 145 | */ |
3e3a3e17 VZ |
146 | #if !defined(_MSC_VER) && \ |
147 | (!defined(__BORLANDC__) || __BORLANDC__ < 0x0550) | |
820a7a1b VZ |
148 | # undef wxUSE_ON_FATAL_EXCEPTION |
149 | # define wxUSE_ON_FATAL_EXCEPTION 0 | |
3e3a3e17 | 150 | |
820a7a1b VZ |
151 | # undef wxUSE_CRASHREPORT |
152 | # define wxUSE_CRASHREPORT 0 | |
3e3a3e17 | 153 | |
820a7a1b VZ |
154 | # undef wxUSE_STACKWALKER |
155 | # define wxUSE_STACKWALKER 0 | |
3b2b40b4 | 156 | #endif /* compiler doesn't support SEH */ |
b3dfbbc9 | 157 | |
5e7f00a1 | 158 | /* wxUSE_DEBUG_NEW_ALWAYS doesn't work with CodeWarrior */ |
01ebf752 | 159 | #if defined(__MWERKS__) |
820a7a1b VZ |
160 | # undef wxUSE_DEBUG_NEW_ALWAYS |
161 | # define wxUSE_DEBUG_NEW_ALWAYS 0 | |
01ebf752 JS |
162 | #endif |
163 | ||
164 | #if defined(__GNUWIN32__) | |
5e7f00a1 VZ |
165 | /* These don't work as expected for mingw32 and cygwin32 */ |
166 | # undef wxUSE_MEMORY_TRACING | |
167 | # define wxUSE_MEMORY_TRACING 0 | |
168 | ||
169 | # undef wxUSE_GLOBAL_MEMORY_OPERATORS | |
170 | # define wxUSE_GLOBAL_MEMORY_OPERATORS 0 | |
171 | ||
172 | # undef wxUSE_DEBUG_NEW_ALWAYS | |
173 | # define wxUSE_DEBUG_NEW_ALWAYS 0 | |
01ebf752 | 174 | |
5e7f00a1 VZ |
175 | /* some Cygwin versions don't have wcslen */ |
176 | # if defined(__CYGWIN__) || defined(__CYGWIN32__) | |
177 | # if ! ((__GNUC__>2) ||((__GNUC__==2) && (__GNUC_MINOR__>=95))) | |
178 | # undef wxUSE_WCHAR_T | |
179 | # define wxUSE_WCHAR_T 0 | |
180 | # endif | |
01ebf752 | 181 | #endif |
5e7f00a1 VZ |
182 | |
183 | #endif /* __GNUWIN32__ */ | |
01ebf752 | 184 | |
16f10340 VZ |
185 | /* wxUSE_MFC is not defined when using configure as it doesn't make sense for |
186 | gcc or mingw32 anyhow */ | |
187 | #ifndef wxUSE_MFC | |
188 | #define wxUSE_MFC 0 | |
189 | #endif /* !defined(wxUSE_MFC) */ | |
190 | ||
01ebf752 JS |
191 | /* MFC duplicates these operators */ |
192 | #if wxUSE_MFC | |
5e7f00a1 VZ |
193 | # undef wxUSE_GLOBAL_MEMORY_OPERATORS |
194 | # define wxUSE_GLOBAL_MEMORY_OPERATORS 0 | |
01ebf752 | 195 | |
5e7f00a1 VZ |
196 | # undef wxUSE_DEBUG_NEW_ALWAYS |
197 | # define wxUSE_DEBUG_NEW_ALWAYS 0 | |
198 | #endif /* wxUSE_MFC */ | |
01ebf752 JS |
199 | |
200 | #if (defined(__GNUWIN32__) && !wxUSE_NORLANDER_HEADERS) | |
820a7a1b VZ |
201 | /* GnuWin32 doesn't have appropriate headers for e.g. IUnknown. */ |
202 | # undef wxUSE_DRAG_AND_DROP | |
203 | # define wxUSE_DRAG_AND_DROP 0 | |
01ebf752 JS |
204 | #endif |
205 | ||
d7bc7fec | 206 | #if !wxUSE_OWNER_DRAWN && !defined(__WXUNIVERSAL__) |
820a7a1b VZ |
207 | # undef wxUSE_CHECKLISTBOX |
208 | # define wxUSE_CHECKLISTBOX 0 | |
01ebf752 JS |
209 | #endif |
210 | ||
0e871ad0 WS |
211 | #if wxUSE_SPINCTRL |
212 | # if !wxUSE_SPINBTN | |
213 | # ifdef wxABORT_ON_CONFIG_ERROR | |
214 | # error "wxSpinCtrl requires wxSpinButton on MSW" | |
215 | # else | |
216 | # undef wxUSE_SPINBTN | |
217 | # define wxUSE_SPINBTN 1 | |
218 | # endif | |
219 | # endif | |
220 | #endif | |
221 | ||
da98e157 VZ |
222 | /* |
223 | Win64-specific checks. | |
224 | */ | |
225 | #ifdef __WIN64__ | |
226 | # if wxUSE_STACKWALKER | |
227 | /* this is not currently supported under Win64, volunteers needed to | |
228 | make it work */ | |
229 | # undef wxUSE_STACKWALKER | |
230 | # define wxUSE_STACKWALKER 0 | |
231 | ||
232 | # undef wxUSE_CRASHREPORT | |
233 | # define wxUSE_CRASHREPORT 0 | |
234 | # endif | |
235 | #endif /* __WIN64__ */ | |
236 | ||
237 | ||
238 | /* | |
239 | Compiler-specific checks. | |
240 | */ | |
1b5f8335 | 241 | |
e78c47e3 | 242 | /* Borland */ |
1b5f8335 VZ |
243 | #ifdef __BORLANDC__ |
244 | ||
245 | #if __BORLANDC__ < 0x500 | |
5e7f00a1 VZ |
246 | /* BC++ 4.0 can't compile JPEG library */ |
247 | # undef wxUSE_LIBJPEG | |
248 | # define wxUSE_LIBJPEG 0 | |
01ebf752 JS |
249 | #endif |
250 | ||
251 | /* wxUSE_DEBUG_NEW_ALWAYS = 1 not compatible with BC++ in DLL mode */ | |
1b5f8335 | 252 | #if defined(WXMAKINGDLL) || defined(WXUSINGDLL) |
5e7f00a1 VZ |
253 | # undef wxUSE_DEBUG_NEW_ALWAYS |
254 | # define wxUSE_DEBUG_NEW_ALWAYS 0 | |
01ebf752 JS |
255 | #endif |
256 | ||
1b5f8335 VZ |
257 | #endif /* __BORLANDC__ */ |
258 | ||
90a752c2 JS |
259 | /* DMC++ doesn't have definitions for date picker control, so use generic control |
260 | */ | |
90a752c2 | 261 | #ifdef __DMC__ |
820a7a1b VZ |
262 | # if wxUSE_DATEPICKCTRL |
263 | # undef wxUSE_DATEPICKCTRL_GENERIC | |
264 | # undef wxUSE_DATEPICKCTRL | |
265 | # endif | |
266 | # define wxUSE_DATEPICKCTRL 0 | |
267 | # define wxUSE_DATEPICKCTRL_GENERIC 1 | |
90a752c2 JS |
268 | #endif |
269 | ||
a1f48575 | 270 | |
b55c3716 | 271 | |
a1f48575 VZ |
272 | /* |
273 | un/redefine the options which we can't compile (after checking that they're | |
274 | defined | |
275 | */ | |
276 | #ifdef __WINE__ | |
07b1232d VZ |
277 | # if wxUSE_ACTIVEX |
278 | # undef wxUSE_ACTIVEX | |
279 | # define wxUSE_ACTIVEX 0 | |
280 | # endif /* wxUSE_ACTIVEX */ | |
281 | ||
282 | # if wxUSE_UNICODE_MSLU | |
283 | # undef wxUSE_UNICODE_MSLU | |
284 | # define wxUSE_UNICODE_MSLU 0 | |
285 | # endif /* wxUSE_UNICODE_MSLU */ | |
28efe654 | 286 | #endif /* __WINE__ */ |
a1f48575 | 287 | |
b55c3716 | 288 | |
ca5c6ac3 | 289 | /* check settings consistency for MSW-specific ones */ |
07b1232d VZ |
290 | #if wxUSE_CRASHREPORT && !wxUSE_ON_FATAL_EXCEPTION |
291 | # ifdef wxABORT_ON_CONFIG_ERROR | |
292 | # error "wxUSE_CRASHREPORT requires wxUSE_ON_FATAL_EXCEPTION" | |
293 | # else | |
294 | # undef wxUSE_CRASHREPORT | |
295 | # define wxUSE_CRASHREPORT 0 | |
296 | # endif | |
297 | #endif /* wxUSE_CRASHREPORT */ | |
298 | ||
ca5c6ac3 | 299 | #if !wxUSE_VARIANT |
a1f48575 VZ |
300 | # if wxUSE_ACTIVEX |
301 | # ifdef wxABORT_ON_CONFIG_ERROR | |
302 | # error "wxActiveXContainer requires wxVariant" | |
303 | # else | |
304 | # undef wxUSE_ACTIVEX | |
305 | # define wxUSE_ACTIVEX 0 | |
306 | # endif | |
307 | # endif | |
308 | ||
ca5c6ac3 VZ |
309 | # if wxUSE_OLE_AUTOMATION |
310 | # ifdef wxABORT_ON_CONFIG_ERROR | |
311 | # error "wxAutomationObject requires wxVariant" | |
312 | # else | |
313 | # undef wxUSE_OLE_AUTOMATION | |
314 | # define wxUSE_OLE_AUTOMATION 0 | |
315 | # endif | |
316 | # endif | |
a1f48575 | 317 | #endif /* !wxUSE_VARIANT */ |
ca5c6ac3 | 318 | |
b55c3716 VZ |
319 | #if !wxUSE_DYNAMIC_LOADER |
320 | # if wxUSE_MS_HTML_HELP | |
321 | # ifdef wxABORT_ON_CONFIG_ERROR | |
322 | # error "wxUSE_MS_HTML_HELP requires wxUSE_DYNAMIC_LOADER." | |
323 | # else | |
63de3718 | 324 | # undef wxUSE_MS_HTML_HELP |
285ba64d | 325 | # define wxUSE_MS_HTML_HELP 0 |
b55c3716 VZ |
326 | # endif |
327 | # endif | |
328 | # if wxUSE_DIALUP_MANAGER | |
329 | # ifdef wxABORT_ON_CONFIG_ERROR | |
330 | # error "wxUSE_DIALUP_MANAGER requires wxUSE_DYNAMIC_LOADER." | |
331 | # else | |
6fbc7b59 | 332 | # undef wxUSE_DIALUP_MANAGER |
285ba64d | 333 | # define wxUSE_DIALUP_MANAGER 0 |
b55c3716 VZ |
334 | # endif |
335 | # endif | |
a1f48575 | 336 | #endif /* !wxUSE_DYNAMIC_LOADER */ |
b55c3716 | 337 | |
64c288fa | 338 | #if !wxUSE_DYNLIB_CLASS |
e71508e1 VZ |
339 | # if wxUSE_DC_TRANSFORM_MATRIX |
340 | # ifdef wxABORT_ON_CONFIG_ERROR | |
341 | # error "wxUSE_DC_TRANSFORM_MATRIX requires wxUSE_DYNLIB_CLASS" | |
342 | # else | |
343 | # undef wxUSE_DC_TRANSFORM_MATRIX | |
344 | # define wxUSE_DC_TRANSFORM_MATRIX 0 | |
345 | # endif | |
346 | # endif | |
64c288fa JS |
347 | # if wxUSE_UXTHEME |
348 | # ifdef wxABORT_ON_CONFIG_ERROR | |
349 | # error "wxUSE_UXTHEME requires wxUSE_DYNLIB_CLASS" | |
350 | # else | |
351 | # undef wxUSE_UXTHEME | |
352 | # define wxUSE_UXTHEME 0 | |
353 | # endif | |
354 | # endif | |
355 | # if wxUSE_MEDIACTRL | |
356 | # ifdef wxABORT_ON_CONFIG_ERROR | |
357 | # error "wxUSE_MEDIACTRL requires wxUSE_DYNLIB_CLASS" | |
358 | # else | |
359 | # undef wxUSE_MEDIACTRL | |
360 | # define wxUSE_MEDIACTRL 0 | |
361 | # endif | |
362 | # endif | |
8ef51d67 JS |
363 | # if wxUSE_INKEDIT |
364 | # ifdef wxABORT_ON_CONFIG_ERROR | |
365 | # error "wxUSE_INKEDIT requires wxUSE_DYNLIB_CLASS" | |
366 | # else | |
367 | # undef wxUSE_INKEDIT | |
368 | # define wxUSE_INKEDIT 0 | |
369 | # endif | |
370 | # endif | |
a1f48575 | 371 | #endif /* !wxUSE_DYNLIB_CLASS */ |
64c288fa | 372 | |
42ef5bda | 373 | #if !wxUSE_OLE |
a1f48575 VZ |
374 | # if wxUSE_ACTIVEX |
375 | # ifdef wxABORT_ON_CONFIG_ERROR | |
376 | # error "wxActiveXContainer requires wxUSE_OLE" | |
377 | # else | |
378 | # undef wxUSE_ACTIVEX | |
379 | # define wxUSE_ACTIVEX 0 | |
380 | # endif | |
381 | # endif | |
382 | ||
42ef5bda VZ |
383 | # if wxUSE_DATAOBJ |
384 | # ifdef wxABORT_ON_CONFIG_ERROR | |
385 | # error "wxUSE_DATAOBJ requires wxUSE_OLE" | |
386 | # else | |
387 | # undef wxUSE_DATAOBJ | |
388 | # define wxUSE_DATAOBJ 0 | |
389 | # endif | |
390 | # endif | |
ca5c6ac3 VZ |
391 | |
392 | # if wxUSE_OLE_AUTOMATION | |
393 | # ifdef wxABORT_ON_CONFIG_ERROR | |
394 | # error "wxAutomationObject requires wxUSE_OLE" | |
395 | # else | |
396 | # undef wxUSE_OLE_AUTOMATION | |
397 | # define wxUSE_OLE_AUTOMATION 0 | |
398 | # endif | |
399 | # endif | |
a1f48575 VZ |
400 | #endif /* !wxUSE_OLE */ |
401 | ||
402 | #if !wxUSE_ACTIVEX | |
403 | # if wxUSE_MEDIACTRL | |
404 | # ifdef wxABORT_ON_CONFIG_ERROR | |
405 | # error "wxMediaCtl requires wxActiveXContainer" | |
406 | # else | |
407 | # undef wxUSE_MEDIACTRL | |
408 | # define wxUSE_MEDIACTRL 0 | |
409 | # endif | |
410 | # endif | |
2724d84b SL |
411 | # if wxUSE_WEB |
412 | # ifdef wxABORT_ON_CONFIG_ERROR | |
413 | # error "wxWebView requires wxActiveXContainer under MSW" | |
414 | # else | |
415 | # undef wxUSE_WEB | |
416 | # define wxUSE_WEB 0 | |
417 | # endif | |
418 | # endif | |
a1f48575 | 419 | #endif /* !wxUSE_ACTIVEX */ |
42ef5bda | 420 | |
e7678d7d VZ |
421 | #if !wxUSE_THREADS |
422 | # if wxUSE_FSWATCHER | |
423 | # ifdef wxABORT_ON_CONFIG_ERROR | |
424 | # error "wxFileSystemWatcher requires wxThread under MSW" | |
425 | # else | |
426 | # undef wxUSE_FSWATCHER | |
427 | # define wxUSE_FSWATCHER 0 | |
428 | # endif | |
af9b2033 | 429 | # endif |
e7678d7d VZ |
430 | #endif /* !wxUSE_THREADS */ |
431 | ||
2724d84b SL |
432 | |
433 | #if !wxUSE_OLE_AUTOMATION | |
434 | # if wxUSE_WEB | |
435 | # ifdef wxABORT_ON_CONFIG_ERROR | |
436 | # error "wxWebView requires wxUSE_OLE_AUTOMATION under MSW" | |
437 | # else | |
438 | # undef wxUSE_WEB | |
439 | # define wxUSE_WEB 0 | |
440 | # endif | |
441 | # endif | |
442 | #endif /* !wxUSE_OLE_AUTOMATION */ | |
443 | ||
07b1232d VZ |
444 | #if defined(__WXUNIVERSAL__) && wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW && !wxUSE_POSTSCRIPT |
445 | # undef wxUSE_POSTSCRIPT | |
446 | # define wxUSE_POSTSCRIPT 1 | |
447 | #endif | |
448 | ||
5e7f00a1 | 449 | #endif /* _WX_MSW_CHKCONF_H_ */ |