]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/chkconf.h
Warning fix, should be #ifdef instead of #if
[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
5e7f00a1
VZ
40# if (defined(__WATCOMC__) && (__WATCOMC__ >= 1200)) || defined(__WINE__) || ((defined(__MINGW32__) || defined(__CYGWIN__)) && ((__GNUC__>2) ||((__GNUC__==2) && (__GNUC_MINOR__>=95))))
41# define wxUSE_NORLANDER_HEADERS 1
42# else
43# define wxUSE_NORLANDER_HEADERS 0
44# endif
01ebf752
JS
45#endif
46
820a7a1b
VZ
47/*
48 * We don't want to give an error if wxUSE_UNICODE_MSLU is enabled but
49 * wxUSE_UNICODE is not as this would make it impossible to simply set the
50 * former in wx/setup.h as then the library wouldn't compile in non-Unicode
51 * configurations, so instead simply unset it silently when it doesn't make
52 * sense.
53 */
54#if wxUSE_UNICODE_MSLU && !wxUSE_UNICODE
55# undef wxUSE_UNICODE_MSLU
56# define wxUSE_UNICODE_MSLU 0
57#endif
58
b3dfbbc9 59/*
3e3a3e17
VZ
60 * All of the settings below require SEH support (__try/__catch) and can't work
61 * without it.
b3dfbbc9 62 */
3e3a3e17
VZ
63#if !defined(_MSC_VER) && \
64 (!defined(__BORLANDC__) || __BORLANDC__ < 0x0550)
820a7a1b
VZ
65# undef wxUSE_ON_FATAL_EXCEPTION
66# define wxUSE_ON_FATAL_EXCEPTION 0
3e3a3e17 67
820a7a1b
VZ
68# undef wxUSE_CRASHREPORT
69# define wxUSE_CRASHREPORT 0
3e3a3e17 70
820a7a1b
VZ
71# undef wxUSE_STACKWALKER
72# define wxUSE_STACKWALKER 0
3e3a3e17 73#endif // compiler doesn't support SEH
b3dfbbc9 74
5e7f00a1 75/* wxUSE_DEBUG_NEW_ALWAYS doesn't work with CodeWarrior */
01ebf752 76#if defined(__MWERKS__)
820a7a1b
VZ
77# undef wxUSE_DEBUG_NEW_ALWAYS
78# define wxUSE_DEBUG_NEW_ALWAYS 0
01ebf752
JS
79#endif
80
81#if defined(__GNUWIN32__)
5e7f00a1
VZ
82 /* These don't work as expected for mingw32 and cygwin32 */
83# undef wxUSE_MEMORY_TRACING
84# define wxUSE_MEMORY_TRACING 0
85
86# undef wxUSE_GLOBAL_MEMORY_OPERATORS
87# define wxUSE_GLOBAL_MEMORY_OPERATORS 0
88
89# undef wxUSE_DEBUG_NEW_ALWAYS
90# define wxUSE_DEBUG_NEW_ALWAYS 0
01ebf752 91
5e7f00a1
VZ
92/* some Cygwin versions don't have wcslen */
93# if defined(__CYGWIN__) || defined(__CYGWIN32__)
94# if ! ((__GNUC__>2) ||((__GNUC__==2) && (__GNUC_MINOR__>=95)))
95# undef wxUSE_WCHAR_T
96# define wxUSE_WCHAR_T 0
97# endif
01ebf752 98#endif
5e7f00a1
VZ
99
100#endif /* __GNUWIN32__ */
01ebf752 101
16f10340
VZ
102/* wxUSE_MFC is not defined when using configure as it doesn't make sense for
103 gcc or mingw32 anyhow */
104#ifndef wxUSE_MFC
105 #define wxUSE_MFC 0
106#endif /* !defined(wxUSE_MFC) */
107
01ebf752
JS
108/* MFC duplicates these operators */
109#if wxUSE_MFC
5e7f00a1
VZ
110# undef wxUSE_GLOBAL_MEMORY_OPERATORS
111# define wxUSE_GLOBAL_MEMORY_OPERATORS 0
01ebf752 112
5e7f00a1
VZ
113# undef wxUSE_DEBUG_NEW_ALWAYS
114# define wxUSE_DEBUG_NEW_ALWAYS 0
115#endif /* wxUSE_MFC */
01ebf752
JS
116
117#if (defined(__GNUWIN32__) && !wxUSE_NORLANDER_HEADERS)
820a7a1b
VZ
118 /* GnuWin32 doesn't have appropriate headers for e.g. IUnknown. */
119# undef wxUSE_DRAG_AND_DROP
120# define wxUSE_DRAG_AND_DROP 0
01ebf752
JS
121#endif
122
d7bc7fec 123#if !wxUSE_OWNER_DRAWN && !defined(__WXUNIVERSAL__)
820a7a1b
VZ
124# undef wxUSE_CHECKLISTBOX
125# define wxUSE_CHECKLISTBOX 0
01ebf752
JS
126#endif
127
0e871ad0
WS
128#if wxUSE_SPINCTRL
129# if !wxUSE_SPINBTN
130# ifdef wxABORT_ON_CONFIG_ERROR
131# error "wxSpinCtrl requires wxSpinButton on MSW"
132# else
133# undef wxUSE_SPINBTN
134# define wxUSE_SPINBTN 1
135# endif
136# endif
137#endif
138
da98e157
VZ
139/*
140 Win64-specific checks.
141 */
142#ifdef __WIN64__
143# if wxUSE_STACKWALKER
144 /* this is not currently supported under Win64, volunteers needed to
145 make it work */
146# undef wxUSE_STACKWALKER
147# define wxUSE_STACKWALKER 0
148
149# undef wxUSE_CRASHREPORT
150# define wxUSE_CRASHREPORT 0
151# endif
152#endif /* __WIN64__ */
153
154
155/*
156 Compiler-specific checks.
157 */
01ebf752 158#if defined(__BORLANDC__) && (__BORLANDC__ < 0x500)
5e7f00a1
VZ
159 /* BC++ 4.0 can't compile JPEG library */
160# undef wxUSE_LIBJPEG
161# define wxUSE_LIBJPEG 0
01ebf752
JS
162#endif
163
164/* wxUSE_DEBUG_NEW_ALWAYS = 1 not compatible with BC++ in DLL mode */
165#if defined(__BORLANDC__) && (defined(WXMAKINGDLL) || defined(WXUSINGDLL))
5e7f00a1
VZ
166# undef wxUSE_DEBUG_NEW_ALWAYS
167# define wxUSE_DEBUG_NEW_ALWAYS 0
01ebf752
JS
168#endif
169
5e7f00a1 170/* Early Watcom version don't have good enough wide char support */
01ebf752 171#if defined(__WXMSW__) && (defined(__WATCOMC__) && __WATCOMC__ < 1200)
5e7f00a1
VZ
172# undef wxUSE_WCHAR_T
173# define wxUSE_WCHAR_T 0
8175d025
WS
174#endif
175
90a752c2
JS
176/* DMC++ doesn't have definitions for date picker control, so use generic control
177 */
90a752c2 178#ifdef __DMC__
820a7a1b
VZ
179# if wxUSE_DATEPICKCTRL
180# undef wxUSE_DATEPICKCTRL_GENERIC
181# undef wxUSE_DATEPICKCTRL
182# endif
183# define wxUSE_DATEPICKCTRL 0
184# define wxUSE_DATEPICKCTRL_GENERIC 1
90a752c2
JS
185#endif
186
b55c3716
VZ
187#ifndef wxUSE_UNICODE_MSLU
188# ifdef wxABORT_ON_CONFIG_ERROR
189# error "wxUSE_UNICODE_MSLU must be defined."
190# else
191# define wxUSE_UNICODE_MSLU 0
192# endif
193#endif /* wxUSE_UNICODE_MSLU */
194
195#ifndef wxUSE_UXTHEME
196# ifdef wxABORT_ON_CONFIG_ERROR
197# error "wxUSE_UXTHEME must be defined."
198# else
199# define wxUSE_UXTHEME 0
200# endif
201#endif /* wxUSE_UXTHEME */
202
203#ifndef wxUSE_UXTHEME_AUTO
204# ifdef wxABORT_ON_CONFIG_ERROR
205# error "wxUSE_UXTHEME_AUTO must be defined."
206# else
207# define wxUSE_UXTHEME_AUTO 0
208# endif
209#endif /* wxUSE_UXTHEME_AUTO */
210
211#ifndef wxUSE_MS_HTML_HELP
212# ifdef wxABORT_ON_CONFIG_ERROR
213# error "wxUSE_MS_HTML_HELP must be defined."
214# else
215# define wxUSE_MS_HTML_HELP 0
216# endif
217#endif /* !defined(wxUSE_MS_HTML_HELP) */
218
219#ifndef wxUSE_DIALUP_MANAGER
220# ifdef wxABORT_ON_CONFIG_ERROR
221# error "wxUSE_DIALUP_MANAGER must be defined."
222# else
223# define wxUSE_DIALUP_MANAGER 0
224# endif
225#endif /* !defined(wxUSE_DIALUP_MANAGER) */
226
227#if !wxUSE_DYNAMIC_LOADER
228# if wxUSE_MS_HTML_HELP
229# ifdef wxABORT_ON_CONFIG_ERROR
230# error "wxUSE_MS_HTML_HELP requires wxUSE_DYNAMIC_LOADER."
231# else
285ba64d 232# define wxUSE_MS_HTML_HELP 0
b55c3716
VZ
233# endif
234# endif
235# if wxUSE_DIALUP_MANAGER
236# ifdef wxABORT_ON_CONFIG_ERROR
237# error "wxUSE_DIALUP_MANAGER requires wxUSE_DYNAMIC_LOADER."
238# else
6fbc7b59 239# undef wxUSE_DIALUP_MANAGER
285ba64d 240# define wxUSE_DIALUP_MANAGER 0
b55c3716
VZ
241# endif
242# endif
243#endif /* wxUSE_DYNAMIC_LOADER */
244
5e7f00a1 245#endif /* _WX_MSW_CHKCONF_H_ */
01ebf752 246