mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
heimdal_build: Fix finding of system heimdal.
When checking for Heimdal headers, make sure HAVE_CONFIG_H is not defined, as config.h will not be available. Reviewed-by: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Autobuild-User(master): Jelmer Vernooij <jelmer@samba.org> Autobuild-Date(master): Tue Nov 6 16:27:03 CET 2012 on sn-devel-104
This commit is contained in:
parent
9cf985c53e
commit
da284b3765
@ -203,26 +203,31 @@ if check_system_heimdal_lib("roken", "rk_socket_set_reuseaddr", "roken.h"):
|
||||
conf.env.LIBPATH_ROKEN_HOSTCC = conf.env.LIBPATH_ROKEN
|
||||
conf.env.LIB_ROKEN_HOSTCC = "roken"
|
||||
conf.SET_TARGET_TYPE("ROKEN_HOSTCC", 'SYSLIB')
|
||||
check_system_heimdal_lib("wind", "wind_stringprep", "wind.h", onlyif="roken")
|
||||
check_system_heimdal_lib("hx509", "hx509_bitstring_print", "hx509.h", onlyif="roken wind")
|
||||
check_system_heimdal_lib("asn1", "initialize_asn1_error_table", "asn1_err.h", onlyif="roken com_err")
|
||||
check_system_heimdal_lib("heimbase", "heim_cmp", "heimbase.h", onlyif="roken")
|
||||
check_system_heimdal_lib("hcrypto", "MD4_Init", "hcrypto/md4.h",
|
||||
onlyif="asn1 roken com_err")
|
||||
if check_system_heimdal_lib("krb5", "krb5_anyaddr", "krb5.h",
|
||||
onlyif="roken wind asn1 hx509 hcrypto com_err heimbase"):
|
||||
conf.CHECK_FUNCS_IN('krb5_free_unparsed_name', 'krb5', headers="krb5.h")
|
||||
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")
|
||||
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:
|
||||
|
||||
# Make sure HAVE_CONFIG_H is unset, as the system Heimdal headers use it
|
||||
# and include config.h if it is set, resulting in failure (since config.h
|
||||
# doesn't yet exist)
|
||||
|
||||
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:
|
||||
check_system_heimdal_lib("wind", "wind_stringprep", "wind.h", onlyif="roken")
|
||||
check_system_heimdal_lib("hx509", "hx509_bitstring_print", "hx509.h", onlyif="roken wind")
|
||||
check_system_heimdal_lib("asn1", "initialize_asn1_error_table", "asn1_err.h", onlyif="roken com_err")
|
||||
check_system_heimdal_lib("heimbase", "heim_cmp", "heimbase.h", onlyif="roken")
|
||||
check_system_heimdal_lib("hcrypto", "MD4_Init", "hcrypto/md4.h",
|
||||
onlyif="asn1 roken com_err")
|
||||
if check_system_heimdal_lib("krb5", "krb5_anyaddr", "krb5.h",
|
||||
onlyif="roken wind asn1 hx509 hcrypto com_err heimbase"):
|
||||
conf.CHECK_FUNCS_IN('krb5_free_unparsed_name', 'krb5', headers="krb5.h")
|
||||
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")
|
||||
if check_system_heimdal_lib("hdb", "hdb_db_dir", "krb5.h hdb.h",
|
||||
onlyif="roken krb5 hcrypto com_err wind"):
|
||||
conf.CHECK_CODE('''
|
||||
#include <hdb.h>
|
||||
int main(void) { hdb_enctype2key(NULL, NULL, NULL, 0, NULL); }
|
||||
@ -232,13 +237,11 @@ if check_system_heimdal_lib("hdb", "hdb_db_dir", "krb5.h hdb.h",
|
||||
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")
|
||||
|
||||
check_system_heimdal_lib("kdc", "kdc_log", "kdc.h",
|
||||
onlyif="roken krb5 hdb asn1 heimntlm hcrypto com_err wind heimbase")
|
||||
finally:
|
||||
conf.env.CCDEFINES = CCDEFINES
|
||||
|
||||
# With the proper checks in place we should be able to build against the system libtommath.
|
||||
#if conf.CHECK_BUNDLED_SYSTEM('tommath', checkfunctions='mp_init', headers='tommath.h'):
|
||||
|
Loading…
Reference in New Issue
Block a user