1 # ====================================================================
5 # C library internationalization (i18n) related configuration data
7 # ====================================================================
8 #####ECOSGPLCOPYRIGHTBEGIN####
9 ## -------------------------------------------
10 ## This file is part of eCos, the Embedded Configurable Operating System.
11 ## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
13 ## eCos is free software; you can redistribute it and/or modify it under
14 ## the terms of the GNU General Public License as published by the Free
15 ## Software Foundation; either version 2 or (at your option) any later version.
17 ## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
18 ## WARRANTY; without even the implied warranty of MERCHANTABILITY or
19 ## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 ## You should have received a copy of the GNU General Public License along
23 ## with eCos; if not, write to the Free Software Foundation, Inc.,
24 ## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
26 ## As a special exception, if other files instantiate templates or use macros
27 ## or inline functions from this file, or you compile this file and link it
28 ## with other works to produce a work based on this file, this file does not
29 ## by itself cause the resulting work to be covered by the GNU General Public
30 ## License. However the source code for this file must still be made available
31 ## in accordance with section (3) of the GNU General Public License.
33 ## This exception does not invalidate any other reasons why a work based on
34 ## this file might be covered by the GNU General Public License.
36 ## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
37 ## at http://sources.redhat.com/ecos/ecos-license/
38 ## -------------------------------------------
39 #####ECOSGPLCOPYRIGHTEND####
40 # ====================================================================
41 ######DESCRIPTIONBEGIN####
44 # Contributors: jjohnstn
47 #####DESCRIPTIONEND####
49 # ====================================================================
51 cdl_package CYGPKG_LIBC_I18N {
52 display "ISO C library internationalization functions"
54 This package provides internationalization functions specified by the
55 ISO C standard - ISO/IEC 9899:1990. These include locale-related
56 functionality and <ctype.h> functionality."
58 include_dir cyg/libc/i18n
60 implements CYGINT_ISO_LOCALE
61 implements CYGINT_ISO_CTYPE
62 implements CYGINT_ISO_STDLIB_MULTIBYTE
63 requires CYGPKG_ISOINFRA
64 compile ctype.cxx locale.cxx mblen.cxx mbtowc.cxx mbstowcs.cxx \
65 wctomb.cxx wcstombs.cxx mbtowc_jp.cxx wctomb_jp.cxx mbtowc_c.cxx
67 # ====================================================================
69 cdl_component CYGPKG_LIBC_I18N_LOCALES {
70 display "Supported locales"
73 These options determine which locales other than the \"C\" locale
74 are supported and hence contribute to the size of the executable."
76 cdl_interface CYGINT_LIBC_I18N_MB_REQUIRED {
77 display "Support for multiple locales required"
79 requires { CYGBLD_ISO_STDLIB_MB_CUR_MAX_HEADER == \
80 "<cyg/libc/i18n/mb.h>" }
83 cdl_option CYGFUN_LIBC_I18N_LOCALE_C_SJIS {
84 display "C-SJIS locale support"
86 implements CYGINT_LIBC_I18N_MB_REQUIRED
88 This option controls if the \"C-SJIS\" locale will be
89 supported by setlocale(). The locale is a hybrid locale
90 that is mostly the \"C\" locale with Japanese SJIS multibyte
94 cdl_option CYGFUN_LIBC_I18N_LOCALE_C_JIS {
95 display "C-JIS locale support"
97 implements CYGINT_LIBC_I18N_MB_REQUIRED
99 This option controls if the \"C-JIS\" locale will be
100 supported by setlocale(). The locale is a hybrid locale
101 that is mostly the \"C\" locale with Japanese JIS multibyte
105 cdl_option CYGFUN_LIBC_I18N_LOCALE_C_EUCJP {
106 display "C-EUCJP locale support"
108 implements CYGINT_LIBC_I18N_MB_REQUIRED
110 This option controls if the \"C-EUCJP\" locale will be
111 supported by setlocale(). The locale is a hybrid locale
112 that is mostly the \"C\" locale with Japanese EUCJP multibyte
117 # ====================================================================
119 cdl_option CYGPKG_LIBC_I18N_NEWLIB_CTYPE {
120 display "Newlib's ctype implementation"
122 requires { CYGBLD_ISO_CTYPE_HEADER == \
123 "<cyg/libc/i18n/newlibctype.h>" }
125 This option enables the implementation of the ctype functions
126 that comes with newlib. It is table driven and therefore
127 exhibits different performance characteristics. It also offers
128 a limited amount of binary compatibility
129 with newlib so that programs linked against newlib ctype/locale
130 do not need to be recompiled when linked with eCos."
131 compile newlibctype.cxx
134 cdl_option CYGSEM_LIBC_I18N_PER_THREAD_MB {
135 display "Per-thread multibyte state"
136 active_if CYGPKG_KERNEL
137 requires CYGVAR_KERNEL_THREADS_DATA
138 default_value { CYGVAR_KERNEL_THREADS_DATA != 0 }
140 This option controls whether the multibyte character
141 handling functions mblen(), mbtowc(), and wctomb(),
142 have their state recorded on a per-thread
143 basis rather than global. If this option is
144 disabled, some per-thread space can be saved.
145 Enabling this option will use three slots
146 of kernel per-thread data. You should ensure you
147 have enough slots configured for all your
151 # ====================================================================
153 cdl_option CYGNUM_LIBC_I18N_MAX_LOCALE_NAME_SIZE {
154 display "Size of locale name strings"
156 legal_values { (CYGFUN_LIBC_I18N_LOCALE_C_EUCJP ? 8 : \
157 (CYGFUN_LIBC_I18N_LOCALE_C_SJIS ? 7 : \
158 (CYGFUN_LIBC_I18N_LOCALE_C_JIS ? 6 : 2))) to 0x7fffffff }
159 default_value { (CYGFUN_LIBC_I18N_LOCALE_C_EUCJP ? 8 : \
160 (CYGFUN_LIBC_I18N_LOCALE_C_SJIS ? 7 : \
161 (CYGFUN_LIBC_I18N_LOCALE_C_JIS ? 6 : 2))) }
163 This option controls the maximum size of
164 locale names and is used, among other things
165 to instantiate a static string used
166 as a return value from the
167 setlocale() function. When requesting the
168 current locale settings with LC_ALL, a string
169 must be constructed to contain this data, rather
170 than just returning a constant string. This
171 string data is stored in the static string.
172 This depends on the length of locale names,
173 hence this option. If just the C locale is
174 present, this option can be set as low as 2."
177 # ====================================================================
179 cdl_option CYGIMP_LIBC_I18N_CTYPE_INLINES {
180 display "Inline versions of <ctype.h> functions"
182 requires { CYGBLD_ISO_CTYPE_HEADER == \
183 "<cyg/libc/i18n/ctype.inl>" }
185 This option chooses whether the simple character
186 classification and conversion functions (e.g.
187 isupper(), isalpha(), toupper(), etc.)
188 from <ctype.h> are available as inline
189 functions. This may improve performance and as
190 the functions are small, may even improve code
194 # ====================================================================
196 cdl_component CYGPKG_LIBC_I18N_OPTIONS {
197 display "C library i18n functions build options"
201 Package specific build options including control over
202 compiler flags used only in building this package,
203 and details of which tests are built."
206 cdl_option CYGPKG_LIBC_I18N_CFLAGS_ADD {
207 display "Additional compiler flags"
212 This option modifies the set of compiler flags for
213 building the C library. These flags are used in addition
214 to the set of global flags."
217 cdl_option CYGPKG_LIBC_I18N_CFLAGS_REMOVE {
218 display "Suppressed compiler flags"
223 This option modifies the set of compiler flags for
224 building the C library. These flags are removed from
225 the set of global flags if present."
228 cdl_option CYGPKG_LIBC_I18N_TESTS {
229 display "C library i18n function tests"
232 calculated { "tests/ctype tests/setlocale tests/i18nmb" }
234 This option specifies the set of tests for the C library
240 # ====================================================================