diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2011-07-30 17:45:04 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2011-08-01 17:48:30 +0200 |
commit | 56e86ed52d5e0567b79049ec0d52b9e15b34fec7 (patch) | |
tree | 5d296886bb8fc57993437fd5b0aed5f2cfd7cd5e /source4/heimdal_build | |
parent | 695af0f6ed7ed3d266f3bc1a45a8086b31ef287a (diff) | |
download | samba-56e86ed52d5e0567b79049ec0d52b9e15b34fec7.tar.gz samba-56e86ed52d5e0567b79049ec0d52b9e15b34fec7.tar.bz2 samba-56e86ed52d5e0567b79049ec0d52b9e15b34fec7.zip |
heimdal_build: Use krb5-config to find heimdal include directory and library path, rather than hardcoding.
Diffstat (limited to 'source4/heimdal_build')
-rw-r--r-- | source4/heimdal_build/wscript_configure | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/source4/heimdal_build/wscript_configure b/source4/heimdal_build/wscript_configure index c4bd56f4d7..a15070cfbd 100644 --- a/source4/heimdal_build/wscript_configure +++ b/source4/heimdal_build/wscript_configure @@ -152,6 +152,23 @@ conf.define('HAVE_ENCTYPE_ARCFOUR_HMAC_MD5', 1) conf.define('HAVE_ENCTYPE_ARCFOUR_HMAC', 1) conf.define('HAVE_KRB5_PDU_NONE_DECL', 1) +heimdal_includedirs = [] +heimdal_libdirs = [] +krb5_config = conf.find_program("krb5-config.heimdal", var="HEIMDAL_KRB5_CONFIG") +if not krb5_config: + krb5_config = conf.find_program("krb5-config", var="HEIMDAL_KRB5_CONFIG") +if krb5_config: + # Not ideal, but seems like the best way to get at these paths: + f = open(krb5_config, 'r') + try: + for l in f: + if l.startswith("libdir="): + heimdal_libdirs.append(l.strip()[len("libdir="):]) + elif l.startswith("includedir="): + heimdal_includedirs.append(l.strip()[len("includedir="):]) + finally: + f.close() + if conf.CHECK_BUNDLED_SYSTEM('com_err', checkfunctions='com_right_r com_err', headers='com_err.h'): conf.define('USING_SYSTEM_COM_ERR', 1) @@ -160,8 +177,8 @@ def check_system_heimdal_lib(name, functions='', headers='', onlyif=None): # used. if conf.LIB_MAY_BE_BUNDLED(name): return False - setattr(conf.env, "CPPPATH_%s" % name.upper(), ["/usr/include/heimdal"]) - setattr(conf.env, "LIBPATH_%s" % name.upper(), ["/usr/lib/heimdal"]) + setattr(conf.env, "CPPPATH_%s" % name.upper(), heimdal_includedirs) + setattr(conf.env, "LIBPATH_%s" % name.upper(), heimdal_libdirs) conf.CHECK_BUNDLED_SYSTEM(name, checkfunctions=functions, headers=headers, onlyif=onlyif) conf.define('USING_SYSTEM_%s' % name.upper(), 1) |