]>
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 VZ |
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" | |
21 | # else | |
22 | # define wxUSE_DC_CACHEING 1 | |
23 | # endif | |
24 | #endif /* wxUSE_DC_CACHEING */ | |
25 | ||
26 | ||
01ebf752 JS |
27 | /* |
28 | * disable the settings which don't work for some compilers | |
29 | */ | |
30 | ||
12bdd77c JS |
31 | /* |
32 | * If using PostScript-in-MSW in Univ, must enable PostScript | |
33 | */ | |
12bdd77c | 34 | #if defined(__WXUNIVERSAL__) && wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW && !wxUSE_POSTSCRIPT |
5e7f00a1 VZ |
35 | # undef wxUSE_POSTSCRIPT |
36 | # define wxUSE_POSTSCRIPT 1 | |
12bdd77c JS |
37 | #endif |
38 | ||
01ebf752 | 39 | #ifndef wxUSE_NORLANDER_HEADERS |
6d3d756a WS |
40 | # if ( wxCHECK_WATCOM_VERSION(1,0) || defined(__WINE__) ) || \ |
41 | ((defined(__MINGW32__) || defined(__CYGWIN__)) && ((__GNUC__>2) ||((__GNUC__==2) && (__GNUC_MINOR__>=95)))) | |
5e7f00a1 VZ |
42 | # define wxUSE_NORLANDER_HEADERS 1 |
43 | # else | |
44 | # define wxUSE_NORLANDER_HEADERS 0 | |
45 | # endif | |
01ebf752 JS |
46 | #endif |
47 | ||
820a7a1b VZ |
48 | /* |
49 | * We don't want to give an error if wxUSE_UNICODE_MSLU is enabled but | |
50 | * wxUSE_UNICODE is not as this would make it impossible to simply set the | |
51 | * former in wx/setup.h as then the library wouldn't compile in non-Unicode | |
52 | * configurations, so instead simply unset it silently when it doesn't make | |
53 | * sense. | |
54 | */ | |
55 | #if wxUSE_UNICODE_MSLU && !wxUSE_UNICODE | |
56 | # undef wxUSE_UNICODE_MSLU | |
57 | # define wxUSE_UNICODE_MSLU 0 | |
219b657f JS |
58 | #endif |
59 | ||
60 | /* | |
61 | * Don't use MSLU if compiling with Wine | |
62 | */ | |
63 | ||
64 | #if wxUSE_UNICODE_MSLU && defined(__WINE__) | |
65 | # undef wxUSE_UNICODE_MSLU | |
66 | # define wxUSE_UNICODE_MSLU 0 | |
820a7a1b VZ |
67 | #endif |
68 | ||
b3dfbbc9 | 69 | /* |
3e3a3e17 VZ |
70 | * All of the settings below require SEH support (__try/__catch) and can't work |
71 | * without it. | |
b3dfbbc9 | 72 | */ |
3e3a3e17 VZ |
73 | #if !defined(_MSC_VER) && \ |
74 | (!defined(__BORLANDC__) || __BORLANDC__ < 0x0550) | |
820a7a1b VZ |
75 | # undef wxUSE_ON_FATAL_EXCEPTION |
76 | # define wxUSE_ON_FATAL_EXCEPTION 0 | |
3e3a3e17 | 77 | |
820a7a1b VZ |
78 | # undef wxUSE_CRASHREPORT |
79 | # define wxUSE_CRASHREPORT 0 | |
3e3a3e17 | 80 | |
820a7a1b VZ |
81 | # undef wxUSE_STACKWALKER |
82 | # define wxUSE_STACKWALKER 0 | |
3b2b40b4 | 83 | #endif /* compiler doesn't support SEH */ |
b3dfbbc9 | 84 | |
5e7f00a1 | 85 | /* wxUSE_DEBUG_NEW_ALWAYS doesn't work with CodeWarrior */ |
01ebf752 | 86 | #if defined(__MWERKS__) |
820a7a1b VZ |
87 | # undef wxUSE_DEBUG_NEW_ALWAYS |
88 | # define wxUSE_DEBUG_NEW_ALWAYS 0 | |
01ebf752 JS |
89 | #endif |
90 | ||
91 | #if defined(__GNUWIN32__) | |
5e7f00a1 VZ |
92 | /* These don't work as expected for mingw32 and cygwin32 */ |
93 | # undef wxUSE_MEMORY_TRACING | |
94 | # define wxUSE_MEMORY_TRACING 0 | |
95 | ||
96 | # undef wxUSE_GLOBAL_MEMORY_OPERATORS | |
97 | # define wxUSE_GLOBAL_MEMORY_OPERATORS 0 | |
98 | ||
99 | # undef wxUSE_DEBUG_NEW_ALWAYS | |
100 | # define wxUSE_DEBUG_NEW_ALWAYS 0 | |
01ebf752 | 101 | |
5e7f00a1 VZ |
102 | /* some Cygwin versions don't have wcslen */ |
103 | # if defined(__CYGWIN__) || defined(__CYGWIN32__) | |
104 | # if ! ((__GNUC__>2) ||((__GNUC__==2) && (__GNUC_MINOR__>=95))) | |
105 | # undef wxUSE_WCHAR_T | |
106 | # define wxUSE_WCHAR_T 0 | |
107 | # endif | |
01ebf752 | 108 | #endif |
5e7f00a1 VZ |
109 | |
110 | #endif /* __GNUWIN32__ */ | |
01ebf752 | 111 | |
16f10340 VZ |
112 | /* wxUSE_MFC is not defined when using configure as it doesn't make sense for |
113 | gcc or mingw32 anyhow */ | |
114 | #ifndef wxUSE_MFC | |
115 | #define wxUSE_MFC 0 | |
116 | #endif /* !defined(wxUSE_MFC) */ | |
117 | ||
01ebf752 JS |
118 | /* MFC duplicates these operators */ |
119 | #if wxUSE_MFC | |
5e7f00a1 VZ |
120 | # undef wxUSE_GLOBAL_MEMORY_OPERATORS |
121 | # define wxUSE_GLOBAL_MEMORY_OPERATORS 0 | |
01ebf752 | 122 | |
5e7f00a1 VZ |
123 | # undef wxUSE_DEBUG_NEW_ALWAYS |
124 | # define wxUSE_DEBUG_NEW_ALWAYS 0 | |
125 | #endif /* wxUSE_MFC */ | |
01ebf752 JS |
126 | |
127 | #if (defined(__GNUWIN32__) && !wxUSE_NORLANDER_HEADERS) | |
820a7a1b VZ |
128 | /* GnuWin32 doesn't have appropriate headers for e.g. IUnknown. */ |
129 | # undef wxUSE_DRAG_AND_DROP | |
130 | # define wxUSE_DRAG_AND_DROP 0 | |
01ebf752 JS |
131 | #endif |
132 | ||
d7bc7fec | 133 | #if !wxUSE_OWNER_DRAWN && !defined(__WXUNIVERSAL__) |
820a7a1b VZ |
134 | # undef wxUSE_CHECKLISTBOX |
135 | # define wxUSE_CHECKLISTBOX 0 | |
01ebf752 JS |
136 | #endif |
137 | ||
0e871ad0 WS |
138 | #if wxUSE_SPINCTRL |
139 | # if !wxUSE_SPINBTN | |
140 | # ifdef wxABORT_ON_CONFIG_ERROR | |
141 | # error "wxSpinCtrl requires wxSpinButton on MSW" | |
142 | # else | |
143 | # undef wxUSE_SPINBTN | |
144 | # define wxUSE_SPINBTN 1 | |
145 | # endif | |
146 | # endif | |
147 | #endif | |
148 | ||
da98e157 VZ |
149 | /* |
150 | Win64-specific checks. | |
151 | */ | |
152 | #ifdef __WIN64__ | |
153 | # if wxUSE_STACKWALKER | |
154 | /* this is not currently supported under Win64, volunteers needed to | |
155 | make it work */ | |
156 | # undef wxUSE_STACKWALKER | |
157 | # define wxUSE_STACKWALKER 0 | |
158 | ||
159 | # undef wxUSE_CRASHREPORT | |
160 | # define wxUSE_CRASHREPORT 0 | |
161 | # endif | |
162 | #endif /* __WIN64__ */ | |
163 | ||
164 | ||
165 | /* | |
166 | Compiler-specific checks. | |
167 | */ | |
01ebf752 | 168 | #if defined(__BORLANDC__) && (__BORLANDC__ < 0x500) |
5e7f00a1 VZ |
169 | /* BC++ 4.0 can't compile JPEG library */ |
170 | # undef wxUSE_LIBJPEG | |
171 | # define wxUSE_LIBJPEG 0 | |
01ebf752 JS |
172 | #endif |
173 | ||
174 | /* wxUSE_DEBUG_NEW_ALWAYS = 1 not compatible with BC++ in DLL mode */ | |
175 | #if defined(__BORLANDC__) && (defined(WXMAKINGDLL) || defined(WXUSINGDLL)) | |
5e7f00a1 VZ |
176 | # undef wxUSE_DEBUG_NEW_ALWAYS |
177 | # define wxUSE_DEBUG_NEW_ALWAYS 0 | |
01ebf752 JS |
178 | #endif |
179 | ||
90a752c2 JS |
180 | /* DMC++ doesn't have definitions for date picker control, so use generic control |
181 | */ | |
90a752c2 | 182 | #ifdef __DMC__ |
820a7a1b VZ |
183 | # if wxUSE_DATEPICKCTRL |
184 | # undef wxUSE_DATEPICKCTRL_GENERIC | |
185 | # undef wxUSE_DATEPICKCTRL | |
186 | # endif | |
187 | # define wxUSE_DATEPICKCTRL 0 | |
188 | # define wxUSE_DATEPICKCTRL_GENERIC 1 | |
90a752c2 JS |
189 | #endif |
190 | ||
a1f48575 VZ |
191 | |
192 | /* check that MSW-specific options are defined too */ | |
193 | #ifndef wxUSE_ACTIVEX | |
194 | # ifdef wxABORT_ON_CONFIG_ERROR | |
195 | # error "wxUSE_ACTIVEX must be defined." | |
196 | # else | |
197 | # define wxUSE_ACTIVEX 0 | |
198 | # endif | |
199 | #endif /* !defined(wxUSE_ACTIVEX) */ | |
200 | ||
201 | #ifndef wxUSE_DIALUP_MANAGER | |
202 | # ifdef wxABORT_ON_CONFIG_ERROR | |
203 | # error "wxUSE_DIALUP_MANAGER must be defined." | |
204 | # else | |
205 | # define wxUSE_DIALUP_MANAGER 0 | |
206 | # endif | |
207 | #endif /* !defined(wxUSE_DIALUP_MANAGER) */ | |
208 | ||
209 | #ifndef wxUSE_MS_HTML_HELP | |
210 | # ifdef wxABORT_ON_CONFIG_ERROR | |
211 | # error "wxUSE_MS_HTML_HELP must be defined." | |
212 | # else | |
213 | # define wxUSE_MS_HTML_HELP 0 | |
214 | # endif | |
215 | #endif /* !defined(wxUSE_MS_HTML_HELP) */ | |
216 | ||
217 | #ifndef wxUSE_OLE | |
218 | # ifdef wxABORT_ON_CONFIG_ERROR | |
219 | # error "wxUSE_OLE must be defined." | |
220 | # else | |
221 | # define wxUSE_OLE 0 | |
222 | # endif | |
223 | #endif /* !defined(wxUSE_OLE) */ | |
224 | ||
225 | #ifndef wxUSE_OLE_AUTOMATION | |
226 | # ifdef wxABORT_ON_CONFIG_ERROR | |
227 | # error "wxUSE_OLE_AUTOMATION must be defined." | |
228 | # else | |
229 | # define wxUSE_OLE_AUTOMATION 0 | |
230 | # endif | |
231 | #endif /* !defined(wxUSE_OLE_AUTOMATION) */ | |
232 | ||
b55c3716 VZ |
233 | #ifndef wxUSE_UNICODE_MSLU |
234 | # ifdef wxABORT_ON_CONFIG_ERROR | |
235 | # error "wxUSE_UNICODE_MSLU must be defined." | |
236 | # else | |
237 | # define wxUSE_UNICODE_MSLU 0 | |
238 | # endif | |
239 | #endif /* wxUSE_UNICODE_MSLU */ | |
240 | ||
241 | #ifndef wxUSE_UXTHEME | |
242 | # ifdef wxABORT_ON_CONFIG_ERROR | |
243 | # error "wxUSE_UXTHEME must be defined." | |
244 | # else | |
245 | # define wxUSE_UXTHEME 0 | |
246 | # endif | |
247 | #endif /* wxUSE_UXTHEME */ | |
248 | ||
249 | #ifndef wxUSE_UXTHEME_AUTO | |
250 | # ifdef wxABORT_ON_CONFIG_ERROR | |
251 | # error "wxUSE_UXTHEME_AUTO must be defined." | |
252 | # else | |
253 | # define wxUSE_UXTHEME_AUTO 0 | |
254 | # endif | |
255 | #endif /* wxUSE_UXTHEME_AUTO */ | |
256 | ||
b55c3716 | 257 | |
a1f48575 VZ |
258 | /* |
259 | un/redefine the options which we can't compile (after checking that they're | |
260 | defined | |
261 | */ | |
262 | #ifdef __WINE__ | |
263 | /* apparently it doesn't compile under Wine, remove it/when it does */ | |
264 | #if wxUSE_ACTIVEX | |
265 | #undef wxUSE_ACTIVEX | |
266 | #define wxUSE_ACTIVEX 0 | |
28efe654 VS |
267 | #endif /* wxUSE_ACTIVEX */ |
268 | #endif /* __WINE__ */ | |
a1f48575 | 269 | |
b55c3716 | 270 | |
ca5c6ac3 VZ |
271 | /* check settings consistency for MSW-specific ones */ |
272 | #if !wxUSE_VARIANT | |
a1f48575 VZ |
273 | # if wxUSE_ACTIVEX |
274 | # ifdef wxABORT_ON_CONFIG_ERROR | |
275 | # error "wxActiveXContainer requires wxVariant" | |
276 | # else | |
277 | # undef wxUSE_ACTIVEX | |
278 | # define wxUSE_ACTIVEX 0 | |
279 | # endif | |
280 | # endif | |
281 | ||
ca5c6ac3 VZ |
282 | # if wxUSE_OLE_AUTOMATION |
283 | # ifdef wxABORT_ON_CONFIG_ERROR | |
284 | # error "wxAutomationObject requires wxVariant" | |
285 | # else | |
286 | # undef wxUSE_OLE_AUTOMATION | |
287 | # define wxUSE_OLE_AUTOMATION 0 | |
288 | # endif | |
289 | # endif | |
a1f48575 | 290 | #endif /* !wxUSE_VARIANT */ |
ca5c6ac3 | 291 | |
b55c3716 VZ |
292 | #if !wxUSE_DYNAMIC_LOADER |
293 | # if wxUSE_MS_HTML_HELP | |
294 | # ifdef wxABORT_ON_CONFIG_ERROR | |
295 | # error "wxUSE_MS_HTML_HELP requires wxUSE_DYNAMIC_LOADER." | |
296 | # else | |
63de3718 | 297 | # undef wxUSE_MS_HTML_HELP |
285ba64d | 298 | # define wxUSE_MS_HTML_HELP 0 |
b55c3716 VZ |
299 | # endif |
300 | # endif | |
301 | # if wxUSE_DIALUP_MANAGER | |
302 | # ifdef wxABORT_ON_CONFIG_ERROR | |
303 | # error "wxUSE_DIALUP_MANAGER requires wxUSE_DYNAMIC_LOADER." | |
304 | # else | |
6fbc7b59 | 305 | # undef wxUSE_DIALUP_MANAGER |
285ba64d | 306 | # define wxUSE_DIALUP_MANAGER 0 |
b55c3716 VZ |
307 | # endif |
308 | # endif | |
a1f48575 | 309 | #endif /* !wxUSE_DYNAMIC_LOADER */ |
b55c3716 | 310 | |
64c288fa JS |
311 | #if !wxUSE_DYNLIB_CLASS |
312 | # if wxUSE_UXTHEME | |
313 | # ifdef wxABORT_ON_CONFIG_ERROR | |
314 | # error "wxUSE_UXTHEME requires wxUSE_DYNLIB_CLASS" | |
315 | # else | |
316 | # undef wxUSE_UXTHEME | |
317 | # define wxUSE_UXTHEME 0 | |
318 | # endif | |
319 | # endif | |
320 | # if wxUSE_MEDIACTRL | |
321 | # ifdef wxABORT_ON_CONFIG_ERROR | |
322 | # error "wxUSE_MEDIACTRL requires wxUSE_DYNLIB_CLASS" | |
323 | # else | |
324 | # undef wxUSE_MEDIACTRL | |
325 | # define wxUSE_MEDIACTRL 0 | |
326 | # endif | |
327 | # endif | |
8ef51d67 JS |
328 | # if wxUSE_INKEDIT |
329 | # ifdef wxABORT_ON_CONFIG_ERROR | |
330 | # error "wxUSE_INKEDIT requires wxUSE_DYNLIB_CLASS" | |
331 | # else | |
332 | # undef wxUSE_INKEDIT | |
333 | # define wxUSE_INKEDIT 0 | |
334 | # endif | |
335 | # endif | |
a1f48575 | 336 | #endif /* !wxUSE_DYNLIB_CLASS */ |
64c288fa | 337 | |
42ef5bda | 338 | #if !wxUSE_OLE |
a1f48575 VZ |
339 | # if wxUSE_ACTIVEX |
340 | # ifdef wxABORT_ON_CONFIG_ERROR | |
341 | # error "wxActiveXContainer requires wxUSE_OLE" | |
342 | # else | |
343 | # undef wxUSE_ACTIVEX | |
344 | # define wxUSE_ACTIVEX 0 | |
345 | # endif | |
346 | # endif | |
347 | ||
42ef5bda VZ |
348 | # if wxUSE_DATAOBJ |
349 | # ifdef wxABORT_ON_CONFIG_ERROR | |
350 | # error "wxUSE_DATAOBJ requires wxUSE_OLE" | |
351 | # else | |
352 | # undef wxUSE_DATAOBJ | |
353 | # define wxUSE_DATAOBJ 0 | |
354 | # endif | |
355 | # endif | |
ca5c6ac3 VZ |
356 | |
357 | # if wxUSE_OLE_AUTOMATION | |
358 | # ifdef wxABORT_ON_CONFIG_ERROR | |
359 | # error "wxAutomationObject requires wxUSE_OLE" | |
360 | # else | |
361 | # undef wxUSE_OLE_AUTOMATION | |
362 | # define wxUSE_OLE_AUTOMATION 0 | |
363 | # endif | |
364 | # endif | |
a1f48575 VZ |
365 | #endif /* !wxUSE_OLE */ |
366 | ||
367 | #if !wxUSE_ACTIVEX | |
368 | # if wxUSE_MEDIACTRL | |
369 | # ifdef wxABORT_ON_CONFIG_ERROR | |
370 | # error "wxMediaCtl requires wxActiveXContainer" | |
371 | # else | |
372 | # undef wxUSE_MEDIACTRL | |
373 | # define wxUSE_MEDIACTRL 0 | |
374 | # endif | |
375 | # endif | |
376 | #endif /* !wxUSE_ACTIVEX */ | |
42ef5bda | 377 | |
5e7f00a1 | 378 | #endif /* _WX_MSW_CHKCONF_H_ */ |