uconfig.h 6.1 KB

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