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