linux-omap 2.6.39: sync with meta-texasinstruments
[openembedded.git] / recipes / eglibc / eglibc-options.inc
blob0af0aab0a4046aa0710df8be6c63a830f1a46a00
1 def eglibc_cfg(feature, features, tokens, cnf ):
2         if type(tokens) == type(""):
3                 tokens = [tokens]
4         if type(features) == type([]) and feature in features:
5                 cnf.extend([token + ' = y' for token in tokens])
6         else:
7                 cnf.extend([token + ' = n' for token in tokens])
9 # Map distro features to eglibc options settings
10 def features_to_eglibc_settings(d):
11         cnf = ([])
12         distro_features = (bb.data.getVar('DISTRO_FEATURES_EGLIBC', d, True) or '').split() 
13         eglibc_cfg('ipv6',      distro_features, 'OPTION_EGLIBC_ADVANCED_INET6', cnf)
14         eglibc_cfg('backtrace',      distro_features, 'OPTION_EGLIBC_BACKTRACE', cnf)
15         eglibc_cfg('big-macros',      distro_features, 'OPTION_EGLIBC_BIG_MACROS', cnf)
16         eglibc_cfg('bsd',      distro_features, 'OPTION_EGLIBC_BSD', cnf)
17         eglibc_cfg('cxx-tests',      distro_features, 'OPTION_EGLIBC_CXX_TESTS', cnf)
18         eglibc_cfg('catgets',      distro_features, 'OPTION_EGLIBC_CATGETS', cnf)
19         eglibc_cfg('charsets',      distro_features, 'OPTION_EGLIBC_CHARSETS', cnf)
20         eglibc_cfg('crypt',      distro_features, 'OPTION_EGLIBC_CRYPT', cnf)
21         eglibc_cfg('crypt-ufc',      distro_features, 'OPTION_EGLIBC_CRYPT_UFC', cnf)
22         eglibc_cfg('db-aliases',      distro_features, 'OPTION_EGLIBC_DB_ALIASES', cnf)
23         eglibc_cfg('envz',      distro_features, 'OPTION_EGLIBC_ENVZ', cnf)
24         eglibc_cfg('fcvt',      distro_features, 'OPTION_EGLIBC_FCVT', cnf)
25         eglibc_cfg('fmtmsg',      distro_features, 'OPTION_EGLIBC_FMTMSG', cnf)
26         eglibc_cfg('fstab',      distro_features, 'OPTION_EGLIBC_FSTAB', cnf)
27         eglibc_cfg('ftraverse',      distro_features, 'OPTION_EGLIBC_FTRAVERSE', cnf)
28         eglibc_cfg('getlogin',      distro_features, 'OPTION_EGLIBC_GETLOGIN', cnf)
29         eglibc_cfg('idn',      distro_features, 'OPTION_EGLIBC_IDN', cnf)
30         eglibc_cfg('inet',      distro_features, 'OPTION_EGLIBC_INET', cnf)
31         eglibc_cfg('inet-anl',      distro_features, 'OPTION_EGLIBC_INET_ANL', cnf)
32         eglibc_cfg('libm',      distro_features, 'OPTION_EGLIBC_LIBM', cnf)
33         eglibc_cfg('libm-big',      distro_features, 'OPTION_EGLIBC_LIBM_BIG', cnf)
34         eglibc_cfg('locales',      distro_features, 'OPTION_EGLIBC_LOCALES', cnf)
35         eglibc_cfg('locale-code',      distro_features, 'OPTION_EGLIBC_LOCALE_CODE', cnf)
36         eglibc_cfg('memusage',      distro_features, 'OPTION_EGLIBC_MEMUSAGE', cnf)
37         eglibc_cfg('nis',      distro_features, 'OPTION_EGLIBC_NIS', cnf)
38         eglibc_cfg('nsswitch',      distro_features, 'OPTION_EGLIBC_NSSWITCH', cnf)
39         eglibc_cfg('rcmd',      distro_features, 'OPTION_EGLIBC_RCMD', cnf)
40         eglibc_cfg('rtld-debug',      distro_features, 'OPTION_EGLIBC_RTLD_DEBUG', cnf)
41         eglibc_cfg('spawn',      distro_features, 'OPTION_EGLIBC_SPAWN', cnf)
42         eglibc_cfg('streams',      distro_features, 'OPTION_EGLIBC_STREAMS', cnf)
43         eglibc_cfg('sunrpc',      distro_features, 'OPTION_EGLIBC_SUNRPC', cnf)
44         eglibc_cfg('utmp',      distro_features, 'OPTION_EGLIBC_UTMP', cnf)
45         eglibc_cfg('utmpx',      distro_features, 'OPTION_EGLIBC_UTMPX', cnf)
46         eglibc_cfg('wordexp',      distro_features, 'OPTION_EGLIBC_WORDEXP', cnf)
47         eglibc_cfg('posix-clang-wchar',      distro_features, 'OPTION_POSIX_C_LANG_WIDE_CHAR', cnf)
48         eglibc_cfg('posix-regexp',      distro_features, 'OPTION_POSIX_REGEXP', cnf)
49         eglibc_cfg('posix-regexp-glibc',      distro_features, 'OPTION_POSIX_REGEXP_GLIBC', cnf)
50         eglibc_cfg('posix-wchar-io',      distro_features, 'OPTION_POSIX_WIDE_CHAR_DEVICE_IO', cnf)
51         return "\n".join(cnf)