krb5samba: Add krb5_free_checksum_contents wrapper
[mat/samba.git] / source4 / heimdal_build / wscript_configure
old mode 100644 (file)
new mode 100755 (executable)
index 2c111b9..6fac5fe
@@ -62,13 +62,12 @@ conf.CHECK_DECLS('_res', headers='netinet/in.h arpa/nameser.h resolv.h')
 conf.CHECK_FUNCS_IN('openpty', 'util', checklibc=True, headers='pty.h util.h libutil.h')
 
 conf.DEFINE('HAVE_KRB5',1)
-conf.DEFINE('HAVE_GSSAPI',1)
 
 conf.CHECK_FUNCS('dirfd', headers='dirent.h')
 conf.CHECK_DECLS('dirfd', reverse=True, headers='dirent.h')
 conf.CHECK_STRUCTURE_MEMBER('DIR', 'dd_fd', define='HAVE_DIR_DD_FD',  headers='dirent.h')
 
-conf.DEFINE('SAMBA4_INTERNAL_HEIMDAL', 1)
+conf.DEFINE('SAMBA4_USES_HEIMDAL', 1)
 
 # setup the right defines for a in-tree heimdal build
 Logs.info("Using in-tree heimdal kerberos defines")
@@ -87,6 +86,9 @@ conf.define('HAVE_GSS_OID_EQUAL', 1)
 conf.define('HAVE_GSS_INQUIRE_SEC_CONTEXT_BY_OID', 1)
 conf.define('HAVE_GSSKRB5_EXTRACT_AUTHZ_DATA_FROM_SEC_CONTEXT', 1)
 conf.define('HAVE_GSSKRB5_GET_SUBKEY', 1)
+conf.define('HAVE_GSS_KRB5_EXPORT_LUCID_SEC_CONTEXT', 1)
+conf.define('HAVE_GSS_IMPORT_CRED', 1)
+conf.define('HAVE_GSS_EXPORT_CRED', 1)
 conf.define('HAVE_LIBGSSAPI', 1)
 conf.define('HAVE_ADDR_TYPE_IN_KRB5_ADDRESS', 1)
 conf.define('HAVE_CHECKSUM_IN_KRB5_CHECKSUM', 1)
@@ -96,14 +98,11 @@ conf.define('HAVE_E_DATA_POINTER_IN_KRB5_ERROR', 1)
 conf.define('HAVE_INITIALIZE_KRB5_ERROR_TABLE', 1)
 conf.define('HAVE_KRB5_ADDRESSES', 1)
 conf.define('HAVE_KRB5_AUTH_CON_SETKEY', 1)
+conf.define('HAVE_KRB5_CC_GET_LIFETIME', 1)
 conf.define('HAVE_KRB5_CRYPTO', 1)
 conf.define('HAVE_KRB5_CRYPTO_DESTROY', 1)
 conf.define('HAVE_KRB5_CRYPTO_INIT', 1)
-conf.define('HAVE_KRB5_C_ENCTYPE_COMPARE', 1)
 conf.define('HAVE_KRB5_C_VERIFY_CHECKSUM', 1)
-conf.define('HAVE_FREE_AP_REQ', 1)
-conf.define('HAVE_KRB5_DECODE_AP_REQ', 1)
-conf.define('HAVE_KRB5_ENCTYPES_COMPATIBLE_KEYS', 1)
 conf.define('HAVE_KRB5_ENCTYPE_TO_STRING', 1)
 conf.define('HAVE_KRB5_ENCTYPE_TO_STRING_WITH_KRB5_CONTEXT_ARG', 1)
 conf.define('HAVE_KRB5_FREE_ERROR_CONTENTS', 1)
@@ -118,10 +117,11 @@ conf.define('HAVE_KRB5_GET_INIT_CREDS_OPT_ALLOC', 1)
 conf.define('HAVE_KRB5_GET_INIT_CREDS_OPT_FREE', 1)
 conf.define('HAVE_KRB5_GET_INIT_CREDS_OPT_GET_ERROR', 1)
 conf.define('HAVE_KRB5_GET_INIT_CREDS_OPT_SET_PAC_REQUEST', 1)
-conf.define('HAVE_KRB5_GET_KDC_CRED', 1)
+conf.define('HAVE_KRB5_GET_INIT_CREDS_KEYBLOCK', 1)
 conf.define('HAVE_KRB5_GET_PW_SALT', 1)
 conf.define('HAVE_KRB5_GET_RENEWED_CREDS', 1)
 conf.define('HAVE_KRB5_KEYBLOCK_KEYVALUE', 1)
+conf.define('HAVE_KRB5_KEYBLOCK_INIT', 1)
 conf.define('HAVE_KRB5_KEYTAB_ENTRY_KEYBLOCK', 1)
 conf.define('HAVE_KRB5_KRBHST_GET_ADDRINFO', 1)
 conf.define('HAVE_KRB5_KRBHST_INIT', 1)
@@ -133,16 +133,15 @@ conf.define('HAVE_KRB5_MK_REQ_EXTENDED', 1)
 conf.define('HAVE_KRB5_PRINCIPAL_COMPARE_ANY_REALM', 1)
 conf.define('HAVE_KRB5_PRINCIPAL_GET_COMP_STRING', 1)
 conf.define('HAVE_KRB5_PRINCIPAL_GET_REALM', 1)
+conf.define('HAVE_KRB5_MAKE_PRINCIPAL', 1)
 conf.define('HAVE_KRB5_REALM_TYPE', 1)
-conf.define('HAVE_KRB5_SESSION_IN_CREDS', 1)
 conf.define('HAVE_KRB5_SET_DEFAULT_IN_TKT_ETYPES', 1)
 conf.define('HAVE_KRB5_SET_REAL_TIME', 1)
 conf.define('HAVE_KRB5_STRING_TO_KEY', 1)
 conf.define('HAVE_KRB5_STRING_TO_KEY_SALT', 1)
-conf.define('HAVE_KRB5_VERIFY_CHECKSUM', 1)
+conf.define('HAVE_FREE_CHECKSUM', 1)
 conf.define('HAVE_LIBKRB5', 1)
 conf.define('KRB5_CREDS_OPT_FREE_REQUIRES_CONTEXT', 1)
-conf.define('KRB5_VERIFY_CHECKSUM_ARGS', 6)
 conf.define('HAVE_ETYPE_IN_ENCRYPTEDDATA', 1)
 conf.define('KRB5_PRINC_REALM_RETURNS_REALM', 1)
 conf.define('HAVE_KRB5_PRINCIPAL_GET_REALM', 1)
@@ -154,6 +153,8 @@ conf.define('HAVE_ENCTYPE_ARCFOUR_HMAC', 1)
 conf.define('HAVE_KRB5_PDU_NONE_DECL', 1)
 conf.define('HAVE_ENCTYPE_AES128_CTS_HMAC_SHA1_96', 1)
 conf.define('HAVE_ENCTYPE_AES256_CTS_HMAC_SHA1_96', 1)
+conf.define('HAVE_KRB5_KRB5_PRINCIPAL_GET_NUM_COMP', 1)
+conf.define('HAVE_GSSAPI_GSSAPI_SPNEGO_H', 1)
 
 heimdal_includedirs = []
 heimdal_libdirs = []
@@ -213,15 +214,33 @@ check_system_heimdal_lib("gssapi", "gss_oid_to_name", "gssapi.h",
     onlyif="hcrypto asn1 roken krb5 com_err wind")
 check_system_heimdal_lib("heimntlm", "heim_ntlm_ntlmv2_key", "heimntlm.h",
     onlyif="roken hcrypto krb5")
-check_system_heimdal_lib("hdb", "hdb_db_dir", "krb5.h hdb.h",
-    onlyif="roken krb5 hcrypto com_err wind")
+if check_system_heimdal_lib("hdb", "hdb_db_dir", "krb5.h hdb.h",
+    onlyif="roken krb5 hcrypto com_err wind"):
+    CCDEFINES = list(conf.env.CCDEFINES)
+    conf.undefine("HAVE_CONFIG_H")
+    while "HAVE_CONFIG_H=1" in conf.env.CCDEFINES:
+        conf.env.CCDEFINES.remove("HAVE_CONFIG_H=1")
+    try:
+        conf.CHECK_CODE('''
+            #include <hdb.h>
+            int main(void) { hdb_enctype2key(NULL, NULL, NULL, 0, NULL); }
+            ''',
+            define='HDB_ENCTYPE2KEY_TAKES_KEYSET',
+            addmain=False,
+            lib='hdb',
+            msg='Checking whether hdb_enctype2key takes a keyset argument',
+            local_include=False)
+    finally:
+        conf.env.CCDEFINES = CCDEFINES
+        conf.define("HAVE_CONFIG_H", "1")
+
 check_system_heimdal_lib("kdc", "kdc_log", "kdc.h",
     onlyif="roken krb5 hdb asn1 heimntlm hcrypto com_err wind heimbase")
 
 
 # With the proper checks in place we should be able to build against the system libtommath.
-# conf.CHECK_BUNDLED_SYSTEM('tommath', checkfunctions='mp_init', headers='tommath.h')
-# conf.define('USING_SYSTEM_TOMMATH', 1)
+#if conf.CHECK_BUNDLED_SYSTEM('tommath', checkfunctions='mp_init', headers='tommath.h'):
+#    conf.define('USING_SYSTEM_TOMMATH', 1)
 
 check_system_heimdal_binary("compile_et")
 check_system_heimdal_binary("asn1_compile")