]>
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_OLE | |
59 | # ifdef wxABORT_ON_CONFIG_ERROR | |
60 | # error "wxUSE_OLE must be defined." | |
61 | # else | |
62 | # define wxUSE_OLE 0 | |
63 | # endif | |
64 | #endif /* !defined(wxUSE_OLE) */ | |
65 | ||
66 | #ifndef wxUSE_OLE_AUTOMATION | |
67 | # ifdef wxABORT_ON_CONFIG_ERROR | |
68 | # error "wxUSE_OLE_AUTOMATION must be defined." | |
69 | # else | |
70 | # define wxUSE_OLE_AUTOMATION 0 | |
71 | # endif | |
72 | #endif /* !defined(wxUSE_OLE_AUTOMATION) */ | |
73 | ||
74 | #ifndef wxUSE_UNICODE_MSLU | |
75 | # ifdef wxABORT_ON_CONFIG_ERROR | |
76 | # error "wxUSE_UNICODE_MSLU must be defined." | |
77 | # else | |
78 | # define wxUSE_UNICODE_MSLU 0 | |
79 | # endif | |
80 | #endif /* wxUSE_UNICODE_MSLU */ | |
81 | ||
82 | #ifndef wxUSE_UXTHEME | |
83 | # ifdef wxABORT_ON_CONFIG_ERROR | |
84 | # error "wxUSE_UXTHEME must be defined." | |
85 | # else | |
86 | # define wxUSE_UXTHEME 0 | |
87 | # endif | |
88 | #endif /* wxUSE_UXTHEME */ | |
89 | ||
90 | /* | |
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 | |
95 | * sense. | |
96 | */ | |
97 | #if wxUSE_UNICODE_MSLU && !wxUSE_UNICODE | |
98 | # undef wxUSE_UNICODE_MSLU | |
99 | # define wxUSE_UNICODE_MSLU 0 | |
100 | #endif | |
101 | ||
102 | ||
103 | /* | |
104 | * disable the settings which don't work for some compilers | |
105 | */ | |
106 | ||
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 | |
111 | # else | |
112 | # define wxUSE_NORLANDER_HEADERS 0 | |
113 | # endif | |
114 | #endif | |
115 | ||
116 | /* | |
117 | * All of the settings below require SEH support (__try/__catch) and can't work | |
118 | * without it. | |
119 | */ | |
120 | #if !defined(_MSC_VER) && \ | |
121 | (!defined(__BORLANDC__) || __BORLANDC__ < 0x0550) | |
122 | # undef wxUSE_ON_FATAL_EXCEPTION | |
123 | # define wxUSE_ON_FATAL_EXCEPTION 0 | |
124 | ||
125 | # undef wxUSE_CRASHREPORT | |
126 | # define wxUSE_CRASHREPORT 0 | |
127 | ||
128 | # undef wxUSE_STACKWALKER | |
129 | # define wxUSE_STACKWALKER 0 | |
130 | #endif /* compiler doesn't support SEH */ | |
131 | ||
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 | |
136 | #endif | |
137 | ||
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 | |
142 | ||
143 | # undef wxUSE_GLOBAL_MEMORY_OPERATORS | |
144 | # define wxUSE_GLOBAL_MEMORY_OPERATORS 0 | |
145 | ||
146 | # undef wxUSE_DEBUG_NEW_ALWAYS | |
147 | # define wxUSE_DEBUG_NEW_ALWAYS 0 | |
148 | ||
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 | |
154 | # endif | |
155 | #endif | |
156 | ||
157 | #endif /* __GNUWIN32__ */ | |
158 | ||
159 | /* wxUSE_MFC is not defined when using configure as it doesn't make sense for | |
160 | gcc or mingw32 anyhow */ | |
161 | #ifndef wxUSE_MFC | |
162 | #define wxUSE_MFC 0 | |
163 | #endif /* !defined(wxUSE_MFC) */ | |
164 | ||
165 | /* MFC duplicates these operators */ | |
166 | #if wxUSE_MFC | |
167 | # undef wxUSE_GLOBAL_MEMORY_OPERATORS | |
168 | # define wxUSE_GLOBAL_MEMORY_OPERATORS 0 | |
169 | ||
170 | # undef wxUSE_DEBUG_NEW_ALWAYS | |
171 | # define wxUSE_DEBUG_NEW_ALWAYS 0 | |
172 | #endif /* wxUSE_MFC */ | |
173 | ||
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 | |
178 | #endif | |
179 | ||
180 | #if !wxUSE_OWNER_DRAWN && !defined(__WXUNIVERSAL__) | |
181 | # undef wxUSE_CHECKLISTBOX | |
182 | # define wxUSE_CHECKLISTBOX 0 | |
183 | #endif | |
184 | ||
185 | #if wxUSE_SPINCTRL | |
186 | # if !wxUSE_SPINBTN | |
187 | # ifdef wxABORT_ON_CONFIG_ERROR | |
188 | # error "wxSpinCtrl requires wxSpinButton on MSW" | |
189 | # else | |
190 | # undef wxUSE_SPINBTN | |
191 | # define wxUSE_SPINBTN 1 | |
192 | # endif | |
193 | # endif | |
194 | #endif | |
195 | ||
196 | /* | |
197 | Win64-specific checks. | |
198 | */ | |
199 | #ifdef __WIN64__ | |
200 | # if wxUSE_STACKWALKER | |
201 | /* this is not currently supported under Win64, volunteers needed to | |
202 | make it work */ | |
203 | # undef wxUSE_STACKWALKER | |
204 | # define wxUSE_STACKWALKER 0 | |
205 | ||
206 | # undef wxUSE_CRASHREPORT | |
207 | # define wxUSE_CRASHREPORT 0 | |
208 | # endif | |
209 | #endif /* __WIN64__ */ | |
210 | ||
211 | ||
212 | /* | |
213 | Compiler-specific checks. | |
214 | */ | |
215 | #if defined(__BORLANDC__) && (__BORLANDC__ < 0x500) | |
216 | /* BC++ 4.0 can't compile JPEG library */ | |
217 | # undef wxUSE_LIBJPEG | |
218 | # define wxUSE_LIBJPEG 0 | |
219 | #endif | |
220 | ||
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 | |
225 | #endif | |
226 | ||
227 | /* DMC++ doesn't have definitions for date picker control, so use generic control | |
228 | */ | |
229 | #ifdef __DMC__ | |
230 | # if wxUSE_DATEPICKCTRL | |
231 | # undef wxUSE_DATEPICKCTRL_GENERIC | |
232 | # undef wxUSE_DATEPICKCTRL | |
233 | # endif | |
234 | # define wxUSE_DATEPICKCTRL 0 | |
235 | # define wxUSE_DATEPICKCTRL_GENERIC 1 | |
236 | #endif | |
237 | ||
238 | ||
239 | ||
240 | /* | |
241 | un/redefine the options which we can't compile (after checking that they're | |
242 | defined | |
243 | */ | |
244 | #ifdef __WINE__ | |
245 | # if wxUSE_ACTIVEX | |
246 | # undef wxUSE_ACTIVEX | |
247 | # define wxUSE_ACTIVEX 0 | |
248 | # endif /* wxUSE_ACTIVEX */ | |
249 | ||
250 | # if wxUSE_UNICODE_MSLU | |
251 | # undef wxUSE_UNICODE_MSLU | |
252 | # define wxUSE_UNICODE_MSLU 0 | |
253 | # endif /* wxUSE_UNICODE_MSLU */ | |
254 | #endif /* __WINE__ */ | |
255 | ||
256 | ||
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" | |
261 | # else | |
262 | # undef wxUSE_CRASHREPORT | |
263 | # define wxUSE_CRASHREPORT 0 | |
264 | # endif | |
265 | #endif /* wxUSE_CRASHREPORT */ | |
266 | ||
267 | #if !wxUSE_VARIANT | |
268 | # if wxUSE_ACTIVEX | |
269 | # ifdef wxABORT_ON_CONFIG_ERROR | |
270 | # error "wxActiveXContainer requires wxVariant" | |
271 | # else | |
272 | # undef wxUSE_ACTIVEX | |
273 | # define wxUSE_ACTIVEX 0 | |
274 | # endif | |
275 | # endif | |
276 | ||
277 | # if wxUSE_OLE_AUTOMATION | |
278 | # ifdef wxABORT_ON_CONFIG_ERROR | |
279 | # error "wxAutomationObject requires wxVariant" | |
280 | # else | |
281 | # undef wxUSE_OLE_AUTOMATION | |
282 | # define wxUSE_OLE_AUTOMATION 0 | |
283 | # endif | |
284 | # endif | |
285 | #endif /* !wxUSE_VARIANT */ | |
286 | ||
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." | |
291 | # else | |
292 | # undef wxUSE_MS_HTML_HELP | |
293 | # define wxUSE_MS_HTML_HELP 0 | |
294 | # endif | |
295 | # endif | |
296 | # if wxUSE_DIALUP_MANAGER | |
297 | # ifdef wxABORT_ON_CONFIG_ERROR | |
298 | # error "wxUSE_DIALUP_MANAGER requires wxUSE_DYNAMIC_LOADER." | |
299 | # else | |
300 | # undef wxUSE_DIALUP_MANAGER | |
301 | # define wxUSE_DIALUP_MANAGER 0 | |
302 | # endif | |
303 | # endif | |
304 | #endif /* !wxUSE_DYNAMIC_LOADER */ | |
305 | ||
306 | #if !wxUSE_DYNLIB_CLASS | |
307 | # if wxUSE_UXTHEME | |
308 | # ifdef wxABORT_ON_CONFIG_ERROR | |
309 | # error "wxUSE_UXTHEME requires wxUSE_DYNLIB_CLASS" | |
310 | # else | |
311 | # undef wxUSE_UXTHEME | |
312 | # define wxUSE_UXTHEME 0 | |
313 | # endif | |
314 | # endif | |
315 | # if wxUSE_MEDIACTRL | |
316 | # ifdef wxABORT_ON_CONFIG_ERROR | |
317 | # error "wxUSE_MEDIACTRL requires wxUSE_DYNLIB_CLASS" | |
318 | # else | |
319 | # undef wxUSE_MEDIACTRL | |
320 | # define wxUSE_MEDIACTRL 0 | |
321 | # endif | |
322 | # endif | |
323 | # if wxUSE_INKEDIT | |
324 | # ifdef wxABORT_ON_CONFIG_ERROR | |
325 | # error "wxUSE_INKEDIT requires wxUSE_DYNLIB_CLASS" | |
326 | # else | |
327 | # undef wxUSE_INKEDIT | |
328 | # define wxUSE_INKEDIT 0 | |
329 | # endif | |
330 | # endif | |
331 | #endif /* !wxUSE_DYNLIB_CLASS */ | |
332 | ||
333 | #if !wxUSE_OLE | |
334 | # if wxUSE_ACTIVEX | |
335 | # ifdef wxABORT_ON_CONFIG_ERROR | |
336 | # error "wxActiveXContainer requires wxUSE_OLE" | |
337 | # else | |
338 | # undef wxUSE_ACTIVEX | |
339 | # define wxUSE_ACTIVEX 0 | |
340 | # endif | |
341 | # endif | |
342 | ||
343 | # if wxUSE_DATAOBJ | |
344 | # ifdef wxABORT_ON_CONFIG_ERROR | |
345 | # error "wxUSE_DATAOBJ requires wxUSE_OLE" | |
346 | # else | |
347 | # undef wxUSE_DATAOBJ | |
348 | # define wxUSE_DATAOBJ 0 | |
349 | # endif | |
350 | # endif | |
351 | ||
352 | # if wxUSE_OLE_AUTOMATION | |
353 | # ifdef wxABORT_ON_CONFIG_ERROR | |
354 | # error "wxAutomationObject requires wxUSE_OLE" | |
355 | # else | |
356 | # undef wxUSE_OLE_AUTOMATION | |
357 | # define wxUSE_OLE_AUTOMATION 0 | |
358 | # endif | |
359 | # endif | |
360 | #endif /* !wxUSE_OLE */ | |
361 | ||
362 | #if !wxUSE_ACTIVEX | |
363 | # if wxUSE_MEDIACTRL | |
364 | # ifdef wxABORT_ON_CONFIG_ERROR | |
365 | # error "wxMediaCtl requires wxActiveXContainer" | |
366 | # else | |
367 | # undef wxUSE_MEDIACTRL | |
368 | # define wxUSE_MEDIACTRL 0 | |
369 | # endif | |
370 | # endif | |
371 | #endif /* !wxUSE_ACTIVEX */ | |
372 | ||
373 | #if defined(__WXUNIVERSAL__) && wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW && !wxUSE_POSTSCRIPT | |
374 | # undef wxUSE_POSTSCRIPT | |
375 | # define wxUSE_POSTSCRIPT 1 | |
376 | #endif | |
377 | ||
378 | #endif /* _WX_MSW_CHKCONF_H_ */ |