]>
Commit | Line | Data |
---|---|---|
b75a7d8f A |
1 | /* |
2 | ********************************************************************** | |
46f4442e | 3 | * Copyright (C) 2002-2008, International Business Machines |
b75a7d8f A |
4 | * Corporation and others. All Rights Reserved. |
5 | ********************************************************************** | |
6 | * file name: uconfig.h | |
7 | * encoding: US-ASCII | |
8 | * tab size: 8 (not used) | |
9 | * indentation:4 | |
10 | * | |
11 | * created on: 2002sep19 | |
12 | * created by: Markus W. Scherer | |
13 | */ | |
14 | ||
15 | #ifndef __UCONFIG_H__ | |
16 | #define __UCONFIG_H__ | |
17 | ||
46f4442e | 18 | |
b75a7d8f A |
19 | /*! |
20 | * \file | |
21 | * \brief Switches for excluding parts of ICU library code modules. | |
22 | * | |
23 | * Allows to build partial, smaller libraries for special purposes. | |
24 | * By default, all modules are built. | |
25 | * The switches are fairly coarse, controlling large modules. | |
26 | * Basic services cannot be turned off. | |
27 | * | |
73c04bcf A |
28 | * Building with any of these options does not guarantee that the |
29 | * ICU build process will completely work. It is recommended that | |
30 | * the ICU libraries and data be built using the normal build. | |
31 | * At that time you should remove the data used by those services. | |
32 | * After building the ICU data library, you should rebuild the ICU | |
33 | * libraries with these switches customized to your needs. | |
34 | * | |
374ca955 | 35 | * @stable ICU 2.4 |
b75a7d8f A |
36 | */ |
37 | ||
46f4442e A |
38 | /** |
39 | * \def UCONFIG_USE_LOCAL | |
40 | * If this switch is defined, ICU will attempt to load a header file named "uconfig_local.h" | |
41 | * prior to determining default settings for uconfig variables. | |
42 | * | |
43 | * @internal ICU 4.0 | |
44 | * | |
45 | */ | |
46 | #if defined(UCONFIG_USE_LOCAL) | |
47 | #include "uconfig_local.h" | |
48 | #endif | |
49 | ||
b75a7d8f A |
50 | /** |
51 | * \def UCONFIG_ONLY_COLLATION | |
52 | * This switch turns off modules that are not needed for collation. | |
53 | * | |
54 | * It does not turn off legacy conversion because that is necessary | |
55 | * for ICU to work on EBCDIC platforms (for the default converter). | |
56 | * If you want "only collation" and do not build for EBCDIC, | |
73c04bcf | 57 | * then you can define UCONFIG_NO_LEGACY_CONVERSION 1 as well. |
b75a7d8f | 58 | * |
374ca955 | 59 | * @stable ICU 2.4 |
b75a7d8f A |
60 | */ |
61 | #ifndef UCONFIG_ONLY_COLLATION | |
62 | # define UCONFIG_ONLY_COLLATION 0 | |
63 | #endif | |
64 | ||
65 | #if UCONFIG_ONLY_COLLATION | |
66 | /* common library */ | |
67 | # define UCONFIG_NO_BREAK_ITERATION 1 | |
68 | # define UCONFIG_NO_IDNA 1 | |
69 | ||
70 | /* i18n library */ | |
71 | # if UCONFIG_NO_COLLATION | |
72 | # error Contradictory collation switches in uconfig.h. | |
73 | # endif | |
74 | # define UCONFIG_NO_FORMATTING 1 | |
75 | # define UCONFIG_NO_TRANSLITERATION 1 | |
76 | # define UCONFIG_NO_REGULAR_EXPRESSIONS 1 | |
77 | #endif | |
78 | ||
79 | /* common library switches -------------------------------------------------- */ | |
80 | ||
73c04bcf A |
81 | /** |
82 | * \def UCONFIG_NO_FILE_IO | |
83 | * This switch turns off all file access in the common library | |
84 | * where file access is only used for data loading. | |
85 | * ICU data must then be provided in the form of a data DLL (or with an | |
86 | * equivalent way to link to the data residing in an executable, | |
87 | * as in building a combined library with both the common library's code and | |
88 | * the data), or via udata_setCommonData(). | |
89 | * Application data must be provided via udata_setAppData() or by using | |
90 | * "open" functions that take pointers to data, for example ucol_openBinary(). | |
91 | * | |
92 | * File access is not used at all in the i18n library. | |
93 | * | |
94 | * File access cannot be turned off for the icuio library or for the ICU | |
95 | * test suites and ICU tools. | |
96 | * | |
46f4442e | 97 | * @stable ICU 3.6 |
73c04bcf A |
98 | */ |
99 | #ifndef UCONFIG_NO_FILE_IO | |
100 | # define UCONFIG_NO_FILE_IO 0 | |
101 | #endif | |
102 | ||
374ca955 A |
103 | /** |
104 | * \def UCONFIG_NO_CONVERSION | |
105 | * ICU will not completely build with this switch turned on. | |
106 | * This switch turns off all converters. | |
107 | * | |
73c04bcf | 108 | * @stable ICU 3.2 |
374ca955 A |
109 | */ |
110 | #ifndef UCONFIG_NO_CONVERSION | |
111 | # define UCONFIG_NO_CONVERSION 0 | |
112 | #endif | |
113 | ||
114 | #if UCONFIG_NO_CONVERSION | |
115 | # define UCONFIG_NO_LEGACY_CONVERSION 1 | |
116 | #endif | |
117 | ||
b75a7d8f A |
118 | /** |
119 | * \def UCONFIG_NO_LEGACY_CONVERSION | |
120 | * This switch turns off all converters except for | |
121 | * - Unicode charsets (UTF-7/8/16/32, CESU-8, SCSU, BOCU-1) | |
122 | * - US-ASCII | |
123 | * - ISO-8859-1 | |
124 | * | |
125 | * Turning off legacy conversion is not possible on EBCDIC platforms | |
126 | * because they need ibm-37 or ibm-1047 default converters. | |
127 | * | |
374ca955 | 128 | * @stable ICU 2.4 |
b75a7d8f A |
129 | */ |
130 | #ifndef UCONFIG_NO_LEGACY_CONVERSION | |
131 | # define UCONFIG_NO_LEGACY_CONVERSION 0 | |
132 | #endif | |
133 | ||
134 | /** | |
135 | * \def UCONFIG_NO_NORMALIZATION | |
136 | * This switch turns off normalization. | |
137 | * It implies turning off several other services as well, for example | |
138 | * collation and IDNA. | |
139 | * | |
374ca955 | 140 | * @stable ICU 2.6 |
b75a7d8f A |
141 | */ |
142 | #ifndef UCONFIG_NO_NORMALIZATION | |
143 | # define UCONFIG_NO_NORMALIZATION 0 | |
144 | #elif UCONFIG_NO_NORMALIZATION | |
145 | /* common library */ | |
146 | # define UCONFIG_NO_IDNA 1 | |
147 | ||
148 | /* i18n library */ | |
149 | # if UCONFIG_ONLY_COLLATION | |
150 | # error Contradictory collation switches in uconfig.h. | |
151 | # endif | |
152 | # define UCONFIG_NO_COLLATION 1 | |
153 | # define UCONFIG_NO_TRANSLITERATION 1 | |
154 | #endif | |
155 | ||
156 | /** | |
157 | * \def UCONFIG_NO_BREAK_ITERATION | |
158 | * This switch turns off break iteration. | |
159 | * | |
374ca955 | 160 | * @stable ICU 2.4 |
b75a7d8f A |
161 | */ |
162 | #ifndef UCONFIG_NO_BREAK_ITERATION | |
163 | # define UCONFIG_NO_BREAK_ITERATION 0 | |
164 | #endif | |
165 | ||
166 | /** | |
167 | * \def UCONFIG_NO_IDNA | |
168 | * This switch turns off IDNA. | |
169 | * | |
374ca955 | 170 | * @stable ICU 2.6 |
b75a7d8f A |
171 | */ |
172 | #ifndef UCONFIG_NO_IDNA | |
173 | # define UCONFIG_NO_IDNA 0 | |
174 | #endif | |
175 | ||
176 | /* i18n library switches ---------------------------------------------------- */ | |
177 | ||
178 | /** | |
374ca955 | 179 | * \def UCONFIG_NO_COLLATION |
b75a7d8f A |
180 | * This switch turns off collation and collation-based string search. |
181 | * | |
374ca955 | 182 | * @stable ICU 2.4 |
b75a7d8f A |
183 | */ |
184 | #ifndef UCONFIG_NO_COLLATION | |
185 | # define UCONFIG_NO_COLLATION 0 | |
186 | #endif | |
187 | ||
188 | /** | |
189 | * \def UCONFIG_NO_FORMATTING | |
190 | * This switch turns off formatting and calendar/timezone services. | |
191 | * | |
374ca955 | 192 | * @stable ICU 2.4 |
b75a7d8f A |
193 | */ |
194 | #ifndef UCONFIG_NO_FORMATTING | |
195 | # define UCONFIG_NO_FORMATTING 0 | |
196 | #endif | |
197 | ||
198 | /** | |
199 | * \def UCONFIG_NO_TRANSLITERATION | |
200 | * This switch turns off transliteration. | |
201 | * | |
374ca955 | 202 | * @stable ICU 2.4 |
b75a7d8f A |
203 | */ |
204 | #ifndef UCONFIG_NO_TRANSLITERATION | |
205 | # define UCONFIG_NO_TRANSLITERATION 0 | |
206 | #endif | |
207 | ||
208 | /** | |
209 | * \def UCONFIG_NO_REGULAR_EXPRESSIONS | |
210 | * This switch turns off regular expressions. | |
211 | * | |
374ca955 | 212 | * @stable ICU 2.4 |
b75a7d8f A |
213 | */ |
214 | #ifndef UCONFIG_NO_REGULAR_EXPRESSIONS | |
215 | # define UCONFIG_NO_REGULAR_EXPRESSIONS 0 | |
216 | #endif | |
217 | ||
374ca955 A |
218 | /** |
219 | * \def UCONFIG_NO_SERVICE | |
220 | * This switch turns off service registration. | |
221 | * | |
73c04bcf | 222 | * @stable ICU 3.2 |
374ca955 A |
223 | */ |
224 | #ifndef UCONFIG_NO_SERVICE | |
225 | # define UCONFIG_NO_SERVICE 0 | |
226 | #endif | |
b75a7d8f A |
227 | |
228 | #endif |