s4-waf: we don't need strerror_r from roken
[nivanova/samba-autobuild/.git] / source4 / heimdal_build / wscript_build
1 #!/usr/bin/env python
2
3 bld.SAMBA_GENERATOR(
4     name="HEIMDAL_ERRORLIST",
5     rule="${PYTHON} ${SRC[0].abspath()} ${SRC[1].abspath()} ${SRC[1].parent.abspath(env)}",
6     source = '../heimdal/lib/wind/gen-errorlist.py ../heimdal/lib/wind/rfc3454.txt ../heimdal/lib/wind/stringprep.py',
7     target = '../heimdal/lib/wind/errorlist_table.c ../heimdal/lib/wind/errorlist_table.h'
8     )
9
10
11 bld.SAMBA_GENERATOR(
12     name = 'HEIMDAL_NORMALIZE_TABLE',
13     rule="${PYTHON} ${SRC[0].abspath()} ${SRC[1].abspath()} ${SRC[2].abspath()} ${SRC[1].parent.abspath(env)}",
14     source = '../heimdal/lib/wind/gen-normalize.py ../heimdal/lib/wind/UnicodeData.txt ../heimdal/lib/wind/CompositionExclusions-3.2.0.txt',
15     target = '../heimdal/lib/wind/normalize_table.h ../heimdal/lib/wind/normalize_table.c'
16 )
17
18 bld.SAMBA_GENERATOR(
19     name = 'HEIMDAL_COMBINING_TABLE',
20     rule="${PYTHON} ${SRC[0].abspath()} ${SRC[1].abspath()} ${SRC[1].parent.abspath(env)}",
21     source = '../heimdal/lib/wind/gen-combining.py ../heimdal/lib/wind/UnicodeData.txt',
22     target = '../heimdal/lib/wind/combining_table.h ../heimdal/lib/wind/combining_table.c'
23 )
24
25 bld.SAMBA_GENERATOR(
26     name = 'HEIMDAL_BIDI_TABLE',
27     rule="${PYTHON} ${SRC[0].abspath()} ${SRC[1].abspath()} ${SRC[1].parent.abspath(env)}",
28     source = '../heimdal/lib/wind/gen-bidi.py ../heimdal/lib/wind/rfc3454.txt',
29     target = '../heimdal/lib/wind/bidi_table.h ../heimdal/lib/wind/bidi_table.c'
30 )
31
32
33 bld.SAMBA_GENERATOR(
34     name = 'HEIMDAL_MAP_TABLE',
35     rule="${PYTHON} ${SRC[0].abspath()} ${SRC[2].abspath()} ${SRC[2].parent.abspath(env)}",
36     source = '../heimdal/lib/wind/gen-map.py ../heimdal/lib/wind/stringprep.py ../heimdal/lib/wind/rfc3454.txt',
37     target = '../heimdal/lib/wind/map_table.h ../heimdal/lib/wind/map_table.c'
38 )
39
40
41 bld.SAMBA_ASN1('HEIMDAL_SPNEGO_ASN1',
42         source='../heimdal/lib/gssapi/spnego/spnego.asn1',
43         options='--sequence=MechTypeList',
44         includes='../heimdal/lib/asn1',
45         directory='lib/gssapi'
46         )
47
48
49 bld.SAMBA_ASN1('HEIMDAL_GSSAPI_ASN1',
50         '../heimdal/lib/gssapi/mech/gssapi.asn1',
51         includes='../heimdal/lib/asn1',
52         directory='lib/gssapi'
53         )
54
55
56 bld.SAMBA_ASN1('HEIMDAL_KRB5_ASN1',
57         '../heimdal/lib/asn1/krb5.asn1',
58         option_file='../heimdal/lib/asn1/krb5.opt',
59         directory='lib/asn1'
60         )
61
62
63 bld.SAMBA_ASN1('HEIMDAL_DIGEST_ASN1',
64         '../heimdal/lib/asn1/digest.asn1',
65         directory='lib/asn1'
66         )
67
68
69 bld.SAMBA_ASN1('HEIMDAL_PKCS8_ASN1',
70         '../heimdal/lib/asn1/pkcs8.asn1',
71         directory='lib/asn1'
72         )
73
74
75 bld.SAMBA_ASN1('HEIMDAL_PKCS9_ASN1',
76         '../heimdal/lib/asn1/pkcs9.asn1',
77         directory='lib/asn1'
78         )
79
80
81 bld.SAMBA_ASN1('HEIMDAL_PKCS12_ASN1',
82         '../heimdal/lib/asn1/pkcs12.asn1',
83         directory='lib/asn1'
84         )
85
86
87 bld.SAMBA_ASN1('HEIMDAL_RFC2459_ASN1',
88         '../heimdal/lib/asn1/rfc2459.asn1',
89         options='--preserve-binary=TBSCertificate --preserve-binary=TBSCRLCertList --preserve-binary=Name --sequence=GeneralNames --sequence=Extensions --sequence=CRLDistributionPoints',
90         directory='lib/asn1'
91         )
92
93
94 bld.SAMBA_ASN1('HEIMDAL_PKINIT_ASN1',
95         '../heimdal/lib/asn1/pkinit.asn1',
96         directory='lib/asn1'
97         )
98
99
100 bld.SAMBA_ASN1('HEIMDAL_CMS_ASN1',
101         '../heimdal/lib/asn1/cms.asn1',
102         option_file='../heimdal/lib/asn1/cms.opt',
103         directory='lib/asn1'
104         )
105
106
107 bld.SAMBA_ASN1('HEIMDAL_OCSP_ASN1',
108         '../heimdal/lib/hx509/ocsp.asn1',
109         options='--preserve-binary=OCSPTBSRequest --preserve-binary=OCSPResponseData',
110         includes='../heimdal/lib/asn1',
111         directory='lib/hx509'
112         )
113
114
115 bld.SAMBA_ASN1('HEIMDAL_KX509_ASN1',
116         '../heimdal/lib/asn1/kx509.asn1',
117         directory='lib/asn1'
118         )
119
120
121 bld.SAMBA_ASN1('HEIMDAL_PKCS10_ASN1',
122         '../heimdal/lib/hx509/pkcs10.asn1',
123         options='--preserve-binary=CertificationRequestInfo',
124         includes='../heimdal/lib/asn1',
125         directory='lib/hx509'
126         )
127
128
129 bld.SAMBA_ASN1('HEIMDAL_HDB_ASN1',
130         '../heimdal/lib/hdb/hdb.asn1',
131         includes='../heimdal/lib/asn1')
132
133 bld.SAMBA_ERRTABLE('HEIMDAL_ASN1_ERR_ET',
134         '../heimdal/lib/asn1/asn1_err.et')
135
136
137 bld.SAMBA_ERRTABLE('HEIMDAL_HDB_ERR_ET',
138         '../heimdal/lib/hdb/hdb_err.et')
139
140
141 bld.SAMBA_ERRTABLE('HEIMDAL_HEIM_ERR_ET',
142         '../heimdal/lib/krb5/heim_err.et')
143
144
145 bld.SAMBA_ERRTABLE('HEIMDAL_K524_ERR_ET',
146         '../heimdal/lib/krb5/k524_err.et')
147
148
149 bld.SAMBA_ERRTABLE('HEIMDAL_KRB_ERR_ET',
150         '../heimdal/lib/krb5/krb_err.et')
151
152
153 bld.SAMBA_ERRTABLE('HEIMDAL_KRB5_ERR_ET',
154         '../heimdal/lib/krb5/krb5_err.et')
155
156
157 bld.SAMBA_ERRTABLE('HEIMDAL_GKRB5_ERR_ET',
158         '../heimdal/lib/gssapi/krb5/gkrb5_err.et')
159
160
161 bld.SAMBA_ERRTABLE('HEIMDAL_HX509_ERR_ET',
162         '../heimdal/lib/hx509/hx509_err.et')
163
164
165 bld.SAMBA_ERRTABLE('HEIMDAL_WIND_ERR_ET',
166         '../heimdal/lib/wind/wind_err.et')
167
168
169 bld.SAMBA_SUBSYSTEM('HEIMDAL_ROKEN',
170         '../heimdal/lib/roken/base64.c ../heimdal/lib/roken/ct.c ../heimdal/lib/roken/hex.c ../heimdal/lib/roken/bswap.c ../heimdal/lib/roken/dumpdata.c ../heimdal/lib/roken/emalloc.c ../heimdal/lib/roken/ecalloc.c ../heimdal/lib/roken/getarg.c ../heimdal/lib/roken/get_window_size.c ../heimdal/lib/roken/getdtablesize.c ../heimdal/lib/roken/h_errno.c ../heimdal/lib/roken/issuid.c ../heimdal/lib/roken/net_read.c ../heimdal/lib/roken/net_write.c ../heimdal/lib/roken/socket.c ../heimdal/lib/roken/parse_time.c ../heimdal/lib/roken/parse_units.c ../heimdal/lib/roken/resolve.c ../heimdal/lib/roken/roken_gethostby.c ../heimdal/lib/roken/signal.c ../heimdal/lib/roken/vis.c ../heimdal/lib/roken/strlwr.c ../heimdal/lib/roken/strsep_copy.c ../heimdal/lib/roken/strsep.c ../heimdal/lib/roken/strupr.c ../heimdal/lib/roken/strpool.c ../heimdal/lib/roken/estrdup.c ../heimdal/lib/roken/erealloc.c ../heimdal/lib/roken/simple_exec.c ../heimdal/lib/roken/strcollect.c ../heimdal/lib/roken/rtbl.c ../heimdal/lib/roken/cloexec.c ../heimdal/lib/roken/xfree.c replace.c',
171         includes='../heimdal/lib/roken ../heimdal/include ../../lib/socket_wrapper',
172         deps='HEIMDAL_ROKEN_PROGNAME HEIMDAL_ROKEN_CLOSEFROM resolv LIBREPLACE_NETWORK UID_WRAPPER util'
173         )
174
175
176 bld.SAMBA_SUBSYSTEM('HEIMDAL_KDC',
177                     source='../heimdal/kdc/default_config.c ../heimdal/kdc/kerberos5.c ../heimdal/kdc/krb5tgs.c ../heimdal/kdc/pkinit.c ../heimdal/kdc/log.c ../heimdal/kdc/misc.c ../heimdal/kdc/kaserver.c ../heimdal/kdc/digest.c ../heimdal/kdc/process.c ../heimdal/kdc/windc.c ../heimdal/kdc/kx509.c',
178                     includes='../heimdal/kdc',
179                     heimdal_autoproto='../heimdal/kdc/kdc-protos.h',
180                     heimdal_autoproto_private='../heimdal/kdc/kdc-private.h',
181                     deps='HEIMDAL_ROKEN HEIMDAL_KRB5 HEIMDAL_HDB HEIMDAL_HEIM_ASN1 HEIMDAL_DIGEST_ASN1 HEIMDAL_KX509_ASN1 HEIMDAL_NTLM HEIMDAL_HCRYPTO'
182                     )
183
184
185 bld.SAMBA_SUBSYSTEM('HEIMDAL_NTLM',
186                     source='../heimdal/lib/ntlm/ntlm.c',
187                     includes='../heimdal/lib/ntlm',
188                     heimdal_autoproto='../heimdal/lib/ntlm/heimntlm-protos.h',
189                     deps='HEIMDAL_ROKEN HEIMDAL_HCRYPTO HEIMDAL_KRB5'
190         )
191
192
193 bld.SAMBA_SUBSYSTEM('HEIMDAL_HDB_KEYS',
194         '../heimdal/lib/hdb/keys.c',
195         includes='../heimdal/lib/hdb',
196         deps='HEIMDAL_ROKEN HEIMDAL_HCRYPTO HEIMDAL_KRB5 HEIMDAL_HDB_ASN1'
197         )
198
199
200 bld.SAMBA_SUBSYSTEM('HEIMDAL_HDB',
201                     source='''../heimdal/lib/hdb/db.c ../heimdal/lib/hdb/dbinfo.c ../heimdal/lib/hdb/hdb.c
202                               ../heimdal/lib/hdb/ext.c ../heimdal/lib/hdb/keytab.c ../heimdal/lib/hdb/hdb-keytab.c
203                               ../heimdal/lib/hdb/mkey.c ../heimdal/lib/hdb/ndbm.c ../heimdal/lib/hdb/hdb_err.c
204                               hdb-glue.c''',
205                     includes='../heimdal/lib/hdb ../heimdal/lib/com_err',
206                     heimdal_autoproto='../heimdal/lib/hdb/hdb-protos.h',
207                     heimdal_autoproto_private='../heimdal/lib/hdb/hdb-private.h',
208                     deps='HDB_LDB HEIMDAL_KRB5 HEIMDAL_HDB_KEYS HEIMDAL_ROKEN HEIMDAL_HCRYPTO HEIMDAL_COM_ERR HEIMDAL_HDB_ASN1'
209         )
210
211
212 bld.SAMBA_SUBSYSTEM('HEIMDAL_GSSAPI',
213                     '''
214 ../heimdal/lib/gssapi/spnego/init_sec_context.c ../heimdal/lib/gssapi/spnego/external.c ../heimdal/lib/gssapi/spnego/compat.c
215 ../heimdal/lib/gssapi/spnego/context_stubs.c ../heimdal/lib/gssapi/spnego/cred_stubs.c ../heimdal/lib/gssapi/spnego/accept_sec_context.c
216 ../heimdal/lib/gssapi/krb5/copy_ccache.c ../heimdal/lib/gssapi/krb5/delete_sec_context.c ../heimdal/lib/gssapi/krb5/init_sec_context.c
217 ../heimdal/lib/gssapi/krb5/context_time.c ../heimdal/lib/gssapi/krb5/init.c ../heimdal/lib/gssapi/krb5/address_to_krb5addr.c
218 ../heimdal/lib/gssapi/krb5/get_mic.c ../heimdal/lib/gssapi/krb5/inquire_context.c ../heimdal/lib/gssapi/krb5/add_cred.c
219 ../heimdal/lib/gssapi/krb5/inquire_cred.c ../heimdal/lib/gssapi/krb5/inquire_cred_by_oid.c ../heimdal/lib/gssapi/krb5/inquire_cred_by_mech.c
220 ../heimdal/lib/gssapi/krb5/inquire_mechs_for_name.c ../heimdal/lib/gssapi/krb5/inquire_names_for_mech.c ../heimdal/lib/gssapi/krb5/indicate_mechs.c
221 ../heimdal/lib/gssapi/krb5/inquire_sec_context_by_oid.c ../heimdal/lib/gssapi/krb5/export_sec_context.c ../heimdal/lib/gssapi/krb5/import_sec_context.c
222 ../heimdal/lib/gssapi/krb5/duplicate_name.c ../heimdal/lib/gssapi/krb5/import_name.c ../heimdal/lib/gssapi/krb5/compare_name.c
223 ../heimdal/lib/gssapi/krb5/export_name.c ../heimdal/lib/gssapi/krb5/canonicalize_name.c ../heimdal/lib/gssapi/krb5/unwrap.c
224 ../heimdal/lib/gssapi/krb5/wrap.c ../heimdal/lib/gssapi/krb5/release_name.c ../heimdal/lib/gssapi/krb5/cfx.c
225 ../heimdal/lib/gssapi/krb5/8003.c ../heimdal/lib/gssapi/krb5/arcfour.c ../heimdal/lib/gssapi/krb5/encapsulate.c
226 ../heimdal/lib/gssapi/krb5/display_name.c ../heimdal/lib/gssapi/krb5/sequence.c ../heimdal/lib/gssapi/krb5/display_status.c
227 ../heimdal/lib/gssapi/krb5/release_buffer.c ../heimdal/lib/gssapi/krb5/external.c ../heimdal/lib/gssapi/krb5/compat.c
228 ../heimdal/lib/gssapi/krb5/creds.c ../heimdal/lib/gssapi/krb5/acquire_cred.c ../heimdal/lib/gssapi/krb5/release_cred.c
229 ../heimdal/lib/gssapi/krb5/store_cred.c ../heimdal/lib/gssapi/krb5/set_cred_option.c ../heimdal/lib/gssapi/krb5/decapsulate.c
230 ../heimdal/lib/gssapi/krb5/verify_mic.c ../heimdal/lib/gssapi/krb5/accept_sec_context.c ../heimdal/lib/gssapi/krb5/set_sec_context_option.c
231 ../heimdal/lib/gssapi/krb5/process_context_token.c ../heimdal/lib/gssapi/krb5/prf.c ../heimdal/lib/gssapi/krb5/aeap.c
232 ../heimdal/lib/gssapi/mech/context.c ../heimdal/lib/gssapi/mech/gss_krb5.c ../heimdal/lib/gssapi/mech/gss_mech_switch.c
233 ../heimdal/lib/gssapi/mech/gss_process_context_token.c ../heimdal/lib/gssapi/mech/gss_buffer_set.c
234 ../heimdal/lib/gssapi/mech/gss_aeap.c ../heimdal/lib/gssapi/mech/gss_add_cred.c ../heimdal/lib/gssapi/mech/gss_cred.c
235 ../heimdal/lib/gssapi/mech/gss_add_oid_set_member.c ../heimdal/lib/gssapi/mech/gss_compare_name.c ../heimdal/lib/gssapi/mech/gss_release_oid_set.c
236 ../heimdal/lib/gssapi/mech/gss_create_empty_oid_set.c ../heimdal/lib/gssapi/mech/gss_decapsulate_token.c ../heimdal/lib/gssapi/mech/gss_inquire_cred_by_oid.c
237 ../heimdal/lib/gssapi/mech/gss_canonicalize_name.c ../heimdal/lib/gssapi/mech/gss_inquire_sec_context_by_oid.c ../heimdal/lib/gssapi/mech/gss_inquire_names_for_mech.c
238 ../heimdal/lib/gssapi/mech/gss_inquire_mechs_for_name.c ../heimdal/lib/gssapi/mech/gss_wrap_size_limit.c ../heimdal/lib/gssapi/mech/gss_names.c
239 ../heimdal/lib/gssapi/mech/gss_verify.c ../heimdal/lib/gssapi/mech/gss_display_name.c
240 ../heimdal/lib/gssapi/mech/gss_duplicate_oid.c ../heimdal/lib/gssapi/mech/gss_display_status.c ../heimdal/lib/gssapi/mech/gss_release_buffer.c
241 ../heimdal/lib/gssapi/mech/gss_release_oid.c ../heimdal/lib/gssapi/mech/gss_test_oid_set_member.c
242 ../heimdal/lib/gssapi/mech/gss_release_cred.c
243 ../heimdal/lib/gssapi/mech/gss_set_sec_context_option.c ../heimdal/lib/gssapi/mech/gss_export_name.c ../heimdal/lib/gssapi/mech/gss_seal.c
244 ../heimdal/lib/gssapi/mech/gss_acquire_cred.c ../heimdal/lib/gssapi/mech/gss_unseal.c ../heimdal/lib/gssapi/mech/gss_verify_mic.c
245 ../heimdal/lib/gssapi/mech/gss_accept_sec_context.c ../heimdal/lib/gssapi/mech/gss_inquire_cred_by_mech.c ../heimdal/lib/gssapi/mech/gss_indicate_mechs.c
246 ../heimdal/lib/gssapi/mech/gss_delete_sec_context.c ../heimdal/lib/gssapi/mech/gss_sign.c ../heimdal/lib/gssapi/mech/gss_utils.c
247 ../heimdal/lib/gssapi/mech/gss_init_sec_context.c ../heimdal/lib/gssapi/mech/gss_oid_equal.c ../heimdal/lib/gssapi/mech/gss_oid_to_str.c
248 ../heimdal/lib/gssapi/mech/gss_context_time.c ../heimdal/lib/gssapi/mech/gss_encapsulate_token.c ../heimdal/lib/gssapi/mech/gss_get_mic.c
249 ../heimdal/lib/gssapi/mech/gss_import_sec_context.c ../heimdal/lib/gssapi/mech/gss_inquire_cred.c ../heimdal/lib/gssapi/mech/gss_wrap.c
250 ../heimdal/lib/gssapi/mech/gss_import_name.c ../heimdal/lib/gssapi/mech/gss_duplicate_name.c ../heimdal/lib/gssapi/mech/gss_unwrap.c
251 ../heimdal/lib/gssapi/mech/gss_export_sec_context.c ../heimdal/lib/gssapi/mech/gss_inquire_context.c ../heimdal/lib/gssapi/mech/gss_release_name.c
252 ../heimdal/lib/gssapi/mech/gss_set_cred_option.c  ../heimdal/lib/gssapi/mech/gss_pseudo_random.c gssapi-glue.c''',
253         includes='../heimdal/lib/gssapi ../heimdal/lib/gssapi/gssapi ../heimdal/lib/gssapi/spnego ../heimdal/lib/gssapi/krb5 ../heimdal/lib/gssapi/mech',
254         deps='HEIMDAL_HCRYPTO HEIMDAL_HEIM_ASN1 HEIMDAL_SPNEGO_ASN1 HEIMDAL_GSSAPI_ASN1 HEIMDAL_ROKEN HEIMDAL_KRB5'
255         )
256
257
258 bld.SAMBA_GENERATOR(
259     name="HEIMDAL_IFADDRS_H",
260     rule="rm -f ${TGT} && ln ${SRC} ${TGT}",
261     source = 'ifaddrs.hin',
262     target = 'ifaddrs.h',
263     enabled = not bld.CONFIG_SET('HAVE_IFADDRS_H')
264     )
265
266 bld.SAMBA_GENERATOR(
267     group='build_compiler_source',
268     name="HEIMDAL_ERR_H",
269     rule="rm -f ${TGT} && ln ${SRC} ${TGT}",
270     source = '../heimdal/lib/roken/err.hin',
271     target = '../heimdal/lib/roken/err.h',
272     enabled = not bld.CONFIG_SET('HAVE_ERR_H')
273     )
274
275 bld.SAMBA_SUBSYSTEM('HEIMDAL_KRB5',
276                     bld.SUBDIR('../heimdal/lib/krb5/',
277                                '''acache.c add_et_list.c
278                                addr_families.c appdefault.c
279                                asn1_glue.c auth_context.c
280                                build_ap_req.c build_auth.c cache.c
281                                changepw.c codec.c config_file.c
282                                constants.c context.c convert_creds.c
283                                copy_host_realm.c crc.c creds.c
284                                crypto.c data.c eai_to_heim_errno.c
285                                error_string.c expand_hostname.c
286                                fcache.c free.c free_host_realm.c
287                                generate_seq_number.c generate_subkey.c
288                                get_addrs.c get_cred.c
289                                get_default_principal.c
290                                get_default_realm.c get_for_creds.c
291                                get_host_realm.c get_in_tkt.c
292                                get_port.c init_creds.c init_creds_pw.c
293                                kcm.c keyblock.c keytab.c keytab_any.c
294                                keytab_file.c keytab_memory.c
295                                keytab_keyfile.c krbhst.c log.c
296                                mcache.c misc.c mk_error.c mk_priv.c
297                                mk_rep.c mk_req.c mk_req_ext.c
298                                mit_glue.c n-fold.c padata.c pkinit.c
299                                plugin.c principal.c prog_setup.c pac.c
300                                prompter_posix.c rd_cred.c rd_error.c
301                                rd_priv.c rd_rep.c rd_req.c replay.c
302                                send_to_kdc.c set_default_realm.c
303                                store.c store_emem.c store_fd.c
304                                store_mem.c ticket.c time.c transited.c
305                                v4_glue.c version.c warn.c krb5_err.c
306                                heim_err.c k524_err.c krb_err.c''') + ' krb5-glue.c',
307                     includes='../heimdal/lib/krb5 ../heimdal/lib/asn1 ../heimdal/lib/com_err',
308                     public_deps='HEIMDAL_COM_ERR',
309                     heimdal_autoproto='../heimdal/lib/krb5/krb5-protos.h',
310                     heimdal_autoproto_options='-E KRB5_LIB -q -P comment -o',
311                     heimdal_autoproto_private='../heimdal/lib/krb5/krb5-private.h',
312                     deps='HEIMDAL_ROKEN HEIMDAL_PKINIT_ASN1 HEIMDAL_WIND HEIMDAL_KRB5_ASN1 HEIMDAL_HX509 HEIMDAL_HCRYPTO LIBNETIF LIBSAMBA-HOSTCONFIG intl'
313                     )
314
315
316 bld.SAMBA_SUBSYSTEM('HEIMDAL_HEIM_ASN1',
317         '../heimdal/lib/asn1/der_get.c ../heimdal/lib/asn1/der_put.c ../heimdal/lib/asn1/der_free.c ../heimdal/lib/asn1/der_format.c ../heimdal/lib/asn1/der_length.c ../heimdal/lib/asn1/der_copy.c ../heimdal/lib/asn1/der_cmp.c ../heimdal/lib/asn1/extra.c ../heimdal/lib/asn1/timegm.c ../heimdal/lib/asn1/asn1_err.c',
318         includes='../heimdal/lib/asn1',
319         deps='HEIMDAL_ROKEN HEIMDAL_COM_ERR'
320         )
321
322
323 bld.SAMBA_SUBSYSTEM('HEIMDAL_HCRYPTO_IMATH',
324         '../heimdal/lib/hcrypto/imath/imath.c ../heimdal/lib/hcrypto/imath/iprime.c',
325         includes='../heimdal/lib/hcrypto/imath',
326         deps='HEIMDAL_ROKEN'
327         )
328
329
330 bld.SAMBA_SUBSYSTEM('HEIMDAL_HCRYPTO',
331         '../heimdal/lib/hcrypto/aes.c ../heimdal/lib/hcrypto/bn.c ../heimdal/lib/hcrypto/dh.c ../heimdal/lib/hcrypto/dh-imath.c ../heimdal/lib/hcrypto/des.c ../heimdal/lib/hcrypto/dsa.c ../heimdal/lib/hcrypto/engine.c ../heimdal/lib/hcrypto/md2.c ../heimdal/lib/hcrypto/md4.c ../heimdal/lib/hcrypto/md5.c ../heimdal/lib/hcrypto/rsa.c ../heimdal/lib/hcrypto/rsa-imath.c ../heimdal/lib/hcrypto/rc2.c ../heimdal/lib/hcrypto/rc4.c ../heimdal/lib/hcrypto/rijndael-alg-fst.c ../heimdal/lib/hcrypto/rnd_keys.c ../heimdal/lib/hcrypto/sha.c ../heimdal/lib/hcrypto/sha256.c ../heimdal/lib/hcrypto/ui.c ../heimdal/lib/hcrypto/evp.c ../heimdal/lib/hcrypto/evp-hcrypto.c ../heimdal/lib/hcrypto/evp-cc.c ../heimdal/lib/hcrypto/pkcs5.c ../heimdal/lib/hcrypto/pkcs12.c ../heimdal/lib/hcrypto/rand.c ../heimdal/lib/hcrypto/rand-egd.c ../heimdal/lib/hcrypto/rand-unix.c ../heimdal/lib/hcrypto/rand-fortuna.c ../heimdal/lib/hcrypto/rand-timer.c ../heimdal/lib/hcrypto/hmac.c ../heimdal/lib/hcrypto/camellia.c ../heimdal/lib/hcrypto/camellia-ntt.c',
332         includes='../heimdal/lib/hcrypto ../heimdal/lib',
333         deps='HEIMDAL_ROKEN HEIMDAL_HEIM_ASN1 HEIMDAL_HCRYPTO_IMATH HEIMDAL_RFC2459_ASN1'
334         )
335
336
337 bld.SAMBA_SUBSYSTEM('HEIMDAL_HX509',
338         '../heimdal/lib/hx509/ca.c ../heimdal/lib/hx509/cert.c ../heimdal/lib/hx509/cms.c ../heimdal/lib/hx509/collector.c ../heimdal/lib/hx509/crypto.c ../heimdal/lib/hx509/error.c ../heimdal/lib/hx509/env.c ../heimdal/lib/hx509/file.c ../heimdal/lib/hx509/keyset.c ../heimdal/lib/hx509/ks_dir.c ../heimdal/lib/hx509/ks_file.c ../heimdal/lib/hx509/ks_keychain.c ../heimdal/lib/hx509/ks_mem.c ../heimdal/lib/hx509/ks_null.c ../heimdal/lib/hx509/ks_p11.c ../heimdal/lib/hx509/ks_p12.c ../heimdal/lib/hx509/lock.c ../heimdal/lib/hx509/name.c ../heimdal/lib/hx509/peer.c ../heimdal/lib/hx509/print.c ../heimdal/lib/hx509/req.c ../heimdal/lib/hx509/revoke.c ../heimdal/lib/hx509/sel.c ../heimdal/lib/hx509/hx509_err.c ../heimdal/lib/hx509/sel-lex.c ../heimdal/lib/hx509/sel-gram.c',
339         includes='../heimdal/lib/hx509',
340         deps='HEIMDAL_ROKEN HEIMDAL_COM_ERR HEIMDAL_HEIM_ASN1 HEIMDAL_HCRYPTO HEIMDAL_CMS_ASN1 HEIMDAL_RFC2459_ASN1 HEIMDAL_OCSP_ASN1 HEIMDAL_PKCS8_ASN1 HEIMDAL_PKCS9_ASN1 HEIMDAL_PKCS12_ASN1 HEIMDAL_PKINIT_ASN1 HEIMDAL_PKCS10_ASN1 HEIMDAL_WIND'
341         )
342
343
344 bld.SAMBA_SUBSYSTEM('HEIMDAL_WIND',
345         '../heimdal/lib/wind/wind_err.c ../heimdal/lib/wind/stringprep.c ../heimdal/lib/wind/errorlist.c ../heimdal/lib/wind/errorlist_table.c ../heimdal/lib/wind/normalize.c ../heimdal/lib/wind/normalize_table.c ../heimdal/lib/wind/combining.c ../heimdal/lib/wind/combining_table.c ../heimdal/lib/wind/utf8.c ../heimdal/lib/wind/bidi.c ../heimdal/lib/wind/bidi_table.c ../heimdal/lib/wind/ldap.c ../heimdal/lib/wind/map.c ../heimdal/lib/wind/map_table.c',
346         includes='../heimdal/lib/wind',
347         deps='HEIMDAL_ROKEN HEIMDAL_COM_ERR'
348         )
349
350
351 bld.SAMBA_SUBSYSTEM('HEIMDAL_ROKEN_PROGNAME',
352         '../heimdal/lib/roken/getprogname.c ../heimdal/lib/roken/setprogname.c',
353         includes='../heimdal/lib/roken',
354         deps='replace',
355         enabled=not bld.CONFIG_SET('HAVE_GETPROGNAME')
356         )
357
358
359 bld.SAMBA_SUBSYSTEM('HEIMDAL_ROKEN_CLOSEFROM',
360         '../heimdal/lib/roken/closefrom.c',
361         includes='../heimdal/lib/roken',
362         deps='replace',
363         enabled=not bld.CONFIG_SET('HAVE_CLOSEFROM')
364         )
365
366
367 bld.SAMBA_SUBSYSTEM('HEIMDAL_ROKEN_PROGNAME_H',
368         '../heimdal/lib/roken/getprogname.c ../heimdal/lib/roken/setprogname.c',
369         cflags='-DSOCKET_WRAPPER_DISABLE=1 -DNSS_WRAPPER_DISABLE=1',
370         includes='../heimdal/lib/roken',
371         deps='replace',
372         group='compiler_libraries',
373         enabled=not bld.CONFIG_SET('HAVE_GETPROGNAME')
374         )
375
376
377 bld.SAMBA_SUBSYSTEM('HEIMDAL_ROKEN_CLOSEFROM_H',
378         '../heimdal/lib/roken/closefrom.c',
379         cflags='-DSOCKET_WRAPPER_DISABLE=1 -DNSS_WRAPPER_DISABLE=1',
380         includes='../heimdal/lib/roken',
381         deps='replace',
382         group='compiler_libraries',
383         enabled=not bld.CONFIG_SET('HAVE_CLOSEFROM')
384         )
385
386
387 bld.SAMBA_SUBSYSTEM('HEIMDAL_ROKEN_H',
388         '../heimdal/lib/roken/base64.c ../heimdal/lib/roken/ct.c ../heimdal/lib/roken/hex.c ../heimdal/lib/roken/bswap.c ../heimdal/lib/roken/dumpdata.c ../heimdal/lib/roken/emalloc.c ../heimdal/lib/roken/ecalloc.c ../heimdal/lib/roken/getarg.c ../heimdal/lib/roken/get_window_size.c ../heimdal/lib/roken/getdtablesize.c ../heimdal/lib/roken/h_errno.c ../heimdal/lib/roken/issuid.c ../heimdal/lib/roken/net_read.c ../heimdal/lib/roken/net_write.c ../heimdal/lib/roken/socket.c ../heimdal/lib/roken/parse_time.c ../heimdal/lib/roken/parse_units.c ../heimdal/lib/roken/resolve.c ../heimdal/lib/roken/roken_gethostby.c ../heimdal/lib/roken/signal.c ../heimdal/lib/roken/vis.c ../heimdal/lib/roken/strlwr.c ../heimdal/lib/roken/strsep_copy.c ../heimdal/lib/roken/strsep.c ../heimdal/lib/roken/strupr.c ../heimdal/lib/roken/strpool.c ../heimdal/lib/roken/estrdup.c ../heimdal/lib/roken/erealloc.c ../heimdal/lib/roken/simple_exec.c ../heimdal/lib/roken/strcollect.c ../heimdal/lib/roken/rtbl.c ../heimdal/lib/roken/cloexec.c ../heimdal/lib/roken/xfree.c replace.c',
389         includes='../heimdal/lib/roken',
390         cflags='-DSOCKET_WRAPPER_DISABLE=1 -DNSS_WRAPPER_DISABLE=1',
391         group='compiler_libraries',
392         deps='HEIMDAL_ROKEN_PROGNAME_H HEIMDAL_ROKEN_CLOSEFROM_H resolv LIBREPLACE_NETWORK'
393         )
394
395
396 bld.SAMBA_SUBSYSTEM('HEIMDAL_COM_ERR',
397         '../heimdal/lib/com_err/com_err.c ../heimdal/lib/com_err/error.c',
398         includes='../heimdal/lib/com_err',
399         deps='HEIMDAL_ROKEN',
400         enabled=not bld.CONFIG_SET('HAVE_COM_ERR')
401         )
402
403
404 # here is the asn1 compiler build rule
405 bld.SAMBA_BINARY('asn1_compile',
406         '../heimdal/lib/asn1/main.c ../heimdal/lib/asn1/gen.c ../heimdal/lib/asn1/gen_copy.c ../heimdal/lib/asn1/gen_decode.c ../heimdal/lib/asn1/gen_encode.c ../heimdal/lib/asn1/gen_free.c ../heimdal/lib/asn1/gen_glue.c ../heimdal/lib/asn1/gen_length.c ../heimdal/lib/asn1/gen_seq.c ../heimdal/lib/asn1/gen_template.c ../heimdal/lib/asn1/hash.c ../heimdal/lib/asn1/symbol.c ../heimdal/lib/asn1/asn1parse.c ../heimdal/lib/asn1/lex.c ../heimdal/lib/vers/print_version.c',
407         use_hostcc=True,
408         cflags='-DSOCKET_WRAPPER_DISABLE=1 -DNSS_WRAPPER_DISABLE=1 -D_SAMBA_HOSTCC_',
409         includes='../heimdal/lib/asn1 ../heimdal/lib/roken',
410         group='build_compilers',
411         deps='HEIMDAL_ROKEN_H replace',
412         install=False
413         )
414
415
416 bld.SAMBA_BINARY('compile_et',
417         '../heimdal/lib/vers/print_version.c ../heimdal/lib/com_err/parse.c ../heimdal/lib/com_err/lex.c ../heimdal/lib/com_err/compile_et.c',
418         use_hostcc=True,
419         includes='../heimdal/lib/com_err',
420         group='build_compilers',
421         cflags='-DSOCKET_WRAPPER_DISABLE=1 -DNSS_WRAPPER_DISABLE=1 -D_SAMBA_HOSTCC_',
422         deps='HEIMDAL_ROKEN_H replace',
423         install=False
424         )
425
426
427 bld.SAMBA_BINARY('samba4kinit',
428         '../heimdal/kuser/kinit.c ../heimdal/lib/vers/print_version.c',
429         includes='../heimdal/lib/roken',
430         deps='HEIMDAL_KRB5 HEIMDAL_NTLM',
431         install=False
432         )
433
434
435 bld.SAMBA_BINARY('samba4kpasswd',
436         '../heimdal/kpasswd/kpasswd.c ../heimdal/lib/vers/print_version.c',
437         includes='../heimdal/lib/roken',
438         deps='HEIMDAL_KRB5 HEIMDAL_NTLM',
439         install=False
440         )
441
442
443 bld.SAMBA_BINARY('rkpty',
444         '../heimdal/lib/roken/rkpty.c',
445         deps='HEIMDAL_ROKEN OPENPTY',
446         cflags='-DPACKAGE="Samba"',
447         install=False
448         )
449
450 HEIMDAL_GSSAPI_SPNEGO_SOURCE = '''
451         ../heimdal/lib/gssapi/spnego/init_sec_context.c
452         ../heimdal/lib/gssapi/spnego/external.c
453         ../heimdal/lib/gssapi/spnego/compat.c
454         ../heimdal/lib/gssapi/spnego/context_stubs.c
455         ../heimdal/lib/gssapi/spnego/cred_stubs.c
456         ../heimdal/lib/gssapi/spnego/accept_sec_context.c
457 '''
458
459 bld.HEIMDAL_AUTOPROTO_PRIVATE('../heimdal/lib/gssapi/spnego/spnego-private.h',
460                               HEIMDAL_GSSAPI_SPNEGO_SOURCE)
461
462
463 HEIMDAL_GSSAPI_KRB5_SOURCE = '''
464         ../heimdal/lib/gssapi/krb5/copy_ccache.c
465         ../heimdal/lib/gssapi/krb5/delete_sec_context.c
466         ../heimdal/lib/gssapi/krb5/init_sec_context.c
467         ../heimdal/lib/gssapi/krb5/context_time.c
468         ../heimdal/lib/gssapi/krb5/init.c
469         ../heimdal/lib/gssapi/krb5/address_to_krb5addr.c
470         ../heimdal/lib/gssapi/krb5/get_mic.c
471         ../heimdal/lib/gssapi/krb5/inquire_context.c
472         ../heimdal/lib/gssapi/krb5/add_cred.c
473         ../heimdal/lib/gssapi/krb5/inquire_cred.c
474         ../heimdal/lib/gssapi/krb5/inquire_cred_by_oid.c
475         ../heimdal/lib/gssapi/krb5/inquire_cred_by_mech.c
476         ../heimdal/lib/gssapi/krb5/inquire_mechs_for_name.c
477         ../heimdal/lib/gssapi/krb5/inquire_names_for_mech.c
478         ../heimdal/lib/gssapi/krb5/indicate_mechs.c
479         ../heimdal/lib/gssapi/krb5/inquire_sec_context_by_oid.c
480         ../heimdal/lib/gssapi/krb5/export_sec_context.c
481         ../heimdal/lib/gssapi/krb5/import_sec_context.c
482         ../heimdal/lib/gssapi/krb5/duplicate_name.c
483         ../heimdal/lib/gssapi/krb5/import_name.c
484         ../heimdal/lib/gssapi/krb5/compare_name.c
485         ../heimdal/lib/gssapi/krb5/export_name.c
486         ../heimdal/lib/gssapi/krb5/canonicalize_name.c
487         ../heimdal/lib/gssapi/krb5/unwrap.c
488         ../heimdal/lib/gssapi/krb5/wrap.c
489         ../heimdal/lib/gssapi/krb5/release_name.c
490         ../heimdal/lib/gssapi/krb5/cfx.c
491         ../heimdal/lib/gssapi/krb5/8003.c
492         ../heimdal/lib/gssapi/krb5/arcfour.c
493         ../heimdal/lib/gssapi/krb5/encapsulate.c
494         ../heimdal/lib/gssapi/krb5/display_name.c
495         ../heimdal/lib/gssapi/krb5/sequence.c
496         ../heimdal/lib/gssapi/krb5/display_status.c
497         ../heimdal/lib/gssapi/krb5/release_buffer.c
498         ../heimdal/lib/gssapi/krb5/external.c
499         ../heimdal/lib/gssapi/krb5/compat.c
500         ../heimdal/lib/gssapi/krb5/creds.c
501         ../heimdal/lib/gssapi/krb5/acquire_cred.c
502         ../heimdal/lib/gssapi/krb5/release_cred.c
503         ../heimdal/lib/gssapi/krb5/store_cred.c
504         ../heimdal/lib/gssapi/krb5/set_cred_option.c
505         ../heimdal/lib/gssapi/krb5/decapsulate.c
506         ../heimdal/lib/gssapi/krb5/verify_mic.c
507         ../heimdal/lib/gssapi/krb5/accept_sec_context.c
508         ../heimdal/lib/gssapi/krb5/set_sec_context_option.c
509         ../heimdal/lib/gssapi/krb5/process_context_token.c
510         ../heimdal/lib/gssapi/krb5/prf.c
511         ../heimdal/lib/gssapi/krb5/aeap.c
512 '''
513
514 bld.HEIMDAL_AUTOPROTO_PRIVATE('../heimdal/lib/gssapi/krb5/gsskrb5-private.h',
515                               HEIMDAL_GSSAPI_KRB5_SOURCE)
516
517
518 HEIMDAL_HX509_OBJH_SOURCE = '''
519         ../heimdal/lib/hx509/ca.c
520         ../heimdal/lib/hx509/cert.c
521         ../heimdal/lib/hx509/cms.c
522         ../heimdal/lib/hx509/collector.c
523         ../heimdal/lib/hx509/crypto.c
524         ../heimdal/lib/hx509/error.c
525         ../heimdal/lib/hx509/env.c
526         ../heimdal/lib/hx509/file.c
527         ../heimdal/lib/hx509/keyset.c
528         ../heimdal/lib/hx509/ks_dir.c
529         ../heimdal/lib/hx509/ks_file.c
530         ../heimdal/lib/hx509/ks_keychain.c
531         ../heimdal/lib/hx509/ks_mem.c
532         ../heimdal/lib/hx509/ks_null.c
533         ../heimdal/lib/hx509/ks_p11.c
534         ../heimdal/lib/hx509/ks_p12.c
535         ../heimdal/lib/hx509/lock.c
536         ../heimdal/lib/hx509/name.c
537         ../heimdal/lib/hx509/peer.c
538         ../heimdal/lib/hx509/print.c
539         ../heimdal/lib/hx509/req.c
540         ../heimdal/lib/hx509/revoke.c
541         ../heimdal/lib/hx509/sel.c
542         ../heimdal/lib/hx509/hx509_err.c
543 '''
544
545 bld.HEIMDAL_AUTOPROTO('../heimdal/lib/hx509/hx509-protos.h',
546                       HEIMDAL_HX509_OBJH_SOURCE,
547                       options="-R '^(_|^C)' -E HX509_LIB -q -P comment -o")
548
549 bld.HEIMDAL_AUTOPROTO('../heimdal/lib/hx509/hx509-private.h',
550                       HEIMDAL_HX509_OBJH_SOURCE,
551                       options="-q -P comment -p")
552
553 HEIMDAL_HEIM_ASN1_DER_SOURCE = '''
554         ../heimdal/lib/asn1/der_get.c
555         ../heimdal/lib/asn1/der_put.c
556         ../heimdal/lib/asn1/der_free.c
557         ../heimdal/lib/asn1/der_format.c
558         ../heimdal/lib/asn1/der_length.c
559         ../heimdal/lib/asn1/der_copy.c
560         ../heimdal/lib/asn1/der_cmp.c
561 '''
562
563 bld.HEIMDAL_AUTOPROTO('../heimdal/lib/asn1/der-protos.h',
564                       HEIMDAL_HEIM_ASN1_DER_SOURCE,
565                       group = 'compiler_prototypes',
566                       options="-q -P comment -o")
567
568
569 bld.HEIMDAL_AUTOPROTO('../heimdal/lib/asn1/der-private.h',
570                       HEIMDAL_HEIM_ASN1_DER_SOURCE,
571                       group = 'compiler_prototypes',
572                       options="-q -P comment -p")
573