1/* 2********************************************************************** 3* Copyright (C) 2002-2009, International Business Machines 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 18 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 * 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 * 35 * @stable ICU 2.4 36 */ 37 38/** 39 * If this switch is defined, ICU will attempt to load a header file named "uconfig_local.h" 40 * prior to determining default settings for uconfig variables. 41 * 42 * @internal ICU 4.0 43 * 44 */ 45#if defined(UCONFIG_USE_LOCAL) 46#include "uconfig_local.h" 47#endif 48 49/** 50 * \def UCONFIG_ONLY_COLLATION 51 * This switch turns off modules that are not needed for collation. 52 * 53 * It does not turn off legacy conversion because that is necessary 54 * for ICU to work on EBCDIC platforms (for the default converter). 55 * If you want "only collation" and do not build for EBCDIC, 56 * then you can define UCONFIG_NO_LEGACY_CONVERSION 1 as well. 57 * 58 * @stable ICU 2.4 59 */ 60#ifndef UCONFIG_ONLY_COLLATION 61# define UCONFIG_ONLY_COLLATION 0 62#endif 63 64#if UCONFIG_ONLY_COLLATION 65 /* common library */ 66# define UCONFIG_NO_BREAK_ITERATION 1 67# define UCONFIG_NO_IDNA 1 68 69 /* i18n library */ 70# if UCONFIG_NO_COLLATION 71# error Contradictory collation switches in uconfig.h. 72# endif 73# define UCONFIG_NO_FORMATTING 1 74# define UCONFIG_NO_TRANSLITERATION 1 75# define UCONFIG_NO_REGULAR_EXPRESSIONS 1 76#endif 77 78/* common library switches -------------------------------------------------- */ 79 80/** 81 * \def UCONFIG_NO_FILE_IO 82 * This switch turns off all file access in the common library 83 * where file access is only used for data loading. 84 * ICU data must then be provided in the form of a data DLL (or with an 85 * equivalent way to link to the data residing in an executable, 86 * as in building a combined library with both the common library's code and 87 * the data), or via udata_setCommonData(). 88 * Application data must be provided via udata_setAppData() or by using 89 * "open" functions that take pointers to data, for example ucol_openBinary(). 90 * 91 * File access is not used at all in the i18n library. 92 * 93 * File access cannot be turned off for the icuio library or for the ICU 94 * test suites and ICU tools. 95 * 96 * @stable ICU 3.6 97 */ 98#ifndef UCONFIG_NO_FILE_IO 99# define UCONFIG_NO_FILE_IO 0 100#endif 101 102/** 103 * \def UCONFIG_NO_CONVERSION 104 * ICU will not completely build with this switch turned on. 105 * This switch turns off all converters. 106 * 107 * You may want to use this together with U_CHARSET_IS_UTF8 defined to 1 108 * in utypes.h if char* strings in your environment are always in UTF-8. 109 * 110 * @stable ICU 3.2 111 * @see U_CHARSET_IS_UTF8 112 */ 113#ifndef UCONFIG_NO_CONVERSION 114# define UCONFIG_NO_CONVERSION 0 115#endif 116 117#if UCONFIG_NO_CONVERSION 118# define UCONFIG_NO_LEGACY_CONVERSION 1 119#endif 120 121/** 122 * \def UCONFIG_NO_LEGACY_CONVERSION 123 * This switch turns off all converters except for 124 * - Unicode charsets (UTF-7/8/16/32, CESU-8, SCSU, BOCU-1) 125 * - US-ASCII 126 * - ISO-8859-1 127 * 128 * Turning off legacy conversion is not possible on EBCDIC platforms 129 * because they need ibm-37 or ibm-1047 default converters. 130 * 131 * @stable ICU 2.4 132 */ 133#ifndef UCONFIG_NO_LEGACY_CONVERSION 134# define UCONFIG_NO_LEGACY_CONVERSION 0 135#endif 136 137/** 138 * \def UCONFIG_NO_NORMALIZATION 139 * This switch turns off normalization. 140 * It implies turning off several other services as well, for example 141 * collation and IDNA. 142 * 143 * @stable ICU 2.6 144 */ 145#ifndef UCONFIG_NO_NORMALIZATION 146# define UCONFIG_NO_NORMALIZATION 0 147#elif UCONFIG_NO_NORMALIZATION 148 /* common library */ 149# define UCONFIG_NO_IDNA 1 150 151 /* i18n library */ 152# if UCONFIG_ONLY_COLLATION 153# error Contradictory collation switches in uconfig.h. 154# endif 155# define UCONFIG_NO_COLLATION 1 156# define UCONFIG_NO_TRANSLITERATION 1 157#endif 158 159/** 160 * \def UCONFIG_NO_BREAK_ITERATION 161 * This switch turns off break iteration. 162 * 163 * @stable ICU 2.4 164 */ 165#ifndef UCONFIG_NO_BREAK_ITERATION 166# define UCONFIG_NO_BREAK_ITERATION 0 167#endif 168 169/** 170 * \def UCONFIG_NO_IDNA 171 * This switch turns off IDNA. 172 * 173 * @stable ICU 2.6 174 */ 175#ifndef UCONFIG_NO_IDNA 176# define UCONFIG_NO_IDNA 0 177#endif 178 179/* i18n library switches ---------------------------------------------------- */ 180 181/** 182 * \def UCONFIG_NO_COLLATION 183 * This switch turns off collation and collation-based string search. 184 * 185 * @stable ICU 2.4 186 */ 187#ifndef UCONFIG_NO_COLLATION 188# define UCONFIG_NO_COLLATION 0 189#endif 190 191/** 192 * \def UCONFIG_NO_FORMATTING 193 * This switch turns off formatting and calendar/timezone services. 194 * 195 * @stable ICU 2.4 196 */ 197#ifndef UCONFIG_NO_FORMATTING 198# define UCONFIG_NO_FORMATTING 0 199#endif 200 201/** 202 * \def UCONFIG_NO_TRANSLITERATION 203 * This switch turns off transliteration. 204 * 205 * @stable ICU 2.4 206 */ 207#ifndef UCONFIG_NO_TRANSLITERATION 208# define UCONFIG_NO_TRANSLITERATION 0 209#endif 210 211/** 212 * \def UCONFIG_NO_REGULAR_EXPRESSIONS 213 * This switch turns off regular expressions. 214 * 215 * @stable ICU 2.4 216 */ 217#ifndef UCONFIG_NO_REGULAR_EXPRESSIONS 218# define UCONFIG_NO_REGULAR_EXPRESSIONS 0 219#endif 220 221/** 222 * \def UCONFIG_NO_SERVICE 223 * This switch turns off service registration. 224 * 225 * @stable ICU 3.2 226 */ 227#ifndef UCONFIG_NO_SERVICE 228# define UCONFIG_NO_SERVICE 0 229#endif 230 231#endif 232