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