summaryrefslogtreecommitdiff
path: root/source4/heimdal_build
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2012-11-05 23:38:23 +0100
committerJelmer Vernooij <jelmer@samba.org>2012-11-06 16:27:03 +0100
commitda284b3765e3c73d204fe2c8b45d6fbd2c08d451 (patch)
tree36575efec2fa8fb12d539b0322e2a3aee8c7b508 /source4/heimdal_build
parent9cf985c53eb1a4bbe8b8110f123744291026cee6 (diff)
downloadsamba-da284b3765e3c73d204fe2c8b45d6fbd2c08d451.tar.gz
samba-da284b3765e3c73d204fe2c8b45d6fbd2c08d451.tar.bz2
samba-da284b3765e3c73d204fe2c8b45d6fbd2c08d451.zip
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
Diffstat (limited to 'source4/heimdal_build')
-rwxr-xr-xsource4/heimdal_build/wscript_configure55
1 files changed, 29 insertions, 26 deletions
diff --git a/source4/heimdal_build/wscript_configure b/source4/heimdal_build/wscript_configure
index ea854f2e88..168be6d0e4 100755
--- a/source4/heimdal_build/wscript_configure
+++ b/source4/heimdal_build/wscript_configure
@@ -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'):