]>
Commit | Line | Data |
---|---|---|
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 | |
9 | * Licence: wxWindows licence | |
10 | */ | |
11 | ||
12 | /* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */ | |
13 | ||
14 | #ifndef _WX_MSW_CHKCONF_H_ | |
15 | #define _WX_MSW_CHKCONF_H_ | |
16 | ||
17 | /* ensure that MSW-specific settings are defined */ | |
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 | ||
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 | ||
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) */ | |
49 | ||
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) */ | |
57 | ||
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 | ||
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) */ | |
73 | ||
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 | ||
82 | #ifndef wxUSE_UNICODE_MSLU | |
83 | # ifdef wxABORT_ON_CONFIG_ERROR | |
84 | # error "wxUSE_UNICODE_MSLU must be defined." | |
85 | # else | |
86 | # define wxUSE_UNICODE_MSLU 0 | |
87 | # endif | |
88 | #endif /* wxUSE_UNICODE_MSLU */ | |
89 | ||
90 | #ifndef wxUSE_UXTHEME | |
91 | # ifdef wxABORT_ON_CONFIG_ERROR | |
92 | # error "wxUSE_UXTHEME must be defined." | |
93 | # else | |
94 | # define wxUSE_UXTHEME 0 | |
95 | # endif | |
96 | #endif /* wxUSE_UXTHEME */ | |
97 | ||
98 | /* | |
99 | * We don't want to give an error if wxUSE_UNICODE_MSLU is enabled but | |
100 | * wxUSE_UNICODE is not as this would make it impossible to simply set the | |
101 | * former in wx/setup.h as then the library wouldn't compile in non-Unicode | |
102 | * configurations, so instead simply unset it silently when it doesn't make | |
103 | * sense. | |
104 | */ | |
105 | #if wxUSE_UNICODE_MSLU && !wxUSE_UNICODE | |
106 | # undef wxUSE_UNICODE_MSLU | |
107 | # define wxUSE_UNICODE_MSLU 0 | |
108 | #endif | |
109 | ||
110 | ||
111 | /* | |
112 | * disable the settings which don't work for some compilers | |
113 | */ | |
114 | ||
115 | #ifndef wxUSE_NORLANDER_HEADERS | |
116 | # if ( wxCHECK_WATCOM_VERSION(1,0) || defined(__WINE__) ) || \ | |
117 | ((defined(__MINGW32__) || defined(__CYGWIN__)) && ((__GNUC__>2) ||((__GNUC__==2) && (__GNUC_MINOR__>=95)))) | |
118 | # define wxUSE_NORLANDER_HEADERS 1 | |
119 | # else | |
120 | # define wxUSE_NORLANDER_HEADERS 0 | |
121 | # endif | |
122 | #endif | |
123 | ||
124 | /* | |
125 | * All of the settings below require SEH support (__try/__catch) and can't work | |
126 | * without it. | |
127 | */ | |
128 | #if !defined(_MSC_VER) && \ | |
129 | (!defined(__BORLANDC__) || __BORLANDC__ < 0x0550) | |
130 | # undef wxUSE_ON_FATAL_EXCEPTION | |
131 | # define wxUSE_ON_FATAL_EXCEPTION 0 | |
132 | ||
133 | # undef wxUSE_CRASHREPORT | |
134 | # define wxUSE_CRASHREPORT 0 | |
135 | ||
136 | # undef wxUSE_STACKWALKER | |
137 | # define wxUSE_STACKWALKER 0 | |
138 | #endif /* compiler doesn't support SEH */ | |
139 | ||
140 | /* wxUSE_DEBUG_NEW_ALWAYS doesn't work with CodeWarrior */ | |
141 | #if defined(__MWERKS__) | |
142 | # undef wxUSE_DEBUG_NEW_ALWAYS | |
143 | # define wxUSE_DEBUG_NEW_ALWAYS 0 | |
144 | #endif | |
145 | ||
146 | #if defined(__GNUWIN32__) | |
147 | /* These don't work as expected for mingw32 and cygwin32 */ | |
148 | # undef wxUSE_MEMORY_TRACING | |
149 | # define wxUSE_MEMORY_TRACING 0 | |
150 | ||
151 | # undef wxUSE_GLOBAL_MEMORY_OPERATORS | |
152 | # define wxUSE_GLOBAL_MEMORY_OPERATORS 0 | |
153 | ||
154 | # undef wxUSE_DEBUG_NEW_ALWAYS | |
155 | # define wxUSE_DEBUG_NEW_ALWAYS 0 | |
156 | ||
157 | /* some Cygwin versions don't have wcslen */ | |
158 | # if defined(__CYGWIN__) || defined(__CYGWIN32__) | |
159 | # if ! ((__GNUC__>2) ||((__GNUC__==2) && (__GNUC_MINOR__>=95))) | |
160 | # undef wxUSE_WCHAR_T | |
161 | # define wxUSE_WCHAR_T 0 | |
162 | # endif | |
163 | #endif | |
164 | ||
165 | #endif /* __GNUWIN32__ */ | |
166 | ||
167 | /* wxUSE_MFC is not defined when using configure as it doesn't make sense for | |
168 | gcc or mingw32 anyhow */ | |
169 | #ifndef wxUSE_MFC | |
170 | #define wxUSE_MFC 0 | |
171 | #endif /* !defined(wxUSE_MFC) */ | |
172 | ||
173 | /* MFC duplicates these operators */ | |
174 | #if wxUSE_MFC | |
175 | # undef wxUSE_GLOBAL_MEMORY_OPERATORS | |
176 | # define wxUSE_GLOBAL_MEMORY_OPERATORS 0 | |
177 | ||
178 | # undef wxUSE_DEBUG_NEW_ALWAYS | |
179 | # define wxUSE_DEBUG_NEW_ALWAYS 0 | |
180 | #endif /* wxUSE_MFC */ | |
181 | ||
182 | #if (defined(__GNUWIN32__) && !wxUSE_NORLANDER_HEADERS) | |
183 | /* GnuWin32 doesn't have appropriate headers for e.g. IUnknown. */ | |
184 | # undef wxUSE_DRAG_AND_DROP | |
185 | # define wxUSE_DRAG_AND_DROP 0 | |
186 | #endif | |
187 | ||
188 | #if !wxUSE_OWNER_DRAWN && !defined(__WXUNIVERSAL__) | |
189 | # undef wxUSE_CHECKLISTBOX | |
190 | # define wxUSE_CHECKLISTBOX 0 | |
191 | #endif | |
192 | ||
193 | #if wxUSE_SPINCTRL | |
194 | # if !wxUSE_SPINBTN | |
195 | # ifdef wxABORT_ON_CONFIG_ERROR | |
196 | # error "wxSpinCtrl requires wxSpinButton on MSW" | |
197 | # else | |
198 | # undef wxUSE_SPINBTN | |
199 | # define wxUSE_SPINBTN 1 | |
200 | # endif | |
201 | # endif | |
202 | #endif | |
203 | ||
204 | /* | |
205 | Win64-specific checks. | |
206 | */ | |
207 | #ifdef __WIN64__ | |
208 | # if wxUSE_STACKWALKER | |
209 | /* this is not currently supported under Win64, volunteers needed to | |
210 | make it work */ | |
211 | # undef wxUSE_STACKWALKER | |
212 | # define wxUSE_STACKWALKER 0 | |
213 | ||
214 | # undef wxUSE_CRASHREPORT | |
215 | # define wxUSE_CRASHREPORT 0 | |
216 | # endif | |
217 | #endif /* __WIN64__ */ | |
218 | ||
219 | ||
220 | /* | |
221 | Compiler-specific checks. | |
222 | */ | |
223 | #if defined(__BORLANDC__) && (__BORLANDC__ < 0x500) | |
224 | /* BC++ 4.0 can't compile JPEG library */ | |
225 | # undef wxUSE_LIBJPEG | |
226 | # define wxUSE_LIBJPEG 0 | |
227 | #endif | |
228 | ||
229 | /* wxUSE_DEBUG_NEW_ALWAYS = 1 not compatible with BC++ in DLL mode */ | |
230 | #if defined(__BORLANDC__) && (defined(WXMAKINGDLL) || defined(WXUSINGDLL)) | |
231 | # undef wxUSE_DEBUG_NEW_ALWAYS | |
232 | # define wxUSE_DEBUG_NEW_ALWAYS 0 | |
233 | #endif | |
234 | ||
235 | /* DMC++ doesn't have definitions for date picker control, so use generic control | |
236 | */ | |
237 | #ifdef __DMC__ | |
238 | # if wxUSE_DATEPICKCTRL | |
239 | # undef wxUSE_DATEPICKCTRL_GENERIC | |
240 | # undef wxUSE_DATEPICKCTRL | |
241 | # endif | |
242 | # define wxUSE_DATEPICKCTRL 0 | |
243 | # define wxUSE_DATEPICKCTRL_GENERIC 1 | |
244 | #endif | |
245 | ||
246 | ||
247 | ||
248 | /* | |
249 | un/redefine the options which we can't compile (after checking that they're | |
250 | defined | |
251 | */ | |
252 | #ifdef __WINE__ | |
253 | # if wxUSE_ACTIVEX | |
254 | # undef wxUSE_ACTIVEX | |
255 | # define wxUSE_ACTIVEX 0 | |
256 | # endif /* wxUSE_ACTIVEX */ | |
257 | ||
258 | # if wxUSE_UNICODE_MSLU | |
259 | # undef wxUSE_UNICODE_MSLU | |
260 | # define wxUSE_UNICODE_MSLU 0 | |
261 | # endif /* wxUSE_UNICODE_MSLU */ | |
262 | #endif /* __WINE__ */ | |
263 | ||
264 | ||
265 | /* check settings consistency for MSW-specific ones */ | |
266 | #if wxUSE_CRASHREPORT && !wxUSE_ON_FATAL_EXCEPTION | |
267 | # ifdef wxABORT_ON_CONFIG_ERROR | |
268 | # error "wxUSE_CRASHREPORT requires wxUSE_ON_FATAL_EXCEPTION" | |
269 | # else | |
270 | # undef wxUSE_CRASHREPORT | |
271 | # define wxUSE_CRASHREPORT 0 | |
272 | # endif | |
273 | #endif /* wxUSE_CRASHREPORT */ | |
274 | ||
275 | #if !wxUSE_VARIANT | |
276 | # if wxUSE_ACTIVEX | |
277 | # ifdef wxABORT_ON_CONFIG_ERROR | |
278 | # error "wxActiveXContainer requires wxVariant" | |
279 | # else | |
280 | # undef wxUSE_ACTIVEX | |
281 | # define wxUSE_ACTIVEX 0 | |
282 | # endif | |
283 | # endif | |
284 | ||
285 | # if wxUSE_OLE_AUTOMATION | |
286 | # ifdef wxABORT_ON_CONFIG_ERROR | |
287 | # error "wxAutomationObject requires wxVariant" | |
288 | # else | |
289 | # undef wxUSE_OLE_AUTOMATION | |
290 | # define wxUSE_OLE_AUTOMATION 0 | |
291 | # endif | |
292 | # endif | |
293 | #endif /* !wxUSE_VARIANT */ | |
294 | ||
295 | #if !wxUSE_DYNAMIC_LOADER | |
296 | # if wxUSE_MS_HTML_HELP | |
297 | # ifdef wxABORT_ON_CONFIG_ERROR | |
298 | # error "wxUSE_MS_HTML_HELP requires wxUSE_DYNAMIC_LOADER." | |
299 | # else | |
300 | # undef wxUSE_MS_HTML_HELP | |
301 | # define wxUSE_MS_HTML_HELP 0 | |
302 | # endif | |
303 | # endif | |
304 | # if wxUSE_DIALUP_MANAGER | |
305 | # ifdef wxABORT_ON_CONFIG_ERROR | |
306 | # error "wxUSE_DIALUP_MANAGER requires wxUSE_DYNAMIC_LOADER." | |
307 | # else | |
308 | # undef wxUSE_DIALUP_MANAGER | |
309 | # define wxUSE_DIALUP_MANAGER 0 | |
310 | # endif | |
311 | # endif | |
312 | #endif /* !wxUSE_DYNAMIC_LOADER */ | |
313 | ||
314 | #if !wxUSE_DYNLIB_CLASS | |
315 | # if wxUSE_UXTHEME | |
316 | # ifdef wxABORT_ON_CONFIG_ERROR | |
317 | # error "wxUSE_UXTHEME requires wxUSE_DYNLIB_CLASS" | |
318 | # else | |
319 | # undef wxUSE_UXTHEME | |
320 | # define wxUSE_UXTHEME 0 | |
321 | # endif | |
322 | # endif | |
323 | # if wxUSE_MEDIACTRL | |
324 | # ifdef wxABORT_ON_CONFIG_ERROR | |
325 | # error "wxUSE_MEDIACTRL requires wxUSE_DYNLIB_CLASS" | |
326 | # else | |
327 | # undef wxUSE_MEDIACTRL | |
328 | # define wxUSE_MEDIACTRL 0 | |
329 | # endif | |
330 | # endif | |
331 | # if wxUSE_INKEDIT | |
332 | # ifdef wxABORT_ON_CONFIG_ERROR | |
333 | # error "wxUSE_INKEDIT requires wxUSE_DYNLIB_CLASS" | |
334 | # else | |
335 | # undef wxUSE_INKEDIT | |
336 | # define wxUSE_INKEDIT 0 | |
337 | # endif | |
338 | # endif | |
339 | #endif /* !wxUSE_DYNLIB_CLASS */ | |
340 | ||
341 | #if !wxUSE_OLE | |
342 | # if wxUSE_ACTIVEX | |
343 | # ifdef wxABORT_ON_CONFIG_ERROR | |
344 | # error "wxActiveXContainer requires wxUSE_OLE" | |
345 | # else | |
346 | # undef wxUSE_ACTIVEX | |
347 | # define wxUSE_ACTIVEX 0 | |
348 | # endif | |
349 | # endif | |
350 | ||
351 | # if wxUSE_DATAOBJ | |
352 | # ifdef wxABORT_ON_CONFIG_ERROR | |
353 | # error "wxUSE_DATAOBJ requires wxUSE_OLE" | |
354 | # else | |
355 | # undef wxUSE_DATAOBJ | |
356 | # define wxUSE_DATAOBJ 0 | |
357 | # endif | |
358 | # endif | |
359 | ||
360 | # if wxUSE_OLE_AUTOMATION | |
361 | # ifdef wxABORT_ON_CONFIG_ERROR | |
362 | # error "wxAutomationObject requires wxUSE_OLE" | |
363 | # else | |
364 | # undef wxUSE_OLE_AUTOMATION | |
365 | # define wxUSE_OLE_AUTOMATION 0 | |
366 | # endif | |
367 | # endif | |
368 | #endif /* !wxUSE_OLE */ | |
369 | ||
370 | #if !wxUSE_ACTIVEX | |
371 | # if wxUSE_MEDIACTRL | |
372 | # ifdef wxABORT_ON_CONFIG_ERROR | |
373 | # error "wxMediaCtl requires wxActiveXContainer" | |
374 | # else | |
375 | # undef wxUSE_MEDIACTRL | |
376 | # define wxUSE_MEDIACTRL 0 | |
377 | # endif | |
378 | # endif | |
379 | #endif /* !wxUSE_ACTIVEX */ | |
380 | ||
381 | #if defined(__WXUNIVERSAL__) && wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW && !wxUSE_POSTSCRIPT | |
382 | # undef wxUSE_POSTSCRIPT | |
383 | # define wxUSE_POSTSCRIPT 1 | |
384 | #endif | |
385 | ||
386 | #endif /* _WX_MSW_CHKCONF_H_ */ |