s4-waf: merge in the latest changes from master
[samba.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/strerror_r.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         enabled=not bld.CONFIG_SET('HAVE_GETPROGNAME')
355         )
356
357
358 bld.SAMBA_SUBSYSTEM('HEIMDAL_ROKEN_CLOSEFROM',
359         '../heimdal/lib/roken/closefrom.c',
360         includes='../heimdal/lib/roken',
361         enabled=not bld.CONFIG_SET('HAVE_CLOSEFROM')
362         )
363
364
365 bld.SAMBA_SUBSYSTEM('HEIMDAL_ROKEN_PROGNAME_H',
366         '../heimdal/lib/roken/getprogname.c ../heimdal/lib/roken/setprogname.c',
367         cflags='-DSOCKET_WRAPPER_DISABLE=1 -DNSS_WRAPPER_DISABLE=1',
368         includes='../heimdal/lib/roken',
369         enabled=not bld.CONFIG_SET('HAVE_GETPROGNAME')
370         )
371
372
373 bld.SAMBA_SUBSYSTEM('HEIMDAL_ROKEN_CLOSEFROM_H',
374         '../heimdal/lib/roken/closefrom.c',
375         cflags='-DSOCKET_WRAPPER_DISABLE=1 -DNSS_WRAPPER_DISABLE=1',
376         includes='../heimdal/lib/roken',
377         enabled=not bld.CONFIG_SET('HAVE_CLOSEFROM')
378         )
379
380
381 bld.SAMBA_SUBSYSTEM('HEIMDAL_ROKEN_H',
382         '../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/strerror_r.c ../heimdal/lib/roken/rtbl.c ../heimdal/lib/roken/cloexec.c ../heimdal/lib/roken/xfree.c replace.c',
383         includes='../heimdal/lib/roken',
384         cflags='-DSOCKET_WRAPPER_DISABLE=1 -DNSS_WRAPPER_DISABLE=1',
385         deps='HEIMDAL_ROKEN_PROGNAME_H HEIMDAL_ROKEN_CLOSEFROM_H resolv LIBREPLACE_NETWORK'
386         )
387
388
389 bld.SAMBA_SUBSYSTEM('HEIMDAL_COM_ERR',
390         '../heimdal/lib/com_err/com_err.c ../heimdal/lib/com_err/error.c',
391         includes='../heimdal/lib/com_err',
392         deps='HEIMDAL_ROKEN',
393         enabled=not bld.CONFIG_SET('HAVE_COM_ERR')
394         )
395
396
397 # here is the asn1 compiler build rule
398 bld.SAMBA_BINARY('asn1_compile',
399         '../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',
400         use_hostcc=True,
401         cflags='-DSOCKET_WRAPPER_DISABLE=1 -DNSS_WRAPPER_DISABLE=1 -D_SAMBA_HOSTCC_',
402         includes='../heimdal/lib/asn1 ../heimdal/lib/roken',
403         group='build_compilers',
404         deps='HEIMDAL_ROKEN_H replace',
405         install=False
406         )
407
408
409 bld.SAMBA_BINARY('compile_et',
410         '../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',
411         use_hostcc=True,
412         includes='../heimdal/lib/com_err',
413         group='build_compilers',
414         cflags='-DSOCKET_WRAPPER_DISABLE=1 -DNSS_WRAPPER_DISABLE=1 -D_SAMBA_HOSTCC_',
415         deps='HEIMDAL_ROKEN_H replace',
416         install=False
417         )
418
419
420 bld.SAMBA_BINARY('samba4kinit',
421         '../heimdal/kuser/kinit.c ../heimdal/lib/vers/print_version.c',
422         includes='../heimdal/lib/roken',
423         deps='HEIMDAL_KRB5 HEIMDAL_NTLM',
424         install=False
425         )
426
427
428 bld.SAMBA_BINARY('samba4kpasswd',
429         '../heimdal/kpasswd/kpasswd.c ../heimdal/lib/vers/print_version.c',
430         includes='../heimdal/lib/roken',
431         deps='HEIMDAL_KRB5 HEIMDAL_NTLM',
432         install=False
433         )
434
435
436 bld.SAMBA_BINARY('rkpty',
437         '../heimdal/lib/roken/rkpty.c',
438         deps='HEIMDAL_ROKEN OPENPTY',
439         cflags='-DPACKAGE="Samba"',
440         install=False
441         )
442
443 HEIMDAL_GSSAPI_SPNEGO_SOURCE = '''
444         ../heimdal/lib/gssapi/spnego/init_sec_context.c
445         ../heimdal/lib/gssapi/spnego/external.c
446         ../heimdal/lib/gssapi/spnego/compat.c
447         ../heimdal/lib/gssapi/spnego/context_stubs.c
448         ../heimdal/lib/gssapi/spnego/cred_stubs.c
449         ../heimdal/lib/gssapi/spnego/accept_sec_context.c
450 '''
451
452 bld.HEIMDAL_AUTOPROTO_PRIVATE('../heimdal/lib/gssapi/spnego/spnego-private.h',
453                               HEIMDAL_GSSAPI_SPNEGO_SOURCE)
454
455
456 HEIMDAL_GSSAPI_KRB5_SOURCE = '''
457         ../heimdal/lib/gssapi/krb5/copy_ccache.c
458         ../heimdal/lib/gssapi/krb5/delete_sec_context.c
459         ../heimdal/lib/gssapi/krb5/init_sec_context.c
460         ../heimdal/lib/gssapi/krb5/context_time.c
461         ../heimdal/lib/gssapi/krb5/init.c
462         ../heimdal/lib/gssapi/krb5/address_to_krb5addr.c
463         ../heimdal/lib/gssapi/krb5/get_mic.c
464         ../heimdal/lib/gssapi/krb5/inquire_context.c
465         ../heimdal/lib/gssapi/krb5/add_cred.c
466         ../heimdal/lib/gssapi/krb5/inquire_cred.c
467         ../heimdal/lib/gssapi/krb5/inquire_cred_by_oid.c
468         ../heimdal/lib/gssapi/krb5/inquire_cred_by_mech.c
469         ../heimdal/lib/gssapi/krb5/inquire_mechs_for_name.c
470         ../heimdal/lib/gssapi/krb5/inquire_names_for_mech.c
471         ../heimdal/lib/gssapi/krb5/indicate_mechs.c
472         ../heimdal/lib/gssapi/krb5/inquire_sec_context_by_oid.c
473         ../heimdal/lib/gssapi/krb5/export_sec_context.c
474         ../heimdal/lib/gssapi/krb5/import_sec_context.c
475         ../heimdal/lib/gssapi/krb5/duplicate_name.c
476         ../heimdal/lib/gssapi/krb5/import_name.c
477         ../heimdal/lib/gssapi/krb5/compare_name.c
478         ../heimdal/lib/gssapi/krb5/export_name.c
479         ../heimdal/lib/gssapi/krb5/canonicalize_name.c
480         ../heimdal/lib/gssapi/krb5/unwrap.c
481         ../heimdal/lib/gssapi/krb5/wrap.c
482         ../heimdal/lib/gssapi/krb5/release_name.c
483         ../heimdal/lib/gssapi/krb5/cfx.c
484         ../heimdal/lib/gssapi/krb5/8003.c
485         ../heimdal/lib/gssapi/krb5/arcfour.c
486         ../heimdal/lib/gssapi/krb5/encapsulate.c
487         ../heimdal/lib/gssapi/krb5/display_name.c
488         ../heimdal/lib/gssapi/krb5/sequence.c
489         ../heimdal/lib/gssapi/krb5/display_status.c
490         ../heimdal/lib/gssapi/krb5/release_buffer.c
491         ../heimdal/lib/gssapi/krb5/external.c
492         ../heimdal/lib/gssapi/krb5/compat.c
493         ../heimdal/lib/gssapi/krb5/creds.c
494         ../heimdal/lib/gssapi/krb5/acquire_cred.c
495         ../heimdal/lib/gssapi/krb5/release_cred.c
496         ../heimdal/lib/gssapi/krb5/store_cred.c
497         ../heimdal/lib/gssapi/krb5/set_cred_option.c
498         ../heimdal/lib/gssapi/krb5/decapsulate.c
499         ../heimdal/lib/gssapi/krb5/verify_mic.c
500         ../heimdal/lib/gssapi/krb5/accept_sec_context.c
501         ../heimdal/lib/gssapi/krb5/set_sec_context_option.c
502         ../heimdal/lib/gssapi/krb5/process_context_token.c
503         ../heimdal/lib/gssapi/krb5/prf.c
504         ../heimdal/lib/gssapi/krb5/aeap.c
505 '''
506
507 bld.HEIMDAL_AUTOPROTO_PRIVATE('../heimdal/lib/gssapi/krb5/gsskrb5-private.h',
508                               HEIMDAL_GSSAPI_KRB5_SOURCE)
509
510
511 HEIMDAL_HX509_OBJH_SOURCE = '''
512         ../heimdal/lib/hx509/ca.c
513         ../heimdal/lib/hx509/cert.c
514         ../heimdal/lib/hx509/cms.c
515         ../heimdal/lib/hx509/collector.c
516         ../heimdal/lib/hx509/crypto.c
517         ../heimdal/lib/hx509/error.c
518         ../heimdal/lib/hx509/env.c
519         ../heimdal/lib/hx509/file.c
520         ../heimdal/lib/hx509/keyset.c
521         ../heimdal/lib/hx509/ks_dir.c
522         ../heimdal/lib/hx509/ks_file.c
523         ../heimdal/lib/hx509/ks_keychain.c
524         ../heimdal/lib/hx509/ks_mem.c
525         ../heimdal/lib/hx509/ks_null.c
526         ../heimdal/lib/hx509/ks_p11.c
527         ../heimdal/lib/hx509/ks_p12.c
528         ../heimdal/lib/hx509/lock.c
529         ../heimdal/lib/hx509/name.c
530         ../heimdal/lib/hx509/peer.c
531         ../heimdal/lib/hx509/print.c
532         ../heimdal/lib/hx509/req.c
533         ../heimdal/lib/hx509/revoke.c
534         ../heimdal/lib/hx509/sel.c
535         ../heimdal/lib/hx509/hx509_err.c
536 '''
537
538 bld.HEIMDAL_AUTOPROTO('../heimdal/lib/hx509/hx509-protos.h',
539                       HEIMDAL_HX509_OBJH_SOURCE,
540                       options="-R '^(_|^C)' -E HX509_LIB -q -P comment -o")
541
542 bld.HEIMDAL_AUTOPROTO('../heimdal/lib/hx509/hx509-private.h',
543                       HEIMDAL_HX509_OBJH_SOURCE,
544                       options="-q -P comment -p")
545
546 HEIMDAL_HEIM_ASN1_DER_SOURCE = '''
547         ../heimdal/lib/asn1/der_get.c
548         ../heimdal/lib/asn1/der_put.c
549         ../heimdal/lib/asn1/der_free.c
550         ../heimdal/lib/asn1/der_format.c
551         ../heimdal/lib/asn1/der_length.c
552         ../heimdal/lib/asn1/der_copy.c
553         ../heimdal/lib/asn1/der_cmp.c
554 '''
555
556 bld.HEIMDAL_AUTOPROTO('../heimdal/lib/asn1/der-protos.h',
557                       HEIMDAL_HEIM_ASN1_DER_SOURCE,
558                       group = 'build_compilers',
559                       options="-q -P comment -o")
560
561
562 bld.HEIMDAL_AUTOPROTO('../heimdal/lib/asn1/der-private.h',
563                       HEIMDAL_HEIM_ASN1_DER_SOURCE,
564                       group = 'build_compilers',
565                       options="-q -P comment -p")
566