]>
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 /* MFC duplicates these operators */
94 # undef wxUSE_GLOBAL_MEMORY_OPERATORS
95 # define wxUSE_GLOBAL_MEMORY_OPERATORS 0
97 # undef wxUSE_DEBUG_NEW_ALWAYS
98 # define wxUSE_DEBUG_NEW_ALWAYS 0
99 #endif /* wxUSE_MFC */
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
107 #if !wxUSE_OWNER_DRAWN && !defined(__WXUNIVERSAL__)
108 # undef wxUSE_CHECKLISTBOX
109 # define wxUSE_CHECKLISTBOX 0
114 # ifdef wxABORT_ON_CONFIG_ERROR
115 # error "wxSpinCtrl requires wxSpinButton on MSW"
117 # undef wxUSE_SPINBTN
118 # define wxUSE_SPINBTN 1
124 Win64-specific checks.
127 # if wxUSE_STACKWALKER
128 /* this is not currently supported under Win64, volunteers needed to
130 # undef wxUSE_STACKWALKER
131 # define wxUSE_STACKWALKER 0
133 # undef wxUSE_CRASHREPORT
134 # define wxUSE_CRASHREPORT 0
136 #endif /* __WIN64__ */
140 Compiler-specific checks.
142 #if defined(__BORLANDC__) && (__BORLANDC__ < 0x500)
143 /* BC++ 4.0 can't compile JPEG library */
144 # undef wxUSE_LIBJPEG
145 # define wxUSE_LIBJPEG 0
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
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
160 /* DMC++ doesn't have definitions for date picker control, so use generic control
163 # if wxUSE_DATEPICKCTRL
164 # undef wxUSE_DATEPICKCTRL_GENERIC
165 # undef wxUSE_DATEPICKCTRL
167 # define wxUSE_DATEPICKCTRL 0
168 # define wxUSE_DATEPICKCTRL_GENERIC 1
171 #endif /* _WX_MSW_CHKCONF_H_ */