]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/chkconf.h
2 * Name: wx/msw/chkconf.h
3 * Purpose: Compiler-specific configuration checking
7 * Copyright: (c) Julian Smart
8 * Licence: wxWindows licence
11 /* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */
13 #ifndef _WX_MSW_CHKCONF_H_
14 #define _WX_MSW_CHKCONF_H_
16 /* ensure that MSW-specific settings are defined */
18 # ifdef wxABORT_ON_CONFIG_ERROR
19 # error "wxUSE_ACTIVEX must be defined."
21 # define wxUSE_ACTIVEX 0
23 #endif /* !defined(wxUSE_ACTIVEX) */
25 #ifndef wxUSE_CRASHREPORT
26 # ifdef wxABORT_ON_CONFIG_ERROR
27 # error "wxUSE_CRASHREPORT must be defined."
29 # define wxUSE_CRASHREPORT 0
31 #endif /* !defined(wxUSE_CRASHREPORT) */
33 #ifndef wxUSE_DC_CACHEING
34 # ifdef wxABORT_ON_CONFIG_ERROR
35 # error "wxUSE_DC_CACHEING must be defined"
37 # define wxUSE_DC_CACHEING 1
39 #endif /* wxUSE_DC_CACHEING */
41 #ifndef wxUSE_DIALUP_MANAGER
42 # ifdef wxABORT_ON_CONFIG_ERROR
43 # error "wxUSE_DIALUP_MANAGER must be defined."
45 # define wxUSE_DIALUP_MANAGER 0
47 #endif /* !defined(wxUSE_DIALUP_MANAGER) */
49 #ifndef wxUSE_MS_HTML_HELP
50 # ifdef wxABORT_ON_CONFIG_ERROR
51 # error "wxUSE_MS_HTML_HELP must be defined."
53 # define wxUSE_MS_HTML_HELP 0
55 #endif /* !defined(wxUSE_MS_HTML_HELP) */
58 # ifdef wxABORT_ON_CONFIG_ERROR
59 # error "wxUSE_INICONF must be defined."
61 # define wxUSE_INICONF 0
63 #endif /* !defined(wxUSE_INICONF) */
66 # ifdef wxABORT_ON_CONFIG_ERROR
67 # error "wxUSE_OLE must be defined."
71 #endif /* !defined(wxUSE_OLE) */
73 #ifndef wxUSE_OLE_AUTOMATION
74 # ifdef wxABORT_ON_CONFIG_ERROR
75 # error "wxUSE_OLE_AUTOMATION must be defined."
77 # define wxUSE_OLE_AUTOMATION 0
79 #endif /* !defined(wxUSE_OLE_AUTOMATION) */
81 #ifndef wxUSE_TASKBARICON_BALLOONS
82 # ifdef wxABORT_ON_CONFIG_ERROR
83 # error "wxUSE_TASKBARICON_BALLOONS must be defined."
85 # define wxUSE_TASKBARICON_BALLOONS 0
87 #endif /* wxUSE_TASKBARICON_BALLOONS */
89 #ifndef wxUSE_UNICODE_MSLU
90 # ifdef wxABORT_ON_CONFIG_ERROR
91 # error "wxUSE_UNICODE_MSLU must be defined."
93 # define wxUSE_UNICODE_MSLU 0
95 #endif /* wxUSE_UNICODE_MSLU */
98 # ifdef wxABORT_ON_CONFIG_ERROR
99 # error "wxUSE_UXTHEME must be defined."
101 # define wxUSE_UXTHEME 0
103 #endif /* wxUSE_UXTHEME */
106 * We don't want to give an error if wxUSE_UNICODE_MSLU is enabled but
107 * wxUSE_UNICODE is not as this would make it impossible to simply set the
108 * former in wx/setup.h as then the library wouldn't compile in non-Unicode
109 * configurations, so instead simply unset it silently when it doesn't make
112 #if wxUSE_UNICODE_MSLU && !wxUSE_UNICODE
113 # undef wxUSE_UNICODE_MSLU
114 # define wxUSE_UNICODE_MSLU 0
119 * disable the settings which don't work for some compilers
122 #ifndef wxUSE_NORLANDER_HEADERS
123 # if ( wxCHECK_WATCOM_VERSION(1,0) || defined(__WINE__) ) || \
124 ((defined(__MINGW32__) || defined(__CYGWIN__)) && ((__GNUC__>2) ||((__GNUC__==2) && (__GNUC_MINOR__>=95))))
125 # define wxUSE_NORLANDER_HEADERS 1
127 # define wxUSE_NORLANDER_HEADERS 0
132 * See WINVER definition in wx/msw/wrapwin.h for the explanation of this test
135 #if (defined(__VISUALC__) && (__VISUALC__ < 1300)) && \
136 (!defined(WINVER) || WINVER < 0x0500)
137 # undef wxUSE_TASKBARICON_BALLOONS
138 # define wxUSE_TASKBARICON_BALLOONS 0
142 * All of the settings below require SEH support (__try/__catch) and can't work
145 #if !defined(_MSC_VER) && \
146 (!defined(__BORLANDC__) || __BORLANDC__ < 0x0550)
147 # undef wxUSE_ON_FATAL_EXCEPTION
148 # define wxUSE_ON_FATAL_EXCEPTION 0
150 # undef wxUSE_CRASHREPORT
151 # define wxUSE_CRASHREPORT 0
153 # undef wxUSE_STACKWALKER
154 # define wxUSE_STACKWALKER 0
155 #endif /* compiler doesn't support SEH */
157 #if defined(__GNUWIN32__)
158 /* These don't work as expected for mingw32 and cygwin32 */
159 # undef wxUSE_MEMORY_TRACING
160 # define wxUSE_MEMORY_TRACING 0
162 # undef wxUSE_GLOBAL_MEMORY_OPERATORS
163 # define wxUSE_GLOBAL_MEMORY_OPERATORS 0
165 # undef wxUSE_DEBUG_NEW_ALWAYS
166 # define wxUSE_DEBUG_NEW_ALWAYS 0
168 /* some Cygwin versions don't have wcslen */
169 # if defined(__CYGWIN__) || defined(__CYGWIN32__)
170 # if ! ((__GNUC__>2) ||((__GNUC__==2) && (__GNUC_MINOR__>=95)))
171 # undef wxUSE_WCHAR_T
172 # define wxUSE_WCHAR_T 0
176 #endif /* __GNUWIN32__ */
178 /* wxUSE_MFC is not defined when using configure as it doesn't make sense for
179 gcc or mingw32 anyhow */
182 #endif /* !defined(wxUSE_MFC) */
184 /* MFC duplicates these operators */
186 # undef wxUSE_GLOBAL_MEMORY_OPERATORS
187 # define wxUSE_GLOBAL_MEMORY_OPERATORS 0
189 # undef wxUSE_DEBUG_NEW_ALWAYS
190 # define wxUSE_DEBUG_NEW_ALWAYS 0
191 #endif /* wxUSE_MFC */
193 #if (defined(__GNUWIN32__) && !wxUSE_NORLANDER_HEADERS)
194 /* GnuWin32 doesn't have appropriate headers for e.g. IUnknown. */
195 # undef wxUSE_DRAG_AND_DROP
196 # define wxUSE_DRAG_AND_DROP 0
199 #if !wxUSE_OWNER_DRAWN && !defined(__WXUNIVERSAL__)
200 # undef wxUSE_CHECKLISTBOX
201 # define wxUSE_CHECKLISTBOX 0
206 # ifdef wxABORT_ON_CONFIG_ERROR
207 # error "wxSpinCtrl requires wxSpinButton on MSW"
209 # undef wxUSE_SPINBTN
210 # define wxUSE_SPINBTN 1
216 Win64-specific checks.
219 # if wxUSE_STACKWALKER
220 # undef wxUSE_CRASHREPORT
221 # define wxUSE_CRASHREPORT 0
223 #endif /* __WIN64__ */
227 Compiler-specific checks.
233 #if __BORLANDC__ < 0x500
234 /* BC++ 4.0 can't compile JPEG library */
235 # undef wxUSE_LIBJPEG
236 # define wxUSE_LIBJPEG 0
239 /* wxUSE_DEBUG_NEW_ALWAYS = 1 not compatible with BC++ in DLL mode */
240 #if defined(WXMAKINGDLL) || defined(WXUSINGDLL)
241 # undef wxUSE_DEBUG_NEW_ALWAYS
242 # define wxUSE_DEBUG_NEW_ALWAYS 0
245 #endif /* __BORLANDC__ */
247 /* DMC++ doesn't have definitions for date picker control, so use generic control
250 # if wxUSE_DATEPICKCTRL
251 # undef wxUSE_DATEPICKCTRL_GENERIC
252 # undef wxUSE_DATEPICKCTRL
254 # define wxUSE_DATEPICKCTRL 0
255 # define wxUSE_DATEPICKCTRL_GENERIC 1
261 un/redefine the options which we can't compile (after checking that they're
266 # undef wxUSE_ACTIVEX
267 # define wxUSE_ACTIVEX 0
268 # endif /* wxUSE_ACTIVEX */
270 # if wxUSE_UNICODE_MSLU
271 # undef wxUSE_UNICODE_MSLU
272 # define wxUSE_UNICODE_MSLU 0
273 # endif /* wxUSE_UNICODE_MSLU */
274 #endif /* __WINE__ */
277 /* check settings consistency for MSW-specific ones */
278 #if wxUSE_CRASHREPORT && !wxUSE_ON_FATAL_EXCEPTION
279 # ifdef wxABORT_ON_CONFIG_ERROR
280 # error "wxUSE_CRASHREPORT requires wxUSE_ON_FATAL_EXCEPTION"
282 # undef wxUSE_CRASHREPORT
283 # define wxUSE_CRASHREPORT 0
285 #endif /* wxUSE_CRASHREPORT */
289 # ifdef wxABORT_ON_CONFIG_ERROR
290 # error "wxActiveXContainer requires wxVariant"
292 # undef wxUSE_ACTIVEX
293 # define wxUSE_ACTIVEX 0
297 # if wxUSE_OLE_AUTOMATION
298 # ifdef wxABORT_ON_CONFIG_ERROR
299 # error "wxAutomationObject requires wxVariant"
301 # undef wxUSE_OLE_AUTOMATION
302 # define wxUSE_OLE_AUTOMATION 0
305 #endif /* !wxUSE_VARIANT */
307 #if !wxUSE_DYNAMIC_LOADER
308 # if wxUSE_MS_HTML_HELP
309 # ifdef wxABORT_ON_CONFIG_ERROR
310 # error "wxUSE_MS_HTML_HELP requires wxUSE_DYNAMIC_LOADER."
312 # undef wxUSE_MS_HTML_HELP
313 # define wxUSE_MS_HTML_HELP 0
316 # if wxUSE_DIALUP_MANAGER
317 # ifdef wxABORT_ON_CONFIG_ERROR
318 # error "wxUSE_DIALUP_MANAGER requires wxUSE_DYNAMIC_LOADER."
320 # undef wxUSE_DIALUP_MANAGER
321 # define wxUSE_DIALUP_MANAGER 0
324 #endif /* !wxUSE_DYNAMIC_LOADER */
326 #if !wxUSE_DYNLIB_CLASS
327 # if wxUSE_DC_TRANSFORM_MATRIX
328 # ifdef wxABORT_ON_CONFIG_ERROR
329 # error "wxUSE_DC_TRANSFORM_MATRIX requires wxUSE_DYNLIB_CLASS"
331 # undef wxUSE_DC_TRANSFORM_MATRIX
332 # define wxUSE_DC_TRANSFORM_MATRIX 0
336 # ifdef wxABORT_ON_CONFIG_ERROR
337 # error "wxUSE_UXTHEME requires wxUSE_DYNLIB_CLASS"
339 # undef wxUSE_UXTHEME
340 # define wxUSE_UXTHEME 0
344 # ifdef wxABORT_ON_CONFIG_ERROR
345 # error "wxUSE_MEDIACTRL requires wxUSE_DYNLIB_CLASS"
347 # undef wxUSE_MEDIACTRL
348 # define wxUSE_MEDIACTRL 0
352 # ifdef wxABORT_ON_CONFIG_ERROR
353 # error "wxUSE_INKEDIT requires wxUSE_DYNLIB_CLASS"
355 # undef wxUSE_INKEDIT
356 # define wxUSE_INKEDIT 0
359 #endif /* !wxUSE_DYNLIB_CLASS */
363 # ifdef wxABORT_ON_CONFIG_ERROR
364 # error "wxActiveXContainer requires wxUSE_OLE"
366 # undef wxUSE_ACTIVEX
367 # define wxUSE_ACTIVEX 0
372 # ifdef wxABORT_ON_CONFIG_ERROR
373 # error "wxUSE_DATAOBJ requires wxUSE_OLE"
375 # undef wxUSE_DATAOBJ
376 # define wxUSE_DATAOBJ 0
380 # if wxUSE_OLE_AUTOMATION
381 # ifdef wxABORT_ON_CONFIG_ERROR
382 # error "wxAutomationObject requires wxUSE_OLE"
384 # undef wxUSE_OLE_AUTOMATION
385 # define wxUSE_OLE_AUTOMATION 0
388 #endif /* !wxUSE_OLE */
392 # ifdef wxABORT_ON_CONFIG_ERROR
393 # error "wxMediaCtl requires wxActiveXContainer"
395 # undef wxUSE_MEDIACTRL
396 # define wxUSE_MEDIACTRL 0
400 # ifdef wxABORT_ON_CONFIG_ERROR
401 # error "wxWebView requires wxActiveXContainer under MSW"
407 #endif /* !wxUSE_ACTIVEX */
411 # ifdef wxABORT_ON_CONFIG_ERROR
412 # error "wxFileSystemWatcher requires wxThread under MSW"
414 # undef wxUSE_FSWATCHER
415 # define wxUSE_FSWATCHER 0
418 #endif /* !wxUSE_THREADS */
421 #if !wxUSE_OLE_AUTOMATION
423 # ifdef wxABORT_ON_CONFIG_ERROR
424 # error "wxWebView requires wxUSE_OLE_AUTOMATION under MSW"
430 #endif /* !wxUSE_OLE_AUTOMATION */
432 #if defined(__WXUNIVERSAL__) && wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW && !wxUSE_POSTSCRIPT
433 # undef wxUSE_POSTSCRIPT
434 # define wxUSE_POSTSCRIPT 1
437 #endif /* _WX_MSW_CHKCONF_H_ */