]> git.saurik.com Git - wxWidgets.git/blob - include/wx/osx/chkconf.h
use different strings for wchar_t and UTF-8-based Unicode builds
[wxWidgets.git] / include / wx / osx / chkconf.h
1 /*
2 * Name: wx/osx/chkconf.h
3 * Purpose: Mac-specific config settings checks
4 * Author: Vadim Zeitlin
5 * Modified by:
6 * Created: 2005-04-05 (extracted from wx/chkconf.h)
7 * RCS-ID: $Id$
8 * Copyright: (c) 2005 Vadim Zeitlin <vadim@wxwidgets.org>
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_OSX_CHKCONF_H_
15 #define _WX_OSX_CHKCONF_H_
16
17
18 #if wxUSE_STACKWALKER
19 /* not supported under Mac */
20 # undef wxUSE_STACKWALKER
21 # define wxUSE_STACKWALKER 0
22 #endif /* wxUSE_STACKWALKER */
23
24 /*
25 * disable the settings which don't work for some compilers
26 */
27
28 #if defined(__MWERKS__)
29 #undef wxUSE_DEBUG_NEW_ALWAYS
30 #define wxUSE_DEBUG_NEW_ALWAYS 0
31
32 /* DS: Fixes compilation when wxUSE_ON_FATAL_EXCEPTION is 1 */
33 #ifndef wxTYPE_SA_HANDLER
34 #define wxTYPE_SA_HANDLER int
35 #endif
36 #endif
37
38 /*
39 * check graphics context option, must be on for every os x platform
40 * we only use core graphics now on all builds, try to catch attempts
41 * to configure the build otherwise and give error messages
42 */
43
44 #if !wxUSE_GRAPHICS_CONTEXT || ( defined( wxMAC_USE_CORE_GRAPHICS ) && !wxMAC_USE_CORE_GRAPHICS )
45 # error "OS X builds use CoreGraphics in this wx version, you cannot turn back to QuickDraw completely"
46 #endif
47
48 /*
49 * using mixins of cocoa functionality
50 */
51
52 #ifndef wxOSX_USE_COCOA
53 #define wxOSX_USE_COCOA 0
54 #endif
55
56 /*
57 * setting flags according to the platform
58 */
59
60 #ifdef __LP64__
61 #if wxOSX_USE_COCOA == 0
62 #undef wxOSX_USE_COCOA
63 #define wxOSX_USE_COCOA 1
64 #endif
65 #define wxOSX_USE_CARBON 0
66 #define wxOSX_USE_IPHONE 0
67 #else
68 #ifdef __WXOSX_IPHONE__
69 #define wxOSX_USE_CARBON 0
70 #define wxOSX_USE_IPHONE 1
71 #else
72 #define wxOSX_USE_IPHONE 0
73 #if wxOSX_USE_COCOA
74 #define wxOSX_USE_CARBON 0
75 #else
76 #define wxOSX_USE_CARBON 1
77 #endif
78 #endif
79 #endif
80
81 /*
82 * combination flags
83 */
84
85 #if wxOSX_USE_COCOA || wxOSX_USE_CARBON
86 #define wxOSX_USE_COCOA_OR_CARBON 1
87 #else
88 #define wxOSX_USE_COCOA_OR_CARBON 0
89 #endif
90
91 #if wxOSX_USE_COCOA || wxOSX_USE_IPHONE
92 #define wxOSX_USE_COCOA_OR_IPHONE 1
93 #else
94 #define wxOSX_USE_COCOA_OR_IPHONE 0
95 #endif
96
97 #if wxOSX_USE_IPHONE
98 #include "wx/osx/iphone/chkconf.h"
99 #elif wxOSX_USE_CARBON
100 #include "wx/osx/carbon/chkconf.h"
101 #elif wxOSX_USE_COCOA
102 #include "wx/osx/cocoa/chkconf.h"
103 #endif
104
105 #endif // _WX_OSX_CHKCONF_H_