Explicitly set HAVE_LIBGSSAPI if either gssapi or gssapi_krb5 are found
authorSimo Sorce <idra@samba.org>
Tue, 24 Apr 2012 23:21:06 +0000 (19:21 -0400)
committerSimo Sorce <idra@samba.org>
Thu, 26 Apr 2012 23:06:20 +0000 (19:06 -0400)
wscript_configure_krb5

index 2fb1c586fd256270e1f48fb4e98ef0f2f52b00c8..6147bf5c243265a5c49db65a128e9334e1a83b5a 100644 (file)
@@ -8,7 +8,9 @@ conf.find_program('krb5-config.heimdal', var='HEIMDAL_KRB5_CONFIG')
 conf.find_program('krb5-config', var='KRB5_CONFIG')
 if conf.env.KRB5_CONFIG:
     conf.check_cfg(path="krb5-config", args="--cflags --libs",
-               package="gssapi", uselib_store="KRB5")
+               package="krb5", uselib_store="KRB5")
+    conf.check_cfg(path="krb5-config", args="--cflags --libs",
+               package="gssapi", uselib_store="GSSAPI")
     vendor = conf.cmd_and_log("%(path)s --vendor" % dict(path=conf.env.KRB5_CONFIG), dict())
     conf.env.KRB5_VENDOR = vendor.strip().lower()
     if conf.env.KRB5_VENDOR != 'heimdal':
@@ -29,6 +31,8 @@ conf.CHECK_FUNCS_IN('roken_getaddrinfo_hostspec', 'roken')
 if conf.CHECK_FUNCS_IN('gss_display_status', 'gssapi') or \
    conf.CHECK_FUNCS_IN('gss_display_status', 'gssapi_krb5'):
     have_gssapi=True
+if have_gssapi:
+    conf.define('HAVE_LIBGSSAPI', 1)
 conf.CHECK_FUNCS_IN('''
        gss_wrap_iov
        gss_krb5_import_cred