]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/chkconf.h
Add doc for wxCliboard::Get
[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
61873536
VZ
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
07b1232d
VZ
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) */
12bdd77c 73
07b1232d
VZ
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
23bd008a
VZ
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
07b1232d
VZ
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
820a7a1b
VZ
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
219b657f
JS
116#endif
117
07b1232d 118
219b657f 119/*
07b1232d 120 * disable the settings which don't work for some compilers
219b657f
JS
121 */
122
07b1232d
VZ
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
820a7a1b
VZ
130#endif
131
23bd008a
VZ
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
b3dfbbc9 142/*
3e3a3e17
VZ
143 * All of the settings below require SEH support (__try/__catch) and can't work
144 * without it.
b3dfbbc9 145 */
3e3a3e17
VZ
146#if !defined(_MSC_VER) && \
147 (!defined(__BORLANDC__) || __BORLANDC__ < 0x0550)
820a7a1b
VZ
148# undef wxUSE_ON_FATAL_EXCEPTION
149# define wxUSE_ON_FATAL_EXCEPTION 0
3e3a3e17 150
820a7a1b
VZ
151# undef wxUSE_CRASHREPORT
152# define wxUSE_CRASHREPORT 0
3e3a3e17 153
820a7a1b
VZ
154# undef wxUSE_STACKWALKER
155# define wxUSE_STACKWALKER 0
3b2b40b4 156#endif /* compiler doesn't support SEH */
b3dfbbc9 157
01ebf752 158#if defined(__GNUWIN32__)
5e7f00a1
VZ
159 /* These don't work as expected for mingw32 and cygwin32 */
160# undef wxUSE_MEMORY_TRACING
161# define wxUSE_MEMORY_TRACING 0
162
163# undef wxUSE_GLOBAL_MEMORY_OPERATORS
164# define wxUSE_GLOBAL_MEMORY_OPERATORS 0
165
166# undef wxUSE_DEBUG_NEW_ALWAYS
167# define wxUSE_DEBUG_NEW_ALWAYS 0
01ebf752 168
5e7f00a1
VZ
169/* some Cygwin versions don't have wcslen */
170# if defined(__CYGWIN__) || defined(__CYGWIN32__)
171# if ! ((__GNUC__>2) ||((__GNUC__==2) && (__GNUC_MINOR__>=95)))
172# undef wxUSE_WCHAR_T
173# define wxUSE_WCHAR_T 0
174# endif
01ebf752 175#endif
5e7f00a1
VZ
176
177#endif /* __GNUWIN32__ */
01ebf752 178
16f10340
VZ
179/* wxUSE_MFC is not defined when using configure as it doesn't make sense for
180 gcc or mingw32 anyhow */
181#ifndef wxUSE_MFC
182 #define wxUSE_MFC 0
183#endif /* !defined(wxUSE_MFC) */
184
01ebf752
JS
185/* MFC duplicates these operators */
186#if wxUSE_MFC
5e7f00a1
VZ
187# undef wxUSE_GLOBAL_MEMORY_OPERATORS
188# define wxUSE_GLOBAL_MEMORY_OPERATORS 0
01ebf752 189
5e7f00a1
VZ
190# undef wxUSE_DEBUG_NEW_ALWAYS
191# define wxUSE_DEBUG_NEW_ALWAYS 0
192#endif /* wxUSE_MFC */
01ebf752
JS
193
194#if (defined(__GNUWIN32__) && !wxUSE_NORLANDER_HEADERS)
820a7a1b
VZ
195 /* GnuWin32 doesn't have appropriate headers for e.g. IUnknown. */
196# undef wxUSE_DRAG_AND_DROP
197# define wxUSE_DRAG_AND_DROP 0
01ebf752
JS
198#endif
199
d7bc7fec 200#if !wxUSE_OWNER_DRAWN && !defined(__WXUNIVERSAL__)
820a7a1b
VZ
201# undef wxUSE_CHECKLISTBOX
202# define wxUSE_CHECKLISTBOX 0
01ebf752
JS
203#endif
204
0e871ad0
WS
205#if wxUSE_SPINCTRL
206# if !wxUSE_SPINBTN
207# ifdef wxABORT_ON_CONFIG_ERROR
208# error "wxSpinCtrl requires wxSpinButton on MSW"
209# else
210# undef wxUSE_SPINBTN
211# define wxUSE_SPINBTN 1
212# endif
213# endif
214#endif
215
da98e157
VZ
216/*
217 Win64-specific checks.
218 */
219#ifdef __WIN64__
220# if wxUSE_STACKWALKER
da98e157
VZ
221# undef wxUSE_CRASHREPORT
222# define wxUSE_CRASHREPORT 0
223# endif
224#endif /* __WIN64__ */
225
226
227/*
228 Compiler-specific checks.
229 */
1b5f8335 230
e78c47e3 231/* Borland */
1b5f8335
VZ
232#ifdef __BORLANDC__
233
234#if __BORLANDC__ < 0x500
5e7f00a1
VZ
235 /* BC++ 4.0 can't compile JPEG library */
236# undef wxUSE_LIBJPEG
237# define wxUSE_LIBJPEG 0
01ebf752
JS
238#endif
239
240/* wxUSE_DEBUG_NEW_ALWAYS = 1 not compatible with BC++ in DLL mode */
1b5f8335 241#if defined(WXMAKINGDLL) || defined(WXUSINGDLL)
5e7f00a1
VZ
242# undef wxUSE_DEBUG_NEW_ALWAYS
243# define wxUSE_DEBUG_NEW_ALWAYS 0
01ebf752
JS
244#endif
245
1b5f8335
VZ
246#endif /* __BORLANDC__ */
247
90a752c2
JS
248/* DMC++ doesn't have definitions for date picker control, so use generic control
249 */
90a752c2 250#ifdef __DMC__
820a7a1b
VZ
251# if wxUSE_DATEPICKCTRL
252# undef wxUSE_DATEPICKCTRL_GENERIC
253# undef wxUSE_DATEPICKCTRL
254# endif
255# define wxUSE_DATEPICKCTRL 0
256# define wxUSE_DATEPICKCTRL_GENERIC 1
90a752c2
JS
257#endif
258
a1f48575 259
b55c3716 260
a1f48575
VZ
261/*
262 un/redefine the options which we can't compile (after checking that they're
263 defined
264 */
265#ifdef __WINE__
07b1232d
VZ
266# if wxUSE_ACTIVEX
267# undef wxUSE_ACTIVEX
268# define wxUSE_ACTIVEX 0
269# endif /* wxUSE_ACTIVEX */
270
271# if wxUSE_UNICODE_MSLU
272# undef wxUSE_UNICODE_MSLU
273# define wxUSE_UNICODE_MSLU 0
274# endif /* wxUSE_UNICODE_MSLU */
28efe654 275#endif /* __WINE__ */
a1f48575 276
b55c3716 277
ca5c6ac3 278/* check settings consistency for MSW-specific ones */
07b1232d
VZ
279#if wxUSE_CRASHREPORT && !wxUSE_ON_FATAL_EXCEPTION
280# ifdef wxABORT_ON_CONFIG_ERROR
281# error "wxUSE_CRASHREPORT requires wxUSE_ON_FATAL_EXCEPTION"
282# else
283# undef wxUSE_CRASHREPORT
284# define wxUSE_CRASHREPORT 0
285# endif
286#endif /* wxUSE_CRASHREPORT */
287
ca5c6ac3 288#if !wxUSE_VARIANT
a1f48575
VZ
289# if wxUSE_ACTIVEX
290# ifdef wxABORT_ON_CONFIG_ERROR
291# error "wxActiveXContainer requires wxVariant"
292# else
293# undef wxUSE_ACTIVEX
294# define wxUSE_ACTIVEX 0
295# endif
296# endif
297
ca5c6ac3
VZ
298# if wxUSE_OLE_AUTOMATION
299# ifdef wxABORT_ON_CONFIG_ERROR
300# error "wxAutomationObject requires wxVariant"
301# else
302# undef wxUSE_OLE_AUTOMATION
303# define wxUSE_OLE_AUTOMATION 0
304# endif
305# endif
a1f48575 306#endif /* !wxUSE_VARIANT */
ca5c6ac3 307
b55c3716
VZ
308#if !wxUSE_DYNAMIC_LOADER
309# if wxUSE_MS_HTML_HELP
310# ifdef wxABORT_ON_CONFIG_ERROR
311# error "wxUSE_MS_HTML_HELP requires wxUSE_DYNAMIC_LOADER."
312# else
63de3718 313# undef wxUSE_MS_HTML_HELP
285ba64d 314# define wxUSE_MS_HTML_HELP 0
b55c3716
VZ
315# endif
316# endif
317# if wxUSE_DIALUP_MANAGER
318# ifdef wxABORT_ON_CONFIG_ERROR
319# error "wxUSE_DIALUP_MANAGER requires wxUSE_DYNAMIC_LOADER."
320# else
6fbc7b59 321# undef wxUSE_DIALUP_MANAGER
285ba64d 322# define wxUSE_DIALUP_MANAGER 0
b55c3716
VZ
323# endif
324# endif
a1f48575 325#endif /* !wxUSE_DYNAMIC_LOADER */
b55c3716 326
64c288fa 327#if !wxUSE_DYNLIB_CLASS
e71508e1
VZ
328# if wxUSE_DC_TRANSFORM_MATRIX
329# ifdef wxABORT_ON_CONFIG_ERROR
330# error "wxUSE_DC_TRANSFORM_MATRIX requires wxUSE_DYNLIB_CLASS"
331# else
332# undef wxUSE_DC_TRANSFORM_MATRIX
333# define wxUSE_DC_TRANSFORM_MATRIX 0
334# endif
335# endif
64c288fa
JS
336# if wxUSE_UXTHEME
337# ifdef wxABORT_ON_CONFIG_ERROR
338# error "wxUSE_UXTHEME requires wxUSE_DYNLIB_CLASS"
339# else
340# undef wxUSE_UXTHEME
341# define wxUSE_UXTHEME 0
342# endif
343# endif
344# if wxUSE_MEDIACTRL
345# ifdef wxABORT_ON_CONFIG_ERROR
346# error "wxUSE_MEDIACTRL requires wxUSE_DYNLIB_CLASS"
347# else
348# undef wxUSE_MEDIACTRL
349# define wxUSE_MEDIACTRL 0
350# endif
351# endif
8ef51d67
JS
352# if wxUSE_INKEDIT
353# ifdef wxABORT_ON_CONFIG_ERROR
354# error "wxUSE_INKEDIT requires wxUSE_DYNLIB_CLASS"
355# else
356# undef wxUSE_INKEDIT
357# define wxUSE_INKEDIT 0
358# endif
359# endif
a1f48575 360#endif /* !wxUSE_DYNLIB_CLASS */
64c288fa 361
42ef5bda 362#if !wxUSE_OLE
a1f48575
VZ
363# if wxUSE_ACTIVEX
364# ifdef wxABORT_ON_CONFIG_ERROR
365# error "wxActiveXContainer requires wxUSE_OLE"
366# else
367# undef wxUSE_ACTIVEX
368# define wxUSE_ACTIVEX 0
369# endif
370# endif
371
42ef5bda
VZ
372# if wxUSE_DATAOBJ
373# ifdef wxABORT_ON_CONFIG_ERROR
374# error "wxUSE_DATAOBJ requires wxUSE_OLE"
375# else
376# undef wxUSE_DATAOBJ
377# define wxUSE_DATAOBJ 0
378# endif
379# endif
ca5c6ac3
VZ
380
381# if wxUSE_OLE_AUTOMATION
382# ifdef wxABORT_ON_CONFIG_ERROR
383# error "wxAutomationObject requires wxUSE_OLE"
384# else
385# undef wxUSE_OLE_AUTOMATION
386# define wxUSE_OLE_AUTOMATION 0
387# endif
388# endif
a1f48575
VZ
389#endif /* !wxUSE_OLE */
390
391#if !wxUSE_ACTIVEX
392# if wxUSE_MEDIACTRL
393# ifdef wxABORT_ON_CONFIG_ERROR
394# error "wxMediaCtl requires wxActiveXContainer"
395# else
396# undef wxUSE_MEDIACTRL
397# define wxUSE_MEDIACTRL 0
398# endif
399# endif
2724d84b
SL
400# if wxUSE_WEB
401# ifdef wxABORT_ON_CONFIG_ERROR
402# error "wxWebView requires wxActiveXContainer under MSW"
403# else
404# undef wxUSE_WEB
405# define wxUSE_WEB 0
406# endif
407# endif
a1f48575 408#endif /* !wxUSE_ACTIVEX */
42ef5bda 409
e7678d7d
VZ
410#if !wxUSE_THREADS
411# if wxUSE_FSWATCHER
412# ifdef wxABORT_ON_CONFIG_ERROR
413# error "wxFileSystemWatcher requires wxThread under MSW"
414# else
415# undef wxUSE_FSWATCHER
416# define wxUSE_FSWATCHER 0
417# endif
af9b2033 418# endif
e7678d7d
VZ
419#endif /* !wxUSE_THREADS */
420
2724d84b
SL
421
422#if !wxUSE_OLE_AUTOMATION
423# if wxUSE_WEB
424# ifdef wxABORT_ON_CONFIG_ERROR
425# error "wxWebView requires wxUSE_OLE_AUTOMATION under MSW"
426# else
427# undef wxUSE_WEB
428# define wxUSE_WEB 0
429# endif
430# endif
431#endif /* !wxUSE_OLE_AUTOMATION */
432
07b1232d
VZ
433#if defined(__WXUNIVERSAL__) && wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW && !wxUSE_POSTSCRIPT
434# undef wxUSE_POSTSCRIPT
435# define wxUSE_POSTSCRIPT 1
436#endif
437
5e7f00a1 438#endif /* _WX_MSW_CHKCONF_H_ */