]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/chkconf.h
don't use min() macro in wxQsort() which conflicts with the one from windows.h
[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 17/* ensure that MSW-specific settings are defined */
07b1232d
VZ
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
74987083
VZ
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
07b1232d
VZ
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) */
74987083 49
07b1232d
VZ
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) */
01ebf752 57
07b1232d
VZ
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) */
12bdd77c 65
07b1232d
VZ
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
820a7a1b
VZ
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
219b657f
JS
100#endif
101
07b1232d 102
219b657f 103/*
07b1232d 104 * disable the settings which don't work for some compilers
219b657f
JS
105 */
106
07b1232d
VZ
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
820a7a1b
VZ
114#endif
115
b3dfbbc9 116/*
3e3a3e17
VZ
117 * All of the settings below require SEH support (__try/__catch) and can't work
118 * without it.
b3dfbbc9 119 */
3e3a3e17
VZ
120#if !defined(_MSC_VER) && \
121 (!defined(__BORLANDC__) || __BORLANDC__ < 0x0550)
820a7a1b
VZ
122# undef wxUSE_ON_FATAL_EXCEPTION
123# define wxUSE_ON_FATAL_EXCEPTION 0
3e3a3e17 124
820a7a1b
VZ
125# undef wxUSE_CRASHREPORT
126# define wxUSE_CRASHREPORT 0
3e3a3e17 127
820a7a1b
VZ
128# undef wxUSE_STACKWALKER
129# define wxUSE_STACKWALKER 0
3b2b40b4 130#endif /* compiler doesn't support SEH */
b3dfbbc9 131
5e7f00a1 132/* wxUSE_DEBUG_NEW_ALWAYS doesn't work with CodeWarrior */
01ebf752 133#if defined(__MWERKS__)
820a7a1b
VZ
134# undef wxUSE_DEBUG_NEW_ALWAYS
135# define wxUSE_DEBUG_NEW_ALWAYS 0
01ebf752
JS
136#endif
137
138#if defined(__GNUWIN32__)
5e7f00a1
VZ
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
01ebf752 148
5e7f00a1
VZ
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
01ebf752 155#endif
5e7f00a1
VZ
156
157#endif /* __GNUWIN32__ */
01ebf752 158
16f10340
VZ
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
01ebf752
JS
165/* MFC duplicates these operators */
166#if wxUSE_MFC
5e7f00a1
VZ
167# undef wxUSE_GLOBAL_MEMORY_OPERATORS
168# define wxUSE_GLOBAL_MEMORY_OPERATORS 0
01ebf752 169
5e7f00a1
VZ
170# undef wxUSE_DEBUG_NEW_ALWAYS
171# define wxUSE_DEBUG_NEW_ALWAYS 0
172#endif /* wxUSE_MFC */
01ebf752
JS
173
174#if (defined(__GNUWIN32__) && !wxUSE_NORLANDER_HEADERS)
820a7a1b
VZ
175 /* GnuWin32 doesn't have appropriate headers for e.g. IUnknown. */
176# undef wxUSE_DRAG_AND_DROP
177# define wxUSE_DRAG_AND_DROP 0
01ebf752
JS
178#endif
179
d7bc7fec 180#if !wxUSE_OWNER_DRAWN && !defined(__WXUNIVERSAL__)
820a7a1b
VZ
181# undef wxUSE_CHECKLISTBOX
182# define wxUSE_CHECKLISTBOX 0
01ebf752
JS
183#endif
184
0e871ad0
WS
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
da98e157
VZ
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 */
01ebf752 215#if defined(__BORLANDC__) && (__BORLANDC__ < 0x500)
5e7f00a1
VZ
216 /* BC++ 4.0 can't compile JPEG library */
217# undef wxUSE_LIBJPEG
218# define wxUSE_LIBJPEG 0
01ebf752
JS
219#endif
220
221/* wxUSE_DEBUG_NEW_ALWAYS = 1 not compatible with BC++ in DLL mode */
222#if defined(__BORLANDC__) && (defined(WXMAKINGDLL) || defined(WXUSINGDLL))
5e7f00a1
VZ
223# undef wxUSE_DEBUG_NEW_ALWAYS
224# define wxUSE_DEBUG_NEW_ALWAYS 0
01ebf752
JS
225#endif
226
90a752c2
JS
227/* DMC++ doesn't have definitions for date picker control, so use generic control
228 */
90a752c2 229#ifdef __DMC__
820a7a1b
VZ
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
90a752c2
JS
236#endif
237
a1f48575 238
b55c3716 239
a1f48575
VZ
240/*
241 un/redefine the options which we can't compile (after checking that they're
242 defined
243 */
244#ifdef __WINE__
07b1232d
VZ
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 */
28efe654 254#endif /* __WINE__ */
a1f48575 255
b55c3716 256
ca5c6ac3 257/* check settings consistency for MSW-specific ones */
07b1232d
VZ
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
ca5c6ac3 267#if !wxUSE_VARIANT
a1f48575
VZ
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
ca5c6ac3
VZ
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
a1f48575 285#endif /* !wxUSE_VARIANT */
ca5c6ac3 286
b55c3716
VZ
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
63de3718 292# undef wxUSE_MS_HTML_HELP
285ba64d 293# define wxUSE_MS_HTML_HELP 0
b55c3716
VZ
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
6fbc7b59 300# undef wxUSE_DIALUP_MANAGER
285ba64d 301# define wxUSE_DIALUP_MANAGER 0
b55c3716
VZ
302# endif
303# endif
a1f48575 304#endif /* !wxUSE_DYNAMIC_LOADER */
b55c3716 305
64c288fa
JS
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
8ef51d67
JS
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
a1f48575 331#endif /* !wxUSE_DYNLIB_CLASS */
64c288fa 332
42ef5bda 333#if !wxUSE_OLE
a1f48575
VZ
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
42ef5bda
VZ
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
ca5c6ac3
VZ
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
a1f48575
VZ
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 */
42ef5bda 372
07b1232d
VZ
373#if defined(__WXUNIVERSAL__) && wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW && !wxUSE_POSTSCRIPT
374# undef wxUSE_POSTSCRIPT
375# define wxUSE_POSTSCRIPT 1
376#endif
377
5e7f00a1 378#endif /* _WX_MSW_CHKCONF_H_ */