]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/chkconf.h
2 * Name: wx/msw/chkconf.h
3 * Purpose: Compiler-specific configuration checking
8 * Copyright: (c) Julian Smart
9 * Licence: wxWindows licence
12 /* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */
14 #ifndef _WX_MSW_CHKCONF_H_
15 #define _WX_MSW_CHKCONF_H_
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"
22 # define wxUSE_DC_CACHEING 1
24 #endif /* wxUSE_DC_CACHEING */
28 * disable the settings which don't work for some compilers
32 * If using PostScript-in-MSW in Univ, must enable PostScript
34 #if defined(__WXUNIVERSAL__) && wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW && !wxUSE_POSTSCRIPT
35 # undef wxUSE_POSTSCRIPT
36 # define wxUSE_POSTSCRIPT 1
39 #ifndef wxUSE_NORLANDER_HEADERS
40 # if ( wxCHECK_WATCOM_VERSION(1,0) || defined(__WINE__) ) || \
41 ((defined(__MINGW32__) || defined(__CYGWIN__)) && ((__GNUC__>2) ||((__GNUC__==2) && (__GNUC_MINOR__>=95))))
42 # define wxUSE_NORLANDER_HEADERS 1
44 # define wxUSE_NORLANDER_HEADERS 0
49 * We don't want to give an error if wxUSE_UNICODE_MSLU is enabled but
50 * wxUSE_UNICODE is not as this would make it impossible to simply set the
51 * former in wx/setup.h as then the library wouldn't compile in non-Unicode
52 * configurations, so instead simply unset it silently when it doesn't make
55 #if wxUSE_UNICODE_MSLU && !wxUSE_UNICODE
56 # undef wxUSE_UNICODE_MSLU
57 # define wxUSE_UNICODE_MSLU 0
61 * All of the settings below require SEH support (__try/__catch) and can't work
64 #if !defined(_MSC_VER) && \
65 (!defined(__BORLANDC__) || __BORLANDC__ < 0x0550)
66 # undef wxUSE_ON_FATAL_EXCEPTION
67 # define wxUSE_ON_FATAL_EXCEPTION 0
69 # undef wxUSE_CRASHREPORT
70 # define wxUSE_CRASHREPORT 0
72 # undef wxUSE_STACKWALKER
73 # define wxUSE_STACKWALKER 0
74 #endif /* compiler doesn't support SEH */
76 /* wxUSE_DEBUG_NEW_ALWAYS doesn't work with CodeWarrior */
77 #if defined(__MWERKS__)
78 # undef wxUSE_DEBUG_NEW_ALWAYS
79 # define wxUSE_DEBUG_NEW_ALWAYS 0
82 #if defined(__GNUWIN32__)
83 /* These don't work as expected for mingw32 and cygwin32 */
84 # undef wxUSE_MEMORY_TRACING
85 # define wxUSE_MEMORY_TRACING 0
87 # undef wxUSE_GLOBAL_MEMORY_OPERATORS
88 # define wxUSE_GLOBAL_MEMORY_OPERATORS 0
90 # undef wxUSE_DEBUG_NEW_ALWAYS
91 # define wxUSE_DEBUG_NEW_ALWAYS 0
93 /* some Cygwin versions don't have wcslen */
94 # if defined(__CYGWIN__) || defined(__CYGWIN32__)
95 # if ! ((__GNUC__>2) ||((__GNUC__==2) && (__GNUC_MINOR__>=95)))
97 # define wxUSE_WCHAR_T 0
101 #endif /* __GNUWIN32__ */
103 /* wxUSE_MFC is not defined when using configure as it doesn't make sense for
104 gcc or mingw32 anyhow */
107 #endif /* !defined(wxUSE_MFC) */
109 /* MFC duplicates these operators */
111 # undef wxUSE_GLOBAL_MEMORY_OPERATORS
112 # define wxUSE_GLOBAL_MEMORY_OPERATORS 0
114 # undef wxUSE_DEBUG_NEW_ALWAYS
115 # define wxUSE_DEBUG_NEW_ALWAYS 0
116 #endif /* wxUSE_MFC */
118 #if (defined(__GNUWIN32__) && !wxUSE_NORLANDER_HEADERS)
119 /* GnuWin32 doesn't have appropriate headers for e.g. IUnknown. */
120 # undef wxUSE_DRAG_AND_DROP
121 # define wxUSE_DRAG_AND_DROP 0
124 #if !wxUSE_OWNER_DRAWN && !defined(__WXUNIVERSAL__)
125 # undef wxUSE_CHECKLISTBOX
126 # define wxUSE_CHECKLISTBOX 0
131 # ifdef wxABORT_ON_CONFIG_ERROR
132 # error "wxSpinCtrl requires wxSpinButton on MSW"
134 # undef wxUSE_SPINBTN
135 # define wxUSE_SPINBTN 1
141 Win64-specific checks.
144 # if wxUSE_STACKWALKER
145 /* this is not currently supported under Win64, volunteers needed to
147 # undef wxUSE_STACKWALKER
148 # define wxUSE_STACKWALKER 0
150 # undef wxUSE_CRASHREPORT
151 # define wxUSE_CRASHREPORT 0
153 #endif /* __WIN64__ */
157 Compiler-specific checks.
159 #if defined(__BORLANDC__) && (__BORLANDC__ < 0x500)
160 /* BC++ 4.0 can't compile JPEG library */
161 # undef wxUSE_LIBJPEG
162 # define wxUSE_LIBJPEG 0
165 /* wxUSE_DEBUG_NEW_ALWAYS = 1 not compatible with BC++ in DLL mode */
166 #if defined(__BORLANDC__) && (defined(WXMAKINGDLL) || defined(WXUSINGDLL))
167 # undef wxUSE_DEBUG_NEW_ALWAYS
168 # define wxUSE_DEBUG_NEW_ALWAYS 0
171 /* DMC++ doesn't have definitions for date picker control, so use generic control
174 # if wxUSE_DATEPICKCTRL
175 # undef wxUSE_DATEPICKCTRL_GENERIC
176 # undef wxUSE_DATEPICKCTRL
178 # define wxUSE_DATEPICKCTRL 0
179 # define wxUSE_DATEPICKCTRL_GENERIC 1
182 #ifndef wxUSE_UNICODE_MSLU
183 # ifdef wxABORT_ON_CONFIG_ERROR
184 # error "wxUSE_UNICODE_MSLU must be defined."
186 # define wxUSE_UNICODE_MSLU 0
188 #endif /* wxUSE_UNICODE_MSLU */
190 #ifndef wxUSE_UXTHEME
191 # ifdef wxABORT_ON_CONFIG_ERROR
192 # error "wxUSE_UXTHEME must be defined."
194 # define wxUSE_UXTHEME 0
196 #endif /* wxUSE_UXTHEME */
198 #ifndef wxUSE_UXTHEME_AUTO
199 # ifdef wxABORT_ON_CONFIG_ERROR
200 # error "wxUSE_UXTHEME_AUTO must be defined."
202 # define wxUSE_UXTHEME_AUTO 0
204 #endif /* wxUSE_UXTHEME_AUTO */
206 #ifndef wxUSE_MS_HTML_HELP
207 # ifdef wxABORT_ON_CONFIG_ERROR
208 # error "wxUSE_MS_HTML_HELP must be defined."
210 # define wxUSE_MS_HTML_HELP 0
212 #endif /* !defined(wxUSE_MS_HTML_HELP) */
214 #ifndef wxUSE_DIALUP_MANAGER
215 # ifdef wxABORT_ON_CONFIG_ERROR
216 # error "wxUSE_DIALUP_MANAGER must be defined."
218 # define wxUSE_DIALUP_MANAGER 0
220 #endif /* !defined(wxUSE_DIALUP_MANAGER) */
222 #if !wxUSE_DYNAMIC_LOADER
223 # if wxUSE_MS_HTML_HELP
224 # ifdef wxABORT_ON_CONFIG_ERROR
225 # error "wxUSE_MS_HTML_HELP requires wxUSE_DYNAMIC_LOADER."
227 # undef wxUSE_MS_HTML_HELP
228 # define wxUSE_MS_HTML_HELP 0
231 # if wxUSE_DIALUP_MANAGER
232 # ifdef wxABORT_ON_CONFIG_ERROR
233 # error "wxUSE_DIALUP_MANAGER requires wxUSE_DYNAMIC_LOADER."
235 # undef wxUSE_DIALUP_MANAGER
236 # define wxUSE_DIALUP_MANAGER 0
239 #endif /* wxUSE_DYNAMIC_LOADER */
241 #if !wxUSE_DYNLIB_CLASS
243 # ifdef wxABORT_ON_CONFIG_ERROR
244 # error "wxUSE_UXTHEME requires wxUSE_DYNLIB_CLASS"
246 # undef wxUSE_UXTHEME
247 # define wxUSE_UXTHEME 0
251 # ifdef wxABORT_ON_CONFIG_ERROR
252 # error "wxUSE_MEDIACTRL requires wxUSE_DYNLIB_CLASS"
254 # undef wxUSE_MEDIACTRL
255 # define wxUSE_MEDIACTRL 0
258 #endif /* wxUSE_DYNLIB_CLASS */
260 #endif /* _WX_MSW_CHKCONF_H_ */