]> git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/chkconf.h
no changes, just remove #if'd out code
[wxWidgets.git] / include / wx / msw / chkconf.h
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_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
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
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
116 #endif
117
118
119 /*
120 * disable the settings which don't work for some compilers
121 */
122
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
130 #endif
131
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
142 /*
143 * All of the settings below require SEH support (__try/__catch) and can't work
144 * without it.
145 */
146 #if !defined(_MSC_VER) && \
147 (!defined(__BORLANDC__) || __BORLANDC__ < 0x0550)
148 # undef wxUSE_ON_FATAL_EXCEPTION
149 # define wxUSE_ON_FATAL_EXCEPTION 0
150
151 # undef wxUSE_CRASHREPORT
152 # define wxUSE_CRASHREPORT 0
153
154 # undef wxUSE_STACKWALKER
155 # define wxUSE_STACKWALKER 0
156 #endif /* compiler doesn't support SEH */
157
158 /* wxUSE_DEBUG_NEW_ALWAYS doesn't work with CodeWarrior */
159 #if defined(__MWERKS__)
160 # undef wxUSE_DEBUG_NEW_ALWAYS
161 # define wxUSE_DEBUG_NEW_ALWAYS 0
162 #endif
163
164 #if defined(__GNUWIN32__)
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
174
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
181 #endif
182
183 #endif /* __GNUWIN32__ */
184
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
191 /* MFC duplicates these operators */
192 #if wxUSE_MFC
193 # undef wxUSE_GLOBAL_MEMORY_OPERATORS
194 # define wxUSE_GLOBAL_MEMORY_OPERATORS 0
195
196 # undef wxUSE_DEBUG_NEW_ALWAYS
197 # define wxUSE_DEBUG_NEW_ALWAYS 0
198 #endif /* wxUSE_MFC */
199
200 #if (defined(__GNUWIN32__) && !wxUSE_NORLANDER_HEADERS)
201 /* GnuWin32 doesn't have appropriate headers for e.g. IUnknown. */
202 # undef wxUSE_DRAG_AND_DROP
203 # define wxUSE_DRAG_AND_DROP 0
204 #endif
205
206 #if !wxUSE_OWNER_DRAWN && !defined(__WXUNIVERSAL__)
207 # undef wxUSE_CHECKLISTBOX
208 # define wxUSE_CHECKLISTBOX 0
209 #endif
210
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
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 */
241
242 // Borland
243 #ifdef __BORLANDC__
244
245 #if __BORLANDC__ < 0x500
246 /* BC++ 4.0 can't compile JPEG library */
247 # undef wxUSE_LIBJPEG
248 # define wxUSE_LIBJPEG 0
249 #endif
250
251 /* wxUSE_DEBUG_NEW_ALWAYS = 1 not compatible with BC++ in DLL mode */
252 #if defined(WXMAKINGDLL) || defined(WXUSINGDLL)
253 # undef wxUSE_DEBUG_NEW_ALWAYS
254 # define wxUSE_DEBUG_NEW_ALWAYS 0
255 #endif
256
257 /* compiling src/msw/gdiplus.cpp results in "macro expansion too long" error */
258 #undef wxUSE_GRAPHICS_CONTEXT
259 #define wxUSE_GRAPHICS_CONTEXT 0
260
261 #endif /* __BORLANDC__ */
262
263 /* DMC++ doesn't have definitions for date picker control, so use generic control
264 */
265 #ifdef __DMC__
266 # if wxUSE_DATEPICKCTRL
267 # undef wxUSE_DATEPICKCTRL_GENERIC
268 # undef wxUSE_DATEPICKCTRL
269 # endif
270 # define wxUSE_DATEPICKCTRL 0
271 # define wxUSE_DATEPICKCTRL_GENERIC 1
272 #endif
273
274
275
276 /*
277 un/redefine the options which we can't compile (after checking that they're
278 defined
279 */
280 #ifdef __WINE__
281 # if wxUSE_ACTIVEX
282 # undef wxUSE_ACTIVEX
283 # define wxUSE_ACTIVEX 0
284 # endif /* wxUSE_ACTIVEX */
285
286 # if wxUSE_UNICODE_MSLU
287 # undef wxUSE_UNICODE_MSLU
288 # define wxUSE_UNICODE_MSLU 0
289 # endif /* wxUSE_UNICODE_MSLU */
290 #endif /* __WINE__ */
291
292
293 /* check settings consistency for MSW-specific ones */
294 #if wxUSE_CRASHREPORT && !wxUSE_ON_FATAL_EXCEPTION
295 # ifdef wxABORT_ON_CONFIG_ERROR
296 # error "wxUSE_CRASHREPORT requires wxUSE_ON_FATAL_EXCEPTION"
297 # else
298 # undef wxUSE_CRASHREPORT
299 # define wxUSE_CRASHREPORT 0
300 # endif
301 #endif /* wxUSE_CRASHREPORT */
302
303 #if !wxUSE_VARIANT
304 # if wxUSE_ACTIVEX
305 # ifdef wxABORT_ON_CONFIG_ERROR
306 # error "wxActiveXContainer requires wxVariant"
307 # else
308 # undef wxUSE_ACTIVEX
309 # define wxUSE_ACTIVEX 0
310 # endif
311 # endif
312
313 # if wxUSE_OLE_AUTOMATION
314 # ifdef wxABORT_ON_CONFIG_ERROR
315 # error "wxAutomationObject requires wxVariant"
316 # else
317 # undef wxUSE_OLE_AUTOMATION
318 # define wxUSE_OLE_AUTOMATION 0
319 # endif
320 # endif
321 #endif /* !wxUSE_VARIANT */
322
323 #if !wxUSE_DYNAMIC_LOADER
324 # if wxUSE_MS_HTML_HELP
325 # ifdef wxABORT_ON_CONFIG_ERROR
326 # error "wxUSE_MS_HTML_HELP requires wxUSE_DYNAMIC_LOADER."
327 # else
328 # undef wxUSE_MS_HTML_HELP
329 # define wxUSE_MS_HTML_HELP 0
330 # endif
331 # endif
332 # if wxUSE_DIALUP_MANAGER
333 # ifdef wxABORT_ON_CONFIG_ERROR
334 # error "wxUSE_DIALUP_MANAGER requires wxUSE_DYNAMIC_LOADER."
335 # else
336 # undef wxUSE_DIALUP_MANAGER
337 # define wxUSE_DIALUP_MANAGER 0
338 # endif
339 # endif
340 #endif /* !wxUSE_DYNAMIC_LOADER */
341
342 #if !wxUSE_DYNLIB_CLASS
343 # if wxUSE_UXTHEME
344 # ifdef wxABORT_ON_CONFIG_ERROR
345 # error "wxUSE_UXTHEME requires wxUSE_DYNLIB_CLASS"
346 # else
347 # undef wxUSE_UXTHEME
348 # define wxUSE_UXTHEME 0
349 # endif
350 # endif
351 # if wxUSE_MEDIACTRL
352 # ifdef wxABORT_ON_CONFIG_ERROR
353 # error "wxUSE_MEDIACTRL requires wxUSE_DYNLIB_CLASS"
354 # else
355 # undef wxUSE_MEDIACTRL
356 # define wxUSE_MEDIACTRL 0
357 # endif
358 # endif
359 # if wxUSE_INKEDIT
360 # ifdef wxABORT_ON_CONFIG_ERROR
361 # error "wxUSE_INKEDIT requires wxUSE_DYNLIB_CLASS"
362 # else
363 # undef wxUSE_INKEDIT
364 # define wxUSE_INKEDIT 0
365 # endif
366 # endif
367 #endif /* !wxUSE_DYNLIB_CLASS */
368
369 #if !wxUSE_OLE
370 # if wxUSE_ACTIVEX
371 # ifdef wxABORT_ON_CONFIG_ERROR
372 # error "wxActiveXContainer requires wxUSE_OLE"
373 # else
374 # undef wxUSE_ACTIVEX
375 # define wxUSE_ACTIVEX 0
376 # endif
377 # endif
378
379 # if wxUSE_DATAOBJ
380 # ifdef wxABORT_ON_CONFIG_ERROR
381 # error "wxUSE_DATAOBJ requires wxUSE_OLE"
382 # else
383 # undef wxUSE_DATAOBJ
384 # define wxUSE_DATAOBJ 0
385 # endif
386 # endif
387
388 # if wxUSE_OLE_AUTOMATION
389 # ifdef wxABORT_ON_CONFIG_ERROR
390 # error "wxAutomationObject requires wxUSE_OLE"
391 # else
392 # undef wxUSE_OLE_AUTOMATION
393 # define wxUSE_OLE_AUTOMATION 0
394 # endif
395 # endif
396 #endif /* !wxUSE_OLE */
397
398 #if !wxUSE_ACTIVEX
399 # if wxUSE_MEDIACTRL
400 # ifdef wxABORT_ON_CONFIG_ERROR
401 # error "wxMediaCtl requires wxActiveXContainer"
402 # else
403 # undef wxUSE_MEDIACTRL
404 # define wxUSE_MEDIACTRL 0
405 # endif
406 # endif
407 #endif /* !wxUSE_ACTIVEX */
408
409 #if defined(__WXUNIVERSAL__) && wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW && !wxUSE_POSTSCRIPT
410 # undef wxUSE_POSTSCRIPT
411 # define wxUSE_POSTSCRIPT 1
412 #endif
413
414 /*
415 Currently only recent MSVC compilers can build the new events code under
416 Windows.
417 */
418 #if !wxEVENTS_COMPATIBILITY_2_8
419 # if !wxCHECK_VISUALC_VERSION(7)
420 # undef wxEVENTS_COMPATIBILITY_2_8
421 # define wxEVENTS_COMPATIBILITY_2_8 1
422 # endif
423 #endif
424
425 #endif /* _WX_MSW_CHKCONF_H_ */