1/* 2********************************************************************** 3* Copyright (C) 2002-2004, 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 * \file 20 * \brief Switches for excluding parts of ICU library code modules. 21 * 22 * Allows to build partial, smaller libraries for special purposes. 23 * By default, all modules are built. 24 * The switches are fairly coarse, controlling large modules. 25 * Basic services cannot be turned off. 26 * 27 * @stable ICU 2.4 28 */ 29 30/** 31 * \def UCONFIG_ONLY_COLLATION 32 * This switch turns off modules that are not needed for collation. 33 * 34 * It does not turn off legacy conversion because that is necessary 35 * for ICU to work on EBCDIC platforms (for the default converter). 36 * If you want "only collation" and do not build for EBCDIC, 37 * then you can #define UCONFIG_NO_LEGACY_CONVERSION 1 as well. 38 * 39 * @stable ICU 2.4 40 */ 41#ifndef UCONFIG_ONLY_COLLATION 42# define UCONFIG_ONLY_COLLATION 0 43#endif 44 45#if UCONFIG_ONLY_COLLATION 46 /* common library */ 47# define UCONFIG_NO_BREAK_ITERATION 1 48# define UCONFIG_NO_IDNA 1 49 50 /* i18n library */ 51# if UCONFIG_NO_COLLATION 52# error Contradictory collation switches in uconfig.h. 53# endif 54# define UCONFIG_NO_FORMATTING 1 55# define UCONFIG_NO_TRANSLITERATION 1 56# define UCONFIG_NO_REGULAR_EXPRESSIONS 1 57#endif 58 59/* common library switches -------------------------------------------------- */ 60 61/** 62 * \def UCONFIG_NO_CONVERSION 63 * ICU will not completely build with this switch turned on. 64 * This switch turns off all converters. 65 * 66 * @draft ICU 3.2 67 */ 68#ifndef UCONFIG_NO_CONVERSION 69# define UCONFIG_NO_CONVERSION 0 70#endif 71 72#if UCONFIG_NO_CONVERSION 73# define UCONFIG_NO_LEGACY_CONVERSION 1 74#endif 75 76/** 77 * \def UCONFIG_NO_LEGACY_CONVERSION 78 * This switch turns off all converters except for 79 * - Unicode charsets (UTF-7/8/16/32, CESU-8, SCSU, BOCU-1) 80 * - US-ASCII 81 * - ISO-8859-1 82 * 83 * Turning off legacy conversion is not possible on EBCDIC platforms 84 * because they need ibm-37 or ibm-1047 default converters. 85 * 86 * @stable ICU 2.4 87 */ 88#ifndef UCONFIG_NO_LEGACY_CONVERSION 89# define UCONFIG_NO_LEGACY_CONVERSION 0 90#endif 91 92/** 93 * \def UCONFIG_NO_NORMALIZATION 94 * This switch turns off normalization. 95 * It implies turning off several other services as well, for example 96 * collation and IDNA. 97 * 98 * @stable ICU 2.6 99 */ 100#ifndef UCONFIG_NO_NORMALIZATION 101# define UCONFIG_NO_NORMALIZATION 0 102#elif UCONFIG_NO_NORMALIZATION 103 /* common library */ 104# define UCONFIG_NO_IDNA 1 105 106 /* i18n library */ 107# if UCONFIG_ONLY_COLLATION 108# error Contradictory collation switches in uconfig.h. 109# endif 110# define UCONFIG_NO_COLLATION 1 111# define UCONFIG_NO_TRANSLITERATION 1 112#endif 113 114/** 115 * \def UCONFIG_NO_BREAK_ITERATION 116 * This switch turns off break iteration. 117 * 118 * @stable ICU 2.4 119 */ 120#ifndef UCONFIG_NO_BREAK_ITERATION 121# define UCONFIG_NO_BREAK_ITERATION 0 122#endif 123 124/** 125 * \def UCONFIG_NO_IDNA 126 * This switch turns off IDNA. 127 * 128 * @stable ICU 2.6 129 */ 130#ifndef UCONFIG_NO_IDNA 131# define UCONFIG_NO_IDNA 0 132#endif 133 134/* i18n library switches ---------------------------------------------------- */ 135 136/** 137 * \def UCONFIG_NO_COLLATION 138 * This switch turns off collation and collation-based string search. 139 * 140 * @stable ICU 2.4 141 */ 142#ifndef UCONFIG_NO_COLLATION 143# define UCONFIG_NO_COLLATION 0 144#endif 145 146/** 147 * \def UCONFIG_NO_FORMATTING 148 * This switch turns off formatting and calendar/timezone services. 149 * 150 * @stable ICU 2.4 151 */ 152#ifndef UCONFIG_NO_FORMATTING 153# define UCONFIG_NO_FORMATTING 0 154#endif 155 156/** 157 * \def UCONFIG_NO_TRANSLITERATION 158 * This switch turns off transliteration. 159 * 160 * @stable ICU 2.4 161 */ 162#ifndef UCONFIG_NO_TRANSLITERATION 163# define UCONFIG_NO_TRANSLITERATION 0 164#endif 165 166/** 167 * \def UCONFIG_NO_REGULAR_EXPRESSIONS 168 * This switch turns off regular expressions. 169 * 170 * @stable ICU 2.4 171 */ 172#ifndef UCONFIG_NO_REGULAR_EXPRESSIONS 173# define UCONFIG_NO_REGULAR_EXPRESSIONS 0 174#endif 175 176/** 177 * \def UCONFIG_NO_SERVICE 178 * This switch turns off service registration. 179 * 180 * @draft ICU 3.2 181 */ 182#ifndef UCONFIG_NO_SERVICE 183# define UCONFIG_NO_SERVICE 0 184#endif 185 186#endif 187