]>
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_
18 * disable the settings which don't work for some compilers
22 * If using PostScript-in-MSW in Univ, must enable PostScript
24 #if defined(__WXUNIVERSAL__) && wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW && !wxUSE_POSTSCRIPT
25 # undef wxUSE_POSTSCRIPT
26 # define wxUSE_POSTSCRIPT 1
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
33 # define wxUSE_NORLANDER_HEADERS 0
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
44 #if wxUSE_UNICODE_MSLU && !wxUSE_UNICODE
45 # undef wxUSE_UNICODE_MSLU
46 # define wxUSE_UNICODE_MSLU 0
50 * All of the settings below require SEH support (__try/__catch) and can't work
53 #if !defined(_MSC_VER) && \
54 (!defined(__BORLANDC__) || __BORLANDC__ < 0x0550)
55 # undef wxUSE_ON_FATAL_EXCEPTION
56 # define wxUSE_ON_FATAL_EXCEPTION 0
58 # undef wxUSE_CRASHREPORT
59 # define wxUSE_CRASHREPORT 0
61 # undef wxUSE_STACKWALKER
62 # define wxUSE_STACKWALKER 0
63 #endif // compiler doesn't support SEH
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
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
76 # undef wxUSE_GLOBAL_MEMORY_OPERATORS
77 # define wxUSE_GLOBAL_MEMORY_OPERATORS 0
79 # undef wxUSE_DEBUG_NEW_ALWAYS
80 # define wxUSE_DEBUG_NEW_ALWAYS 0
82 /* some Cygwin versions don't have wcslen */
83 # if defined(__CYGWIN__) || defined(__CYGWIN32__)
84 # if ! ((__GNUC__>2) ||((__GNUC__==2) && (__GNUC_MINOR__>=95)))
86 # define wxUSE_WCHAR_T 0
90 #endif /* __GNUWIN32__ */
92 /* wxUSE_MFC is not defined when using configure as it doesn't make sense for
93 gcc or mingw32 anyhow */
96 #endif /* !defined(wxUSE_MFC) */
98 /* MFC duplicates these operators */
100 # undef wxUSE_GLOBAL_MEMORY_OPERATORS
101 # define wxUSE_GLOBAL_MEMORY_OPERATORS 0
103 # undef wxUSE_DEBUG_NEW_ALWAYS
104 # define wxUSE_DEBUG_NEW_ALWAYS 0
105 #endif /* wxUSE_MFC */
107 #if (defined(__GNUWIN32__) && !wxUSE_NORLANDER_HEADERS)
108 /* GnuWin32 doesn't have appropriate headers for e.g. IUnknown. */
109 # undef wxUSE_DRAG_AND_DROP
110 # define wxUSE_DRAG_AND_DROP 0
113 #if !wxUSE_OWNER_DRAWN && !defined(__WXUNIVERSAL__)
114 # undef wxUSE_CHECKLISTBOX
115 # define wxUSE_CHECKLISTBOX 0
120 # ifdef wxABORT_ON_CONFIG_ERROR
121 # error "wxSpinCtrl requires wxSpinButton on MSW"
123 # undef wxUSE_SPINBTN
124 # define wxUSE_SPINBTN 1
130 Win64-specific checks.
133 # if wxUSE_STACKWALKER
134 /* this is not currently supported under Win64, volunteers needed to
136 # undef wxUSE_STACKWALKER
137 # define wxUSE_STACKWALKER 0
139 # undef wxUSE_CRASHREPORT
140 # define wxUSE_CRASHREPORT 0
142 #endif /* __WIN64__ */
146 Compiler-specific checks.
148 #if defined(__BORLANDC__) && (__BORLANDC__ < 0x500)
149 /* BC++ 4.0 can't compile JPEG library */
150 # undef wxUSE_LIBJPEG
151 # define wxUSE_LIBJPEG 0
154 /* wxUSE_DEBUG_NEW_ALWAYS = 1 not compatible with BC++ in DLL mode */
155 #if defined(__BORLANDC__) && (defined(WXMAKINGDLL) || defined(WXUSINGDLL))
156 # undef wxUSE_DEBUG_NEW_ALWAYS
157 # define wxUSE_DEBUG_NEW_ALWAYS 0
160 /* Early Watcom version don't have good enough wide char support */
161 #if defined(__WXMSW__) && (defined(__WATCOMC__) && __WATCOMC__ < 1200)
162 # undef wxUSE_WCHAR_T
163 # define wxUSE_WCHAR_T 0
166 /* DMC++ doesn't have definitions for date picker control, so use generic control
169 # if wxUSE_DATEPICKCTRL
170 # undef wxUSE_DATEPICKCTRL_GENERIC
171 # undef wxUSE_DATEPICKCTRL
173 # define wxUSE_DATEPICKCTRL 0
174 # define wxUSE_DATEPICKCTRL_GENERIC 1
177 #ifndef wxUSE_UNICODE_MSLU
178 # ifdef wxABORT_ON_CONFIG_ERROR
179 # error "wxUSE_UNICODE_MSLU must be defined."
181 # define wxUSE_UNICODE_MSLU 0
183 #endif /* wxUSE_UNICODE_MSLU */
185 #ifndef wxUSE_UXTHEME
186 # ifdef wxABORT_ON_CONFIG_ERROR
187 # error "wxUSE_UXTHEME must be defined."
189 # define wxUSE_UXTHEME 0
191 #endif /* wxUSE_UXTHEME */
193 #ifndef wxUSE_UXTHEME_AUTO
194 # ifdef wxABORT_ON_CONFIG_ERROR
195 # error "wxUSE_UXTHEME_AUTO must be defined."
197 # define wxUSE_UXTHEME_AUTO 0
199 #endif /* wxUSE_UXTHEME_AUTO */
201 #ifndef wxUSE_MS_HTML_HELP
202 # ifdef wxABORT_ON_CONFIG_ERROR
203 # error "wxUSE_MS_HTML_HELP must be defined."
205 # define wxUSE_MS_HTML_HELP 0
207 #endif /* !defined(wxUSE_MS_HTML_HELP) */
209 #ifndef wxUSE_DIALUP_MANAGER
210 # ifdef wxABORT_ON_CONFIG_ERROR
211 # error "wxUSE_DIALUP_MANAGER must be defined."
213 # define wxUSE_DIALUP_MANAGER 0
215 #endif /* !defined(wxUSE_DIALUP_MANAGER) */
217 #if !wxUSE_DYNAMIC_LOADER
218 # if wxUSE_MS_HTML_HELP
219 # ifdef wxABORT_ON_CONFIG_ERROR
220 # error "wxUSE_MS_HTML_HELP requires wxUSE_DYNAMIC_LOADER."
222 # define wxUSE_DYNAMIC_LOADER 1
225 # if wxUSE_DIALUP_MANAGER
226 # ifdef wxABORT_ON_CONFIG_ERROR
227 # error "wxUSE_DIALUP_MANAGER requires wxUSE_DYNAMIC_LOADER."
229 # define wxUSE_DYNAMIC_LOADER 1
232 #endif /* wxUSE_DYNAMIC_LOADER */
234 #endif /* _WX_MSW_CHKCONF_H_ */