2002-09-20 01:54:48 +00:00
|
|
|
/*
|
|
|
|
**********************************************************************
|
2012-02-20 04:28:17 +00:00
|
|
|
* Copyright (C) 2002-2012, International Business Machines
|
2002-09-20 01:54:48 +00:00
|
|
|
* Corporation and others. All Rights Reserved.
|
|
|
|
**********************************************************************
|
|
|
|
* file name: uconfig.h
|
|
|
|
* encoding: US-ASCII
|
|
|
|
* tab size: 8 (not used)
|
|
|
|
* indentation:4
|
|
|
|
*
|
|
|
|
* created on: 2002sep19
|
|
|
|
* created by: Markus W. Scherer
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __UCONFIG_H__
|
|
|
|
#define __UCONFIG_H__
|
|
|
|
|
2008-06-11 21:52:29 +00:00
|
|
|
|
2002-09-20 01:54:48 +00:00
|
|
|
/*!
|
|
|
|
* \file
|
2011-07-23 00:10:30 +00:00
|
|
|
* \brief User-configurable settings
|
2002-09-20 01:54:48 +00:00
|
|
|
*
|
2011-07-23 00:10:30 +00:00
|
|
|
* Miscellaneous switches:
|
|
|
|
*
|
|
|
|
* A number of macros affect a variety of minor aspects of ICU.
|
|
|
|
* Most of them used to be defined elsewhere (e.g., in utypes.h or platform.h)
|
|
|
|
* and moved here to make them easier to find.
|
|
|
|
*
|
|
|
|
* Switches for excluding parts of ICU library code modules:
|
|
|
|
*
|
|
|
|
* Changing these macros allows building partial, smaller libraries for special purposes.
|
2002-09-20 01:54:48 +00:00
|
|
|
* By default, all modules are built.
|
|
|
|
* The switches are fairly coarse, controlling large modules.
|
|
|
|
* Basic services cannot be turned off.
|
|
|
|
*
|
2006-02-16 22:24:24 +00:00
|
|
|
* Building with any of these options does not guarantee that the
|
|
|
|
* ICU build process will completely work. It is recommended that
|
|
|
|
* the ICU libraries and data be built using the normal build.
|
|
|
|
* At that time you should remove the data used by those services.
|
|
|
|
* After building the ICU data library, you should rebuild the ICU
|
|
|
|
* libraries with these switches customized to your needs.
|
|
|
|
*
|
2004-03-26 19:42:04 +00:00
|
|
|
* @stable ICU 2.4
|
2002-09-20 01:54:48 +00:00
|
|
|
*/
|
|
|
|
|
2008-06-11 21:52:29 +00:00
|
|
|
/**
|
|
|
|
* If this switch is defined, ICU will attempt to load a header file named "uconfig_local.h"
|
|
|
|
* prior to determining default settings for uconfig variables.
|
2011-07-23 00:10:30 +00:00
|
|
|
*
|
2008-06-11 21:52:29 +00:00
|
|
|
* @internal ICU 4.0
|
|
|
|
*/
|
|
|
|
#if defined(UCONFIG_USE_LOCAL)
|
|
|
|
#include "uconfig_local.h"
|
|
|
|
#endif
|
|
|
|
|
2011-07-23 00:10:30 +00:00
|
|
|
/**
|
|
|
|
* \def U_DEBUG
|
|
|
|
* Determines whether to include debugging code.
|
|
|
|
* Automatically set on Windows, but most compilers do not have
|
|
|
|
* related predefined macros.
|
|
|
|
* @internal
|
|
|
|
*/
|
|
|
|
#ifdef U_DEBUG
|
|
|
|
/* Use the predefined value. */
|
|
|
|
#elif defined(_DEBUG)
|
|
|
|
/*
|
|
|
|
* _DEBUG is defined by Visual Studio debug compilation.
|
|
|
|
* Do *not* test for its NDEBUG macro: It is an orthogonal macro
|
|
|
|
* which disables assert().
|
|
|
|
*/
|
|
|
|
# define U_DEBUG 1
|
|
|
|
# else
|
|
|
|
# define U_DEBUG 0
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Determines wheter to enable auto cleanup of libraries.
|
|
|
|
* @internal
|
|
|
|
*/
|
|
|
|
#ifndef UCLN_NO_AUTO_CLEANUP
|
|
|
|
#define UCLN_NO_AUTO_CLEANUP 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \def U_DISABLE_RENAMING
|
|
|
|
* Determines whether to disable renaming or not.
|
|
|
|
* @internal
|
|
|
|
*/
|
|
|
|
#ifndef U_DISABLE_RENAMING
|
|
|
|
#define U_DISABLE_RENAMING 0
|
|
|
|
#endif
|
|
|
|
|
2011-07-27 05:53:56 +00:00
|
|
|
/**
|
|
|
|
* \def U_NO_DEFAULT_INCLUDE_UTF_HEADERS
|
|
|
|
* Determines whether utypes.h includes utf.h, utf8.h, utf16.h and utf_old.h.
|
|
|
|
* utypes.h includes those headers if this macro is defined to 0.
|
|
|
|
* Otherwise, each those headers must be included explicitly when using one of their macros.
|
|
|
|
* Defaults to 0 for backward compatibility, except inside ICU.
|
|
|
|
* @draft ICU 49
|
|
|
|
*/
|
|
|
|
#ifdef U_NO_DEFAULT_INCLUDE_UTF_HEADERS
|
|
|
|
/* Use the predefined value. */
|
|
|
|
#elif defined(U_COMBINED_IMPLEMENTATION) || defined(U_COMMON_IMPLEMENTATION) || defined(U_I18N_IMPLEMENTATION) || \
|
|
|
|
defined(U_IO_IMPLEMENTATION) || defined(U_LAYOUT_IMPLEMENTATION) || defined(U_LAYOUTEX_IMPLEMENTATION) || \
|
|
|
|
defined(U_TOOLUTIL_IMPLEMENTATION)
|
|
|
|
# define U_NO_DEFAULT_INCLUDE_UTF_HEADERS 1
|
|
|
|
#else
|
|
|
|
# define U_NO_DEFAULT_INCLUDE_UTF_HEADERS 0
|
|
|
|
#endif
|
|
|
|
|
2011-07-23 00:10:30 +00:00
|
|
|
/**
|
|
|
|
* \def U_OVERRIDE_CXX_ALLOCATION
|
|
|
|
* Determines whether to override new and delete.
|
|
|
|
* ICU is normally built such that all of its C++ classes, via their UMemory base,
|
|
|
|
* override operators new and delete to use its internal, customizable,
|
|
|
|
* non-exception-throwing memory allocation functions. (Default value 1 for this macro.)
|
|
|
|
*
|
|
|
|
* This is especially important when the application and its libraries use multiple heaps.
|
|
|
|
* For example, on Windows, this allows the ICU DLL to be used by
|
|
|
|
* applications that statically link the C Runtime library.
|
|
|
|
*
|
|
|
|
* @stable ICU 2.2
|
|
|
|
*/
|
|
|
|
#ifndef U_OVERRIDE_CXX_ALLOCATION
|
|
|
|
#define U_OVERRIDE_CXX_ALLOCATION 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \def U_ENABLE_TRACING
|
|
|
|
* Determines whether to enable tracing.
|
|
|
|
* @internal
|
|
|
|
*/
|
|
|
|
#ifndef U_ENABLE_TRACING
|
|
|
|
#define U_ENABLE_TRACING 0
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \def U_ENABLE_DYLOAD
|
|
|
|
* Whether to enable Dynamic loading in ICU.
|
|
|
|
* @internal
|
|
|
|
*/
|
|
|
|
#ifndef U_ENABLE_DYLOAD
|
|
|
|
#define U_ENABLE_DYLOAD 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \def U_CHECK_DYLOAD
|
|
|
|
* Whether to test Dynamic loading as an OS capability.
|
|
|
|
* @internal
|
|
|
|
*/
|
|
|
|
#ifndef U_CHECK_DYLOAD
|
|
|
|
#define U_CHECK_DYLOAD 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \def U_DEFAULT_SHOW_DRAFT
|
|
|
|
* Do we allow ICU users to use the draft APIs by default?
|
|
|
|
* @internal
|
|
|
|
*/
|
|
|
|
#ifndef U_DEFAULT_SHOW_DRAFT
|
|
|
|
#define U_DEFAULT_SHOW_DRAFT 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/*===========================================================================*/
|
|
|
|
/* Custom icu entry point renaming */
|
|
|
|
/*===========================================================================*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \def U_HAVE_LIB_SUFFIX
|
|
|
|
* 1 if a custom library suffix is set.
|
|
|
|
* @internal
|
|
|
|
*/
|
|
|
|
#ifdef U_HAVE_LIB_SUFFIX
|
|
|
|
/* Use the predefined value. */
|
2011-09-29 19:22:56 +00:00
|
|
|
#elif defined(U_LIB_SUFFIX_C_NAME)
|
2011-07-23 00:10:30 +00:00
|
|
|
# define U_HAVE_LIB_SUFFIX 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \def U_LIB_SUFFIX_C_NAME_STRING
|
|
|
|
* Defines the library suffix as a string with C syntax.
|
|
|
|
* @internal
|
|
|
|
*/
|
|
|
|
#ifdef U_LIB_SUFFIX_C_NAME_STRING
|
|
|
|
/* Use the predefined value. */
|
|
|
|
#elif defined(U_LIB_SUFFIX_C_NAME)
|
|
|
|
# define U_LIB_SUFFIX_C_NAME_STRING #U_LIB_SUFFIX_C_NAME
|
|
|
|
#else
|
|
|
|
# define U_LIB_SUFFIX_C_NAME_STRING ""
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* common/i18n library switches --------------------------------------------- */
|
|
|
|
|
2002-09-20 01:54:48 +00:00
|
|
|
/**
|
|
|
|
* \def UCONFIG_ONLY_COLLATION
|
|
|
|
* This switch turns off modules that are not needed for collation.
|
|
|
|
*
|
2002-09-25 22:29:52 +00:00
|
|
|
* It does not turn off legacy conversion because that is necessary
|
|
|
|
* for ICU to work on EBCDIC platforms (for the default converter).
|
|
|
|
* If you want "only collation" and do not build for EBCDIC,
|
2005-06-28 19:17:27 +00:00
|
|
|
* then you can define UCONFIG_NO_LEGACY_CONVERSION 1 as well.
|
2002-09-25 22:29:52 +00:00
|
|
|
*
|
2004-03-26 19:42:04 +00:00
|
|
|
* @stable ICU 2.4
|
2002-09-20 01:54:48 +00:00
|
|
|
*/
|
|
|
|
#ifndef UCONFIG_ONLY_COLLATION
|
|
|
|
# define UCONFIG_ONLY_COLLATION 0
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if UCONFIG_ONLY_COLLATION
|
|
|
|
/* common library */
|
|
|
|
# define UCONFIG_NO_BREAK_ITERATION 1
|
2003-05-06 01:22:23 +00:00
|
|
|
# define UCONFIG_NO_IDNA 1
|
2002-09-20 01:54:48 +00:00
|
|
|
|
|
|
|
/* i18n library */
|
|
|
|
# if UCONFIG_NO_COLLATION
|
|
|
|
# error Contradictory collation switches in uconfig.h.
|
|
|
|
# endif
|
|
|
|
# define UCONFIG_NO_FORMATTING 1
|
|
|
|
# define UCONFIG_NO_TRANSLITERATION 1
|
2002-11-07 02:34:46 +00:00
|
|
|
# define UCONFIG_NO_REGULAR_EXPRESSIONS 1
|
2002-09-20 01:54:48 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/* common library switches -------------------------------------------------- */
|
|
|
|
|
2005-09-29 23:06:12 +00:00
|
|
|
/**
|
|
|
|
* \def UCONFIG_NO_FILE_IO
|
|
|
|
* This switch turns off all file access in the common library
|
|
|
|
* where file access is only used for data loading.
|
|
|
|
* ICU data must then be provided in the form of a data DLL (or with an
|
|
|
|
* equivalent way to link to the data residing in an executable,
|
|
|
|
* as in building a combined library with both the common library's code and
|
|
|
|
* the data), or via udata_setCommonData().
|
|
|
|
* Application data must be provided via udata_setAppData() or by using
|
|
|
|
* "open" functions that take pointers to data, for example ucol_openBinary().
|
|
|
|
*
|
|
|
|
* File access is not used at all in the i18n library.
|
|
|
|
*
|
|
|
|
* File access cannot be turned off for the icuio library or for the ICU
|
|
|
|
* test suites and ICU tools.
|
|
|
|
*
|
2007-08-19 08:59:28 +00:00
|
|
|
* @stable ICU 3.6
|
2005-09-29 23:06:12 +00:00
|
|
|
*/
|
|
|
|
#ifndef UCONFIG_NO_FILE_IO
|
|
|
|
# define UCONFIG_NO_FILE_IO 0
|
|
|
|
#endif
|
|
|
|
|
2004-08-26 22:51:40 +00:00
|
|
|
/**
|
|
|
|
* \def UCONFIG_NO_CONVERSION
|
2004-09-09 05:55:01 +00:00
|
|
|
* ICU will not completely build with this switch turned on.
|
2004-08-26 22:51:40 +00:00
|
|
|
* This switch turns off all converters.
|
|
|
|
*
|
2009-03-11 03:16:35 +00:00
|
|
|
* You may want to use this together with U_CHARSET_IS_UTF8 defined to 1
|
|
|
|
* in utypes.h if char* strings in your environment are always in UTF-8.
|
|
|
|
*
|
2006-01-18 03:34:19 +00:00
|
|
|
* @stable ICU 3.2
|
2009-03-11 03:16:35 +00:00
|
|
|
* @see U_CHARSET_IS_UTF8
|
2004-08-26 22:51:40 +00:00
|
|
|
*/
|
|
|
|
#ifndef UCONFIG_NO_CONVERSION
|
|
|
|
# define UCONFIG_NO_CONVERSION 0
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if UCONFIG_NO_CONVERSION
|
|
|
|
# define UCONFIG_NO_LEGACY_CONVERSION 1
|
|
|
|
#endif
|
|
|
|
|
2002-09-20 01:54:48 +00:00
|
|
|
/**
|
|
|
|
* \def UCONFIG_NO_LEGACY_CONVERSION
|
|
|
|
* This switch turns off all converters except for
|
|
|
|
* - Unicode charsets (UTF-7/8/16/32, CESU-8, SCSU, BOCU-1)
|
|
|
|
* - US-ASCII
|
|
|
|
* - ISO-8859-1
|
|
|
|
*
|
2002-09-25 22:29:52 +00:00
|
|
|
* Turning off legacy conversion is not possible on EBCDIC platforms
|
|
|
|
* because they need ibm-37 or ibm-1047 default converters.
|
|
|
|
*
|
2004-03-26 19:42:04 +00:00
|
|
|
* @stable ICU 2.4
|
2002-09-20 01:54:48 +00:00
|
|
|
*/
|
|
|
|
#ifndef UCONFIG_NO_LEGACY_CONVERSION
|
|
|
|
# define UCONFIG_NO_LEGACY_CONVERSION 0
|
|
|
|
#endif
|
|
|
|
|
2003-05-06 01:22:23 +00:00
|
|
|
/**
|
|
|
|
* \def UCONFIG_NO_NORMALIZATION
|
|
|
|
* This switch turns off normalization.
|
|
|
|
* It implies turning off several other services as well, for example
|
|
|
|
* collation and IDNA.
|
|
|
|
*
|
2004-11-02 07:28:07 +00:00
|
|
|
* @stable ICU 2.6
|
2003-05-06 01:22:23 +00:00
|
|
|
*/
|
|
|
|
#ifndef UCONFIG_NO_NORMALIZATION
|
|
|
|
# define UCONFIG_NO_NORMALIZATION 0
|
|
|
|
#elif UCONFIG_NO_NORMALIZATION
|
|
|
|
/* common library */
|
|
|
|
# define UCONFIG_NO_IDNA 1
|
|
|
|
|
|
|
|
/* i18n library */
|
|
|
|
# if UCONFIG_ONLY_COLLATION
|
|
|
|
# error Contradictory collation switches in uconfig.h.
|
|
|
|
# endif
|
|
|
|
# define UCONFIG_NO_COLLATION 1
|
|
|
|
# define UCONFIG_NO_TRANSLITERATION 1
|
|
|
|
#endif
|
|
|
|
|
2002-09-20 01:54:48 +00:00
|
|
|
/**
|
|
|
|
* \def UCONFIG_NO_BREAK_ITERATION
|
|
|
|
* This switch turns off break iteration.
|
|
|
|
*
|
2004-03-26 19:42:04 +00:00
|
|
|
* @stable ICU 2.4
|
2002-09-20 01:54:48 +00:00
|
|
|
*/
|
|
|
|
#ifndef UCONFIG_NO_BREAK_ITERATION
|
|
|
|
# define UCONFIG_NO_BREAK_ITERATION 0
|
|
|
|
#endif
|
|
|
|
|
2003-05-06 01:22:23 +00:00
|
|
|
/**
|
|
|
|
* \def UCONFIG_NO_IDNA
|
|
|
|
* This switch turns off IDNA.
|
|
|
|
*
|
2004-11-02 07:28:07 +00:00
|
|
|
* @stable ICU 2.6
|
2003-05-06 01:22:23 +00:00
|
|
|
*/
|
|
|
|
#ifndef UCONFIG_NO_IDNA
|
|
|
|
# define UCONFIG_NO_IDNA 0
|
|
|
|
#endif
|
|
|
|
|
2011-04-25 20:47:32 +00:00
|
|
|
/**
|
|
|
|
* \def UCONFIG_MSGPAT_DEFAULT_APOSTROPHE_MODE
|
|
|
|
* Determines the default UMessagePatternApostropheMode.
|
|
|
|
* See the documentation for that enum.
|
|
|
|
*
|
2012-02-20 04:28:17 +00:00
|
|
|
* @stable ICU 4.8
|
2011-04-25 20:47:32 +00:00
|
|
|
*/
|
|
|
|
#ifndef UCONFIG_MSGPAT_DEFAULT_APOSTROPHE_MODE
|
|
|
|
# define UCONFIG_MSGPAT_DEFAULT_APOSTROPHE_MODE UMSGPAT_APOS_DOUBLE_OPTIONAL
|
|
|
|
#endif
|
|
|
|
|
2002-09-20 01:54:48 +00:00
|
|
|
/* i18n library switches ---------------------------------------------------- */
|
|
|
|
|
|
|
|
/**
|
2004-06-08 22:53:49 +00:00
|
|
|
* \def UCONFIG_NO_COLLATION
|
2002-09-20 01:54:48 +00:00
|
|
|
* This switch turns off collation and collation-based string search.
|
|
|
|
*
|
2004-03-26 19:42:04 +00:00
|
|
|
* @stable ICU 2.4
|
2002-09-20 01:54:48 +00:00
|
|
|
*/
|
|
|
|
#ifndef UCONFIG_NO_COLLATION
|
|
|
|
# define UCONFIG_NO_COLLATION 0
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \def UCONFIG_NO_FORMATTING
|
|
|
|
* This switch turns off formatting and calendar/timezone services.
|
|
|
|
*
|
2004-03-26 19:42:04 +00:00
|
|
|
* @stable ICU 2.4
|
2002-09-20 01:54:48 +00:00
|
|
|
*/
|
|
|
|
#ifndef UCONFIG_NO_FORMATTING
|
|
|
|
# define UCONFIG_NO_FORMATTING 0
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \def UCONFIG_NO_TRANSLITERATION
|
|
|
|
* This switch turns off transliteration.
|
|
|
|
*
|
2004-03-26 19:42:04 +00:00
|
|
|
* @stable ICU 2.4
|
2002-09-20 01:54:48 +00:00
|
|
|
*/
|
|
|
|
#ifndef UCONFIG_NO_TRANSLITERATION
|
|
|
|
# define UCONFIG_NO_TRANSLITERATION 0
|
|
|
|
#endif
|
|
|
|
|
2002-11-07 02:34:46 +00:00
|
|
|
/**
|
|
|
|
* \def UCONFIG_NO_REGULAR_EXPRESSIONS
|
|
|
|
* This switch turns off regular expressions.
|
|
|
|
*
|
2004-03-26 19:42:04 +00:00
|
|
|
* @stable ICU 2.4
|
2002-11-07 02:34:46 +00:00
|
|
|
*/
|
|
|
|
#ifndef UCONFIG_NO_REGULAR_EXPRESSIONS
|
|
|
|
# define UCONFIG_NO_REGULAR_EXPRESSIONS 0
|
|
|
|
#endif
|
|
|
|
|
2004-11-12 22:50:38 +00:00
|
|
|
/**
|
2004-02-03 00:10:37 +00:00
|
|
|
* \def UCONFIG_NO_SERVICE
|
|
|
|
* This switch turns off service registration.
|
|
|
|
*
|
2006-01-18 03:34:19 +00:00
|
|
|
* @stable ICU 3.2
|
2004-02-03 00:10:37 +00:00
|
|
|
*/
|
2004-07-18 01:18:23 +00:00
|
|
|
#ifndef UCONFIG_NO_SERVICE
|
|
|
|
# define UCONFIG_NO_SERVICE 0
|
|
|
|
#endif
|
2002-09-20 01:54:48 +00:00
|
|
|
|
2012-05-30 00:41:57 +00:00
|
|
|
/**
|
|
|
|
* \def UCONFIG_HAVE_PARSEALLINPUT
|
|
|
|
* This switch turns on the "parse all input" attribute. Binary incompatible.
|
|
|
|
*
|
|
|
|
* @internal
|
|
|
|
*/
|
|
|
|
#ifndef UCONFIG_HAVE_PARSEALLINPUT
|
2012-09-17 19:03:01 +00:00
|
|
|
# define UCONFIG_HAVE_PARSEALLINPUT 1
|
2012-05-30 00:41:57 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2012-09-11 20:51:51 +00:00
|
|
|
* \def UCONFIG_FORMAT_FASTPATHS_49
|
2012-05-30 00:41:57 +00:00
|
|
|
* This switch turns on other formatting fastpaths. Binary incompatible in object DecimalFormat and DecimalFormatSymbols
|
|
|
|
*
|
|
|
|
* @internal
|
|
|
|
*/
|
|
|
|
#ifndef UCONFIG_FORMAT_FASTPATHS_49
|
2012-09-17 19:03:01 +00:00
|
|
|
# define UCONFIG_FORMAT_FASTPATHS_49 1
|
2012-05-30 00:41:57 +00:00
|
|
|
#endif
|
|
|
|
|
2002-09-20 01:54:48 +00:00
|
|
|
#endif
|