xref: /aosp_15_r20/external/icu/libicu/ndk_headers/unicode/uconfig.h (revision 0e209d3975ff4a8c132096b14b0e9364a753506e)
1*0e209d39SAndroid Build Coastguard Worker // © 2016 and later: Unicode, Inc. and others.
2*0e209d39SAndroid Build Coastguard Worker // License & terms of use: http://www.unicode.org/copyright.html
3*0e209d39SAndroid Build Coastguard Worker /*
4*0e209d39SAndroid Build Coastguard Worker **********************************************************************
5*0e209d39SAndroid Build Coastguard Worker *   Copyright (C) 2002-2016, International Business Machines
6*0e209d39SAndroid Build Coastguard Worker *   Corporation and others.  All Rights Reserved.
7*0e209d39SAndroid Build Coastguard Worker **********************************************************************
8*0e209d39SAndroid Build Coastguard Worker *   file name:  uconfig.h
9*0e209d39SAndroid Build Coastguard Worker *   encoding:   UTF-8
10*0e209d39SAndroid Build Coastguard Worker *   tab size:   8 (not used)
11*0e209d39SAndroid Build Coastguard Worker *   indentation:4
12*0e209d39SAndroid Build Coastguard Worker *
13*0e209d39SAndroid Build Coastguard Worker *   created on: 2002sep19
14*0e209d39SAndroid Build Coastguard Worker *   created by: Markus W. Scherer
15*0e209d39SAndroid Build Coastguard Worker */
16*0e209d39SAndroid Build Coastguard Worker 
17*0e209d39SAndroid Build Coastguard Worker #ifndef __UCONFIG_H__
18*0e209d39SAndroid Build Coastguard Worker #define __UCONFIG_H__
19*0e209d39SAndroid Build Coastguard Worker 
20*0e209d39SAndroid Build Coastguard Worker // Android patch: Hard code UCONFIG_USE_LOCAL=1 so that ICU will use
21*0e209d39SAndroid Build Coastguard Worker // uconfig_local.h, which allows us to disable use of non-stable and
22*0e209d39SAndroid Build Coastguard Worker // internal APIs in libicu and Android's libandroidicu shim. For more
23*0e209d39SAndroid Build Coastguard Worker // information on this pre-processor variable see the comments below.
24*0e209d39SAndroid Build Coastguard Worker // Also, see http://b/117094880
25*0e209d39SAndroid Build Coastguard Worker 
26*0e209d39SAndroid Build Coastguard Worker // To keep updateicudata.py (which uses the ICU make process) working,
27*0e209d39SAndroid Build Coastguard Worker // uconfig_local.h is only included when ANDROID is defined in the
28*0e209d39SAndroid Build Coastguard Worker // platform build system(s), or __ANDROID__ is defined when targeting
29*0e209d39SAndroid Build Coastguard Worker // Android, e.g. NDK build.
30*0e209d39SAndroid Build Coastguard Worker #if defined(ANDROID) || defined(__ANDROID__)
31*0e209d39SAndroid Build Coastguard Worker #define UCONFIG_USE_LOCAL 1
32*0e209d39SAndroid Build Coastguard Worker #endif
33*0e209d39SAndroid Build Coastguard Worker 
34*0e209d39SAndroid Build Coastguard Worker /*!
35*0e209d39SAndroid Build Coastguard Worker  * \file
36*0e209d39SAndroid Build Coastguard Worker  * \brief User-configurable settings
37*0e209d39SAndroid Build Coastguard Worker  *
38*0e209d39SAndroid Build Coastguard Worker  * Miscellaneous switches:
39*0e209d39SAndroid Build Coastguard Worker  *
40*0e209d39SAndroid Build Coastguard Worker  * A number of macros affect a variety of minor aspects of ICU.
41*0e209d39SAndroid Build Coastguard Worker  * Most of them used to be defined elsewhere (e.g., in utypes.h or platform.h)
42*0e209d39SAndroid Build Coastguard Worker  * and moved here to make them easier to find.
43*0e209d39SAndroid Build Coastguard Worker  *
44*0e209d39SAndroid Build Coastguard Worker  * Switches for excluding parts of ICU library code modules:
45*0e209d39SAndroid Build Coastguard Worker  *
46*0e209d39SAndroid Build Coastguard Worker  * Changing these macros allows building partial, smaller libraries for special purposes.
47*0e209d39SAndroid Build Coastguard Worker  * By default, all modules are built.
48*0e209d39SAndroid Build Coastguard Worker  * The switches are fairly coarse, controlling large modules.
49*0e209d39SAndroid Build Coastguard Worker  * Basic services cannot be turned off.
50*0e209d39SAndroid Build Coastguard Worker  *
51*0e209d39SAndroid Build Coastguard Worker  * Building with any of these options does not guarantee that the
52*0e209d39SAndroid Build Coastguard Worker  * ICU build process will completely work. It is recommended that
53*0e209d39SAndroid Build Coastguard Worker  * the ICU libraries and data be built using the normal build.
54*0e209d39SAndroid Build Coastguard Worker  * At that time you should remove the data used by those services.
55*0e209d39SAndroid Build Coastguard Worker  * After building the ICU data library, you should rebuild the ICU
56*0e209d39SAndroid Build Coastguard Worker  * libraries with these switches customized to your needs.
57*0e209d39SAndroid Build Coastguard Worker  *
58*0e209d39SAndroid Build Coastguard Worker  * \xrefitem stable "Stable" "Stable List" ICU 2.4
59*0e209d39SAndroid Build Coastguard Worker  */
60*0e209d39SAndroid Build Coastguard Worker 
61*0e209d39SAndroid Build Coastguard Worker /**
62*0e209d39SAndroid Build Coastguard Worker  * If this switch is defined, ICU will attempt to load a header file named "uconfig_local.h"
63*0e209d39SAndroid Build Coastguard Worker  * prior to determining default settings for uconfig variables.
64*0e209d39SAndroid Build Coastguard Worker  *
65*0e209d39SAndroid Build Coastguard Worker  * \xrefitem internal "Internal"  "Internal List"  Do not use. This API is for internal use only. ICU 4.0
66*0e209d39SAndroid Build Coastguard Worker  */
67*0e209d39SAndroid Build Coastguard Worker #if defined(UCONFIG_USE_LOCAL)
68*0e209d39SAndroid Build Coastguard Worker #include "uconfig_local.h"
69*0e209d39SAndroid Build Coastguard Worker #endif
70*0e209d39SAndroid Build Coastguard Worker 
71*0e209d39SAndroid Build Coastguard Worker /**
72*0e209d39SAndroid Build Coastguard Worker  * \def U_DEBUG
73*0e209d39SAndroid Build Coastguard Worker  * Determines whether to include debugging code.
74*0e209d39SAndroid Build Coastguard Worker  * Automatically set on Windows, but most compilers do not have
75*0e209d39SAndroid Build Coastguard Worker  * related predefined macros.
76*0e209d39SAndroid Build Coastguard Worker  * \xrefitem internal "Internal"  "Internal List"  Do not use. This API is for internal use only.
77*0e209d39SAndroid Build Coastguard Worker  */
78*0e209d39SAndroid Build Coastguard Worker #ifdef U_DEBUG
79*0e209d39SAndroid Build Coastguard Worker     /* Use the predefined value. */
80*0e209d39SAndroid Build Coastguard Worker #elif defined(_DEBUG)
81*0e209d39SAndroid Build Coastguard Worker     /*
82*0e209d39SAndroid Build Coastguard Worker      * _DEBUG is defined by Visual Studio debug compilation.
83*0e209d39SAndroid Build Coastguard Worker      * Do *not* test for its NDEBUG macro: It is an orthogonal macro
84*0e209d39SAndroid Build Coastguard Worker      * which disables assert().
85*0e209d39SAndroid Build Coastguard Worker      */
86*0e209d39SAndroid Build Coastguard Worker #   define U_DEBUG 1
87*0e209d39SAndroid Build Coastguard Worker # else
88*0e209d39SAndroid Build Coastguard Worker #   define U_DEBUG 0
89*0e209d39SAndroid Build Coastguard Worker #endif
90*0e209d39SAndroid Build Coastguard Worker 
91*0e209d39SAndroid Build Coastguard Worker /**
92*0e209d39SAndroid Build Coastguard Worker  * Determines whether to enable auto cleanup of libraries.
93*0e209d39SAndroid Build Coastguard Worker  * \xrefitem internal "Internal"  "Internal List"  Do not use. This API is for internal use only.
94*0e209d39SAndroid Build Coastguard Worker  */
95*0e209d39SAndroid Build Coastguard Worker #ifndef UCLN_NO_AUTO_CLEANUP
96*0e209d39SAndroid Build Coastguard Worker #define UCLN_NO_AUTO_CLEANUP 1
97*0e209d39SAndroid Build Coastguard Worker #endif
98*0e209d39SAndroid Build Coastguard Worker 
99*0e209d39SAndroid Build Coastguard Worker /**
100*0e209d39SAndroid Build Coastguard Worker  * \def U_DISABLE_RENAMING
101*0e209d39SAndroid Build Coastguard Worker  * Determines whether to disable renaming or not.
102*0e209d39SAndroid Build Coastguard Worker  * \xrefitem internal "Internal"  "Internal List"  Do not use. This API is for internal use only.
103*0e209d39SAndroid Build Coastguard Worker  */
104*0e209d39SAndroid Build Coastguard Worker #ifndef U_DISABLE_RENAMING
105*0e209d39SAndroid Build Coastguard Worker #define U_DISABLE_RENAMING 0
106*0e209d39SAndroid Build Coastguard Worker #endif
107*0e209d39SAndroid Build Coastguard Worker 
108*0e209d39SAndroid Build Coastguard Worker /**
109*0e209d39SAndroid Build Coastguard Worker  * \def U_NO_DEFAULT_INCLUDE_UTF_HEADERS
110*0e209d39SAndroid Build Coastguard Worker  * Determines whether utypes.h includes utf.h, utf8.h, utf16.h and utf_old.h.
111*0e209d39SAndroid Build Coastguard Worker  * utypes.h includes those headers if this macro is defined to 0.
112*0e209d39SAndroid Build Coastguard Worker  * Otherwise, each those headers must be included explicitly when using one of their macros.
113*0e209d39SAndroid Build Coastguard Worker  * Defaults to 0 for backward compatibility, except inside ICU.
114*0e209d39SAndroid Build Coastguard Worker  * \xrefitem stable "Stable" "Stable List" ICU 49
115*0e209d39SAndroid Build Coastguard Worker  */
116*0e209d39SAndroid Build Coastguard Worker #ifdef U_NO_DEFAULT_INCLUDE_UTF_HEADERS
117*0e209d39SAndroid Build Coastguard Worker     /* Use the predefined value. */
118*0e209d39SAndroid Build Coastguard Worker #elif defined(U_COMBINED_IMPLEMENTATION) || defined(U_COMMON_IMPLEMENTATION) || defined(U_I18N_IMPLEMENTATION) || \
119*0e209d39SAndroid Build Coastguard Worker       defined(U_IO_IMPLEMENTATION) || defined(U_LAYOUT_IMPLEMENTATION) || defined(U_LAYOUTEX_IMPLEMENTATION) || \
120*0e209d39SAndroid Build Coastguard Worker       defined(U_TOOLUTIL_IMPLEMENTATION)
121*0e209d39SAndroid Build Coastguard Worker #   define U_NO_DEFAULT_INCLUDE_UTF_HEADERS 1
122*0e209d39SAndroid Build Coastguard Worker #else
123*0e209d39SAndroid Build Coastguard Worker #   define U_NO_DEFAULT_INCLUDE_UTF_HEADERS 0
124*0e209d39SAndroid Build Coastguard Worker #endif
125*0e209d39SAndroid Build Coastguard Worker 
126*0e209d39SAndroid Build Coastguard Worker /**
127*0e209d39SAndroid Build Coastguard Worker  * \def U_OVERRIDE_CXX_ALLOCATION
128*0e209d39SAndroid Build Coastguard Worker  * Determines whether to override new and delete.
129*0e209d39SAndroid Build Coastguard Worker  * ICU is normally built such that all of its C++ classes, via their UMemory base,
130*0e209d39SAndroid Build Coastguard Worker  * override operators new and delete to use its internal, customizable,
131*0e209d39SAndroid Build Coastguard Worker  * non-exception-throwing memory allocation functions. (Default value 1 for this macro.)
132*0e209d39SAndroid Build Coastguard Worker  *
133*0e209d39SAndroid Build Coastguard Worker  * This is especially important when the application and its libraries use multiple heaps.
134*0e209d39SAndroid Build Coastguard Worker  * For example, on Windows, this allows the ICU DLL to be used by
135*0e209d39SAndroid Build Coastguard Worker  * applications that statically link the C Runtime library.
136*0e209d39SAndroid Build Coastguard Worker  *
137*0e209d39SAndroid Build Coastguard Worker  * \xrefitem stable "Stable" "Stable List" ICU 2.2
138*0e209d39SAndroid Build Coastguard Worker  */
139*0e209d39SAndroid Build Coastguard Worker #ifndef U_OVERRIDE_CXX_ALLOCATION
140*0e209d39SAndroid Build Coastguard Worker #define U_OVERRIDE_CXX_ALLOCATION 1
141*0e209d39SAndroid Build Coastguard Worker #endif
142*0e209d39SAndroid Build Coastguard Worker 
143*0e209d39SAndroid Build Coastguard Worker /**
144*0e209d39SAndroid Build Coastguard Worker  * \def U_ENABLE_TRACING
145*0e209d39SAndroid Build Coastguard Worker  * Determines whether to enable tracing.
146*0e209d39SAndroid Build Coastguard Worker  * \xrefitem internal "Internal"  "Internal List"  Do not use. This API is for internal use only.
147*0e209d39SAndroid Build Coastguard Worker  */
148*0e209d39SAndroid Build Coastguard Worker #ifndef U_ENABLE_TRACING
149*0e209d39SAndroid Build Coastguard Worker #define U_ENABLE_TRACING 0
150*0e209d39SAndroid Build Coastguard Worker #endif
151*0e209d39SAndroid Build Coastguard Worker 
152*0e209d39SAndroid Build Coastguard Worker /**
153*0e209d39SAndroid Build Coastguard Worker  * \def UCONFIG_ENABLE_PLUGINS
154*0e209d39SAndroid Build Coastguard Worker  * Determines whether to enable ICU plugins.
155*0e209d39SAndroid Build Coastguard Worker  * \xrefitem internal "Internal"  "Internal List"  Do not use. This API is for internal use only.
156*0e209d39SAndroid Build Coastguard Worker  */
157*0e209d39SAndroid Build Coastguard Worker #ifndef UCONFIG_ENABLE_PLUGINS
158*0e209d39SAndroid Build Coastguard Worker #define UCONFIG_ENABLE_PLUGINS 0
159*0e209d39SAndroid Build Coastguard Worker #endif
160*0e209d39SAndroid Build Coastguard Worker 
161*0e209d39SAndroid Build Coastguard Worker /**
162*0e209d39SAndroid Build Coastguard Worker  * \def U_ENABLE_DYLOAD
163*0e209d39SAndroid Build Coastguard Worker  * Whether to enable Dynamic loading in ICU.
164*0e209d39SAndroid Build Coastguard Worker  * \xrefitem internal "Internal"  "Internal List"  Do not use. This API is for internal use only.
165*0e209d39SAndroid Build Coastguard Worker  */
166*0e209d39SAndroid Build Coastguard Worker #ifndef U_ENABLE_DYLOAD
167*0e209d39SAndroid Build Coastguard Worker #define U_ENABLE_DYLOAD 1
168*0e209d39SAndroid Build Coastguard Worker #endif
169*0e209d39SAndroid Build Coastguard Worker 
170*0e209d39SAndroid Build Coastguard Worker /**
171*0e209d39SAndroid Build Coastguard Worker  * \def U_CHECK_DYLOAD
172*0e209d39SAndroid Build Coastguard Worker  * Whether to test Dynamic loading as an OS capability.
173*0e209d39SAndroid Build Coastguard Worker  * \xrefitem internal "Internal"  "Internal List"  Do not use. This API is for internal use only.
174*0e209d39SAndroid Build Coastguard Worker  */
175*0e209d39SAndroid Build Coastguard Worker #ifndef U_CHECK_DYLOAD
176*0e209d39SAndroid Build Coastguard Worker #define U_CHECK_DYLOAD 1
177*0e209d39SAndroid Build Coastguard Worker #endif
178*0e209d39SAndroid Build Coastguard Worker 
179*0e209d39SAndroid Build Coastguard Worker /**
180*0e209d39SAndroid Build Coastguard Worker  * \def U_DEFAULT_SHOW_DRAFT
181*0e209d39SAndroid Build Coastguard Worker  * Do we allow ICU users to use the draft APIs by default?
182*0e209d39SAndroid Build Coastguard Worker  * \xrefitem internal "Internal"  "Internal List"  Do not use. This API is for internal use only.
183*0e209d39SAndroid Build Coastguard Worker  */
184*0e209d39SAndroid Build Coastguard Worker #ifndef U_DEFAULT_SHOW_DRAFT
185*0e209d39SAndroid Build Coastguard Worker #define U_DEFAULT_SHOW_DRAFT 1
186*0e209d39SAndroid Build Coastguard Worker #endif
187*0e209d39SAndroid Build Coastguard Worker 
188*0e209d39SAndroid Build Coastguard Worker /*===========================================================================*/
189*0e209d39SAndroid Build Coastguard Worker /* Custom icu entry point renaming                                           */
190*0e209d39SAndroid Build Coastguard Worker /*===========================================================================*/
191*0e209d39SAndroid Build Coastguard Worker 
192*0e209d39SAndroid Build Coastguard Worker /**
193*0e209d39SAndroid Build Coastguard Worker  * \def U_HAVE_LIB_SUFFIX
194*0e209d39SAndroid Build Coastguard Worker  * 1 if a custom library suffix is set.
195*0e209d39SAndroid Build Coastguard Worker  * \xrefitem internal "Internal"  "Internal List"  Do not use. This API is for internal use only.
196*0e209d39SAndroid Build Coastguard Worker  */
197*0e209d39SAndroid Build Coastguard Worker #ifdef U_HAVE_LIB_SUFFIX
198*0e209d39SAndroid Build Coastguard Worker     /* Use the predefined value. */
199*0e209d39SAndroid Build Coastguard Worker #elif defined(U_LIB_SUFFIX_C_NAME) || defined(U_IN_DOXYGEN)
200*0e209d39SAndroid Build Coastguard Worker #   define U_HAVE_LIB_SUFFIX 1
201*0e209d39SAndroid Build Coastguard Worker #endif
202*0e209d39SAndroid Build Coastguard Worker 
203*0e209d39SAndroid Build Coastguard Worker /**
204*0e209d39SAndroid Build Coastguard Worker  * \def U_LIB_SUFFIX_C_NAME_STRING
205*0e209d39SAndroid Build Coastguard Worker  * Defines the library suffix as a string with C syntax.
206*0e209d39SAndroid Build Coastguard Worker  * \xrefitem internal "Internal"  "Internal List"  Do not use. This API is for internal use only.
207*0e209d39SAndroid Build Coastguard Worker  */
208*0e209d39SAndroid Build Coastguard Worker #ifdef U_LIB_SUFFIX_C_NAME_STRING
209*0e209d39SAndroid Build Coastguard Worker     /* Use the predefined value. */
210*0e209d39SAndroid Build Coastguard Worker #elif defined(U_LIB_SUFFIX_C_NAME)
211*0e209d39SAndroid Build Coastguard Worker #   define CONVERT_TO_STRING(s) #s
212*0e209d39SAndroid Build Coastguard Worker #   define U_LIB_SUFFIX_C_NAME_STRING CONVERT_TO_STRING(U_LIB_SUFFIX_C_NAME)
213*0e209d39SAndroid Build Coastguard Worker #else
214*0e209d39SAndroid Build Coastguard Worker #   define U_LIB_SUFFIX_C_NAME_STRING ""
215*0e209d39SAndroid Build Coastguard Worker #endif
216*0e209d39SAndroid Build Coastguard Worker 
217*0e209d39SAndroid Build Coastguard Worker /* common/i18n library switches --------------------------------------------- */
218*0e209d39SAndroid Build Coastguard Worker 
219*0e209d39SAndroid Build Coastguard Worker /**
220*0e209d39SAndroid Build Coastguard Worker  * \def UCONFIG_ONLY_COLLATION
221*0e209d39SAndroid Build Coastguard Worker  * This switch turns off modules that are not needed for collation.
222*0e209d39SAndroid Build Coastguard Worker  *
223*0e209d39SAndroid Build Coastguard Worker  * It does not turn off legacy conversion because that is necessary
224*0e209d39SAndroid Build Coastguard Worker  * for ICU to work on EBCDIC platforms (for the default converter).
225*0e209d39SAndroid Build Coastguard Worker  * If you want "only collation" and do not build for EBCDIC,
226*0e209d39SAndroid Build Coastguard Worker  * then you can define UCONFIG_NO_CONVERSION or UCONFIG_NO_LEGACY_CONVERSION to 1 as well.
227*0e209d39SAndroid Build Coastguard Worker  *
228*0e209d39SAndroid Build Coastguard Worker  * \xrefitem stable "Stable" "Stable List" ICU 2.4
229*0e209d39SAndroid Build Coastguard Worker  */
230*0e209d39SAndroid Build Coastguard Worker #ifndef UCONFIG_ONLY_COLLATION
231*0e209d39SAndroid Build Coastguard Worker #   define UCONFIG_ONLY_COLLATION 0
232*0e209d39SAndroid Build Coastguard Worker #endif
233*0e209d39SAndroid Build Coastguard Worker 
234*0e209d39SAndroid Build Coastguard Worker #if UCONFIG_ONLY_COLLATION
235*0e209d39SAndroid Build Coastguard Worker     /* common library */
236*0e209d39SAndroid Build Coastguard Worker #   define UCONFIG_NO_BREAK_ITERATION 1
237*0e209d39SAndroid Build Coastguard Worker #   define UCONFIG_NO_IDNA 1
238*0e209d39SAndroid Build Coastguard Worker 
239*0e209d39SAndroid Build Coastguard Worker     /* i18n library */
240*0e209d39SAndroid Build Coastguard Worker #   if UCONFIG_NO_COLLATION
241*0e209d39SAndroid Build Coastguard Worker #       error Contradictory collation switches in uconfig.h.
242*0e209d39SAndroid Build Coastguard Worker #   endif
243*0e209d39SAndroid Build Coastguard Worker #   define UCONFIG_NO_FORMATTING 1
244*0e209d39SAndroid Build Coastguard Worker #   define UCONFIG_NO_TRANSLITERATION 1
245*0e209d39SAndroid Build Coastguard Worker #   define UCONFIG_NO_REGULAR_EXPRESSIONS 1
246*0e209d39SAndroid Build Coastguard Worker #endif
247*0e209d39SAndroid Build Coastguard Worker 
248*0e209d39SAndroid Build Coastguard Worker /* common library switches -------------------------------------------------- */
249*0e209d39SAndroid Build Coastguard Worker 
250*0e209d39SAndroid Build Coastguard Worker /**
251*0e209d39SAndroid Build Coastguard Worker  * \def UCONFIG_NO_FILE_IO
252*0e209d39SAndroid Build Coastguard Worker  * This switch turns off all file access in the common library
253*0e209d39SAndroid Build Coastguard Worker  * where file access is only used for data loading.
254*0e209d39SAndroid Build Coastguard Worker  * ICU data must then be provided in the form of a data DLL (or with an
255*0e209d39SAndroid Build Coastguard Worker  * equivalent way to link to the data residing in an executable,
256*0e209d39SAndroid Build Coastguard Worker  * as in building a combined library with both the common library's code and
257*0e209d39SAndroid Build Coastguard Worker  * the data), or via udata_setCommonData().
258*0e209d39SAndroid Build Coastguard Worker  * Application data must be provided via udata_setAppData() or by using
259*0e209d39SAndroid Build Coastguard Worker  * "open" functions that take pointers to data, for example ucol_openBinary().
260*0e209d39SAndroid Build Coastguard Worker  *
261*0e209d39SAndroid Build Coastguard Worker  * File access is not used at all in the i18n library.
262*0e209d39SAndroid Build Coastguard Worker  *
263*0e209d39SAndroid Build Coastguard Worker  * File access cannot be turned off for the icuio library or for the ICU
264*0e209d39SAndroid Build Coastguard Worker  * test suites and ICU tools.
265*0e209d39SAndroid Build Coastguard Worker  *
266*0e209d39SAndroid Build Coastguard Worker  * \xrefitem stable "Stable" "Stable List" ICU 3.6
267*0e209d39SAndroid Build Coastguard Worker  */
268*0e209d39SAndroid Build Coastguard Worker #ifndef UCONFIG_NO_FILE_IO
269*0e209d39SAndroid Build Coastguard Worker #   define UCONFIG_NO_FILE_IO 0
270*0e209d39SAndroid Build Coastguard Worker #endif
271*0e209d39SAndroid Build Coastguard Worker 
272*0e209d39SAndroid Build Coastguard Worker #if UCONFIG_NO_FILE_IO && defined(U_TIMEZONE_FILES_DIR)
273*0e209d39SAndroid Build Coastguard Worker #   error Contradictory file io switches in uconfig.h.
274*0e209d39SAndroid Build Coastguard Worker #endif
275*0e209d39SAndroid Build Coastguard Worker 
276*0e209d39SAndroid Build Coastguard Worker /**
277*0e209d39SAndroid Build Coastguard Worker  * \def UCONFIG_NO_CONVERSION
278*0e209d39SAndroid Build Coastguard Worker  * ICU will not completely build (compiling the tools fails) with this
279*0e209d39SAndroid Build Coastguard Worker  * switch turned on.
280*0e209d39SAndroid Build Coastguard Worker  * This switch turns off all converters.
281*0e209d39SAndroid Build Coastguard Worker  *
282*0e209d39SAndroid Build Coastguard Worker  * You may want to use this together with U_CHARSET_IS_UTF8 defined to 1
283*0e209d39SAndroid Build Coastguard Worker  * in utypes.h if char* strings in your environment are always in UTF-8.
284*0e209d39SAndroid Build Coastguard Worker  *
285*0e209d39SAndroid Build Coastguard Worker  * \xrefitem stable "Stable" "Stable List" ICU 3.2
286*0e209d39SAndroid Build Coastguard Worker  * @see U_CHARSET_IS_UTF8
287*0e209d39SAndroid Build Coastguard Worker  */
288*0e209d39SAndroid Build Coastguard Worker #ifndef UCONFIG_NO_CONVERSION
289*0e209d39SAndroid Build Coastguard Worker #   define UCONFIG_NO_CONVERSION 0
290*0e209d39SAndroid Build Coastguard Worker #endif
291*0e209d39SAndroid Build Coastguard Worker 
292*0e209d39SAndroid Build Coastguard Worker #if UCONFIG_NO_CONVERSION
293*0e209d39SAndroid Build Coastguard Worker #   define UCONFIG_NO_LEGACY_CONVERSION 1
294*0e209d39SAndroid Build Coastguard Worker #endif
295*0e209d39SAndroid Build Coastguard Worker 
296*0e209d39SAndroid Build Coastguard Worker /**
297*0e209d39SAndroid Build Coastguard Worker  * \def UCONFIG_ONLY_HTML_CONVERSION
298*0e209d39SAndroid Build Coastguard Worker  * This switch turns off all of the converters NOT listed in
299*0e209d39SAndroid Build Coastguard Worker  * the HTML encoding standard:
300*0e209d39SAndroid Build Coastguard Worker  * http://www.w3.org/TR/encoding/#names-and-labels
301*0e209d39SAndroid Build Coastguard Worker  *
302*0e209d39SAndroid Build Coastguard Worker  * This is not possible on EBCDIC platforms
303*0e209d39SAndroid Build Coastguard Worker  * because they need ibm-37 or ibm-1047 default converters.
304*0e209d39SAndroid Build Coastguard Worker  *
305*0e209d39SAndroid Build Coastguard Worker  * \xrefitem stable "Stable" "Stable List" ICU 55
306*0e209d39SAndroid Build Coastguard Worker  */
307*0e209d39SAndroid Build Coastguard Worker #ifndef UCONFIG_ONLY_HTML_CONVERSION
308*0e209d39SAndroid Build Coastguard Worker #   define UCONFIG_ONLY_HTML_CONVERSION 0
309*0e209d39SAndroid Build Coastguard Worker #endif
310*0e209d39SAndroid Build Coastguard Worker 
311*0e209d39SAndroid Build Coastguard Worker /**
312*0e209d39SAndroid Build Coastguard Worker  * \def UCONFIG_NO_LEGACY_CONVERSION
313*0e209d39SAndroid Build Coastguard Worker  * This switch turns off all converters except for
314*0e209d39SAndroid Build Coastguard Worker  * - Unicode charsets (UTF-7/8/16/32, CESU-8, SCSU, BOCU-1)
315*0e209d39SAndroid Build Coastguard Worker  * - US-ASCII
316*0e209d39SAndroid Build Coastguard Worker  * - ISO-8859-1
317*0e209d39SAndroid Build Coastguard Worker  *
318*0e209d39SAndroid Build Coastguard Worker  * Turning off legacy conversion is not possible on EBCDIC platforms
319*0e209d39SAndroid Build Coastguard Worker  * because they need ibm-37 or ibm-1047 default converters.
320*0e209d39SAndroid Build Coastguard Worker  *
321*0e209d39SAndroid Build Coastguard Worker  * \xrefitem stable "Stable" "Stable List" ICU 2.4
322*0e209d39SAndroid Build Coastguard Worker  */
323*0e209d39SAndroid Build Coastguard Worker #ifndef UCONFIG_NO_LEGACY_CONVERSION
324*0e209d39SAndroid Build Coastguard Worker #   define UCONFIG_NO_LEGACY_CONVERSION 0
325*0e209d39SAndroid Build Coastguard Worker #endif
326*0e209d39SAndroid Build Coastguard Worker 
327*0e209d39SAndroid Build Coastguard Worker /**
328*0e209d39SAndroid Build Coastguard Worker  * \def UCONFIG_NO_NORMALIZATION
329*0e209d39SAndroid Build Coastguard Worker  * This switch turns off normalization.
330*0e209d39SAndroid Build Coastguard Worker  * It implies turning off several other services as well, for example
331*0e209d39SAndroid Build Coastguard Worker  * collation and IDNA.
332*0e209d39SAndroid Build Coastguard Worker  *
333*0e209d39SAndroid Build Coastguard Worker  * \xrefitem stable "Stable" "Stable List" ICU 2.6
334*0e209d39SAndroid Build Coastguard Worker  */
335*0e209d39SAndroid Build Coastguard Worker #ifndef UCONFIG_NO_NORMALIZATION
336*0e209d39SAndroid Build Coastguard Worker #   define UCONFIG_NO_NORMALIZATION 0
337*0e209d39SAndroid Build Coastguard Worker #endif
338*0e209d39SAndroid Build Coastguard Worker 
339*0e209d39SAndroid Build Coastguard Worker /**
340*0e209d39SAndroid Build Coastguard Worker  * \def UCONFIG_USE_ML_PHRASE_BREAKING
341*0e209d39SAndroid Build Coastguard Worker  * This switch turns on BudouX ML phrase-based line breaking, rather than using the dictionary.
342*0e209d39SAndroid Build Coastguard Worker  *
343*0e209d39SAndroid Build Coastguard Worker  * \xrefitem internal "Internal"  "Internal List"  Do not use. This API is for internal use only.
344*0e209d39SAndroid Build Coastguard Worker  */
345*0e209d39SAndroid Build Coastguard Worker #ifndef UCONFIG_USE_ML_PHRASE_BREAKING
346*0e209d39SAndroid Build Coastguard Worker #   define UCONFIG_USE_ML_PHRASE_BREAKING 0
347*0e209d39SAndroid Build Coastguard Worker #endif
348*0e209d39SAndroid Build Coastguard Worker 
349*0e209d39SAndroid Build Coastguard Worker #if UCONFIG_NO_NORMALIZATION
350*0e209d39SAndroid Build Coastguard Worker     /* common library */
351*0e209d39SAndroid Build Coastguard Worker     /* ICU 50 CJK dictionary BreakIterator uses normalization */
352*0e209d39SAndroid Build Coastguard Worker #   define UCONFIG_NO_BREAK_ITERATION 1
353*0e209d39SAndroid Build Coastguard Worker     /* IDNA (UTS #46) is implemented via normalization */
354*0e209d39SAndroid Build Coastguard Worker #   define UCONFIG_NO_IDNA 1
355*0e209d39SAndroid Build Coastguard Worker 
356*0e209d39SAndroid Build Coastguard Worker     /* i18n library */
357*0e209d39SAndroid Build Coastguard Worker #   if UCONFIG_ONLY_COLLATION
358*0e209d39SAndroid Build Coastguard Worker #       error Contradictory collation switches in uconfig.h.
359*0e209d39SAndroid Build Coastguard Worker #   endif
360*0e209d39SAndroid Build Coastguard Worker #   define UCONFIG_NO_COLLATION 1
361*0e209d39SAndroid Build Coastguard Worker #   define UCONFIG_NO_TRANSLITERATION 1
362*0e209d39SAndroid Build Coastguard Worker #endif
363*0e209d39SAndroid Build Coastguard Worker 
364*0e209d39SAndroid Build Coastguard Worker /**
365*0e209d39SAndroid Build Coastguard Worker  * \def UCONFIG_NO_BREAK_ITERATION
366*0e209d39SAndroid Build Coastguard Worker  * This switch turns off break iteration.
367*0e209d39SAndroid Build Coastguard Worker  *
368*0e209d39SAndroid Build Coastguard Worker  * \xrefitem stable "Stable" "Stable List" ICU 2.4
369*0e209d39SAndroid Build Coastguard Worker  */
370*0e209d39SAndroid Build Coastguard Worker #ifndef UCONFIG_NO_BREAK_ITERATION
371*0e209d39SAndroid Build Coastguard Worker #   define UCONFIG_NO_BREAK_ITERATION 0
372*0e209d39SAndroid Build Coastguard Worker #endif
373*0e209d39SAndroid Build Coastguard Worker 
374*0e209d39SAndroid Build Coastguard Worker /**
375*0e209d39SAndroid Build Coastguard Worker  * \def UCONFIG_NO_IDNA
376*0e209d39SAndroid Build Coastguard Worker  * This switch turns off IDNA.
377*0e209d39SAndroid Build Coastguard Worker  *
378*0e209d39SAndroid Build Coastguard Worker  * \xrefitem stable "Stable" "Stable List" ICU 2.6
379*0e209d39SAndroid Build Coastguard Worker  */
380*0e209d39SAndroid Build Coastguard Worker #ifndef UCONFIG_NO_IDNA
381*0e209d39SAndroid Build Coastguard Worker #   define UCONFIG_NO_IDNA 0
382*0e209d39SAndroid Build Coastguard Worker #endif
383*0e209d39SAndroid Build Coastguard Worker 
384*0e209d39SAndroid Build Coastguard Worker /**
385*0e209d39SAndroid Build Coastguard Worker  * \def UCONFIG_MSGPAT_DEFAULT_APOSTROPHE_MODE
386*0e209d39SAndroid Build Coastguard Worker  * Determines the default UMessagePatternApostropheMode.
387*0e209d39SAndroid Build Coastguard Worker  * See the documentation for that enum.
388*0e209d39SAndroid Build Coastguard Worker  *
389*0e209d39SAndroid Build Coastguard Worker  * \xrefitem stable "Stable" "Stable List" ICU 4.8
390*0e209d39SAndroid Build Coastguard Worker  */
391*0e209d39SAndroid Build Coastguard Worker #ifndef UCONFIG_MSGPAT_DEFAULT_APOSTROPHE_MODE
392*0e209d39SAndroid Build Coastguard Worker #   define UCONFIG_MSGPAT_DEFAULT_APOSTROPHE_MODE UMSGPAT_APOS_DOUBLE_OPTIONAL
393*0e209d39SAndroid Build Coastguard Worker #endif
394*0e209d39SAndroid Build Coastguard Worker 
395*0e209d39SAndroid Build Coastguard Worker /**
396*0e209d39SAndroid Build Coastguard Worker  * \def UCONFIG_USE_WINDOWS_LCID_MAPPING_API
397*0e209d39SAndroid Build Coastguard Worker  * On platforms where U_PLATFORM_HAS_WIN32_API is true, this switch determines
398*0e209d39SAndroid Build Coastguard Worker  * if the Windows platform APIs are used for LCID<->Locale Name conversions.
399*0e209d39SAndroid Build Coastguard Worker  * Otherwise, only the built-in ICU tables are used.
400*0e209d39SAndroid Build Coastguard Worker  *
401*0e209d39SAndroid Build Coastguard Worker  * \xrefitem internal "Internal"  "Internal List"  Do not use. This API is for internal use only. ICU 64
402*0e209d39SAndroid Build Coastguard Worker  */
403*0e209d39SAndroid Build Coastguard Worker #ifndef UCONFIG_USE_WINDOWS_LCID_MAPPING_API
404*0e209d39SAndroid Build Coastguard Worker #   define UCONFIG_USE_WINDOWS_LCID_MAPPING_API 1
405*0e209d39SAndroid Build Coastguard Worker #endif
406*0e209d39SAndroid Build Coastguard Worker 
407*0e209d39SAndroid Build Coastguard Worker /* i18n library switches ---------------------------------------------------- */
408*0e209d39SAndroid Build Coastguard Worker 
409*0e209d39SAndroid Build Coastguard Worker /**
410*0e209d39SAndroid Build Coastguard Worker  * \def UCONFIG_NO_COLLATION
411*0e209d39SAndroid Build Coastguard Worker  * This switch turns off collation and collation-based string search.
412*0e209d39SAndroid Build Coastguard Worker  *
413*0e209d39SAndroid Build Coastguard Worker  * \xrefitem stable "Stable" "Stable List" ICU 2.4
414*0e209d39SAndroid Build Coastguard Worker  */
415*0e209d39SAndroid Build Coastguard Worker #ifndef UCONFIG_NO_COLLATION
416*0e209d39SAndroid Build Coastguard Worker #   define UCONFIG_NO_COLLATION 0
417*0e209d39SAndroid Build Coastguard Worker #endif
418*0e209d39SAndroid Build Coastguard Worker 
419*0e209d39SAndroid Build Coastguard Worker /**
420*0e209d39SAndroid Build Coastguard Worker  * \def UCONFIG_NO_FORMATTING
421*0e209d39SAndroid Build Coastguard Worker  * This switch turns off formatting and calendar/timezone services.
422*0e209d39SAndroid Build Coastguard Worker  *
423*0e209d39SAndroid Build Coastguard Worker  * \xrefitem stable "Stable" "Stable List" ICU 2.4
424*0e209d39SAndroid Build Coastguard Worker  */
425*0e209d39SAndroid Build Coastguard Worker #ifndef UCONFIG_NO_FORMATTING
426*0e209d39SAndroid Build Coastguard Worker #   define UCONFIG_NO_FORMATTING 0
427*0e209d39SAndroid Build Coastguard Worker #endif
428*0e209d39SAndroid Build Coastguard Worker 
429*0e209d39SAndroid Build Coastguard Worker /**
430*0e209d39SAndroid Build Coastguard Worker  * \def UCONFIG_NO_MF2
431*0e209d39SAndroid Build Coastguard Worker  * This switch turns off the experimental MessageFormat 2.0 API.
432*0e209d39SAndroid Build Coastguard Worker  *
433*0e209d39SAndroid Build Coastguard Worker  * \xrefitem internal "Internal"  "Internal List"  Do not use. This API is for internal use only. ICU 75 technology preview
434*0e209d39SAndroid Build Coastguard Worker  * \xrefitem deprecated "Deprecated" "Deprecated List" This API is for technology preview only.
435*0e209d39SAndroid Build Coastguard Worker  */
436*0e209d39SAndroid Build Coastguard Worker #ifndef UCONFIG_NO_MF2
437*0e209d39SAndroid Build Coastguard Worker // Android patch: Disable experimental MF2 on Android.
438*0e209d39SAndroid Build Coastguard Worker #   define UCONFIG_NO_MF2 1
439*0e209d39SAndroid Build Coastguard Worker #endif
440*0e209d39SAndroid Build Coastguard Worker 
441*0e209d39SAndroid Build Coastguard Worker /**
442*0e209d39SAndroid Build Coastguard Worker  * \def UCONFIG_NO_TRANSLITERATION
443*0e209d39SAndroid Build Coastguard Worker  * This switch turns off transliteration.
444*0e209d39SAndroid Build Coastguard Worker  *
445*0e209d39SAndroid Build Coastguard Worker  * \xrefitem stable "Stable" "Stable List" ICU 2.4
446*0e209d39SAndroid Build Coastguard Worker  */
447*0e209d39SAndroid Build Coastguard Worker #ifndef UCONFIG_NO_TRANSLITERATION
448*0e209d39SAndroid Build Coastguard Worker #   define UCONFIG_NO_TRANSLITERATION 0
449*0e209d39SAndroid Build Coastguard Worker #endif
450*0e209d39SAndroid Build Coastguard Worker 
451*0e209d39SAndroid Build Coastguard Worker /**
452*0e209d39SAndroid Build Coastguard Worker  * \def UCONFIG_NO_REGULAR_EXPRESSIONS
453*0e209d39SAndroid Build Coastguard Worker  * This switch turns off regular expressions.
454*0e209d39SAndroid Build Coastguard Worker  *
455*0e209d39SAndroid Build Coastguard Worker  * \xrefitem stable "Stable" "Stable List" ICU 2.4
456*0e209d39SAndroid Build Coastguard Worker  */
457*0e209d39SAndroid Build Coastguard Worker #ifndef UCONFIG_NO_REGULAR_EXPRESSIONS
458*0e209d39SAndroid Build Coastguard Worker #   define UCONFIG_NO_REGULAR_EXPRESSIONS 0
459*0e209d39SAndroid Build Coastguard Worker #endif
460*0e209d39SAndroid Build Coastguard Worker 
461*0e209d39SAndroid Build Coastguard Worker /**
462*0e209d39SAndroid Build Coastguard Worker  * \def UCONFIG_NO_SERVICE
463*0e209d39SAndroid Build Coastguard Worker  * This switch turns off service registration.
464*0e209d39SAndroid Build Coastguard Worker  *
465*0e209d39SAndroid Build Coastguard Worker  * \xrefitem stable "Stable" "Stable List" ICU 3.2
466*0e209d39SAndroid Build Coastguard Worker  */
467*0e209d39SAndroid Build Coastguard Worker #ifndef UCONFIG_NO_SERVICE
468*0e209d39SAndroid Build Coastguard Worker #   define UCONFIG_NO_SERVICE 0
469*0e209d39SAndroid Build Coastguard Worker #endif
470*0e209d39SAndroid Build Coastguard Worker 
471*0e209d39SAndroid Build Coastguard Worker /**
472*0e209d39SAndroid Build Coastguard Worker  * \def UCONFIG_HAVE_PARSEALLINPUT
473*0e209d39SAndroid Build Coastguard Worker  * This switch turns on the "parse all input" attribute. Binary incompatible.
474*0e209d39SAndroid Build Coastguard Worker  *
475*0e209d39SAndroid Build Coastguard Worker  * \xrefitem internal "Internal"  "Internal List"  Do not use. This API is for internal use only.
476*0e209d39SAndroid Build Coastguard Worker  */
477*0e209d39SAndroid Build Coastguard Worker #ifndef UCONFIG_HAVE_PARSEALLINPUT
478*0e209d39SAndroid Build Coastguard Worker #   define UCONFIG_HAVE_PARSEALLINPUT 1
479*0e209d39SAndroid Build Coastguard Worker #endif
480*0e209d39SAndroid Build Coastguard Worker 
481*0e209d39SAndroid Build Coastguard Worker /**
482*0e209d39SAndroid Build Coastguard Worker  * \def UCONFIG_NO_FILTERED_BREAK_ITERATION
483*0e209d39SAndroid Build Coastguard Worker  * This switch turns off filtered break iteration code.
484*0e209d39SAndroid Build Coastguard Worker  *
485*0e209d39SAndroid Build Coastguard Worker  * \xrefitem internal "Internal"  "Internal List"  Do not use. This API is for internal use only.
486*0e209d39SAndroid Build Coastguard Worker  */
487*0e209d39SAndroid Build Coastguard Worker #ifndef UCONFIG_NO_FILTERED_BREAK_ITERATION
488*0e209d39SAndroid Build Coastguard Worker #   define UCONFIG_NO_FILTERED_BREAK_ITERATION 0
489*0e209d39SAndroid Build Coastguard Worker #endif
490*0e209d39SAndroid Build Coastguard Worker 
491*0e209d39SAndroid Build Coastguard Worker #endif  // __UCONFIG_H__
492