From 3d2c99f13b3b7f927ba3f912e8526f9e770aa34f Mon Sep 17 00:00:00 2001 From: Kai Blin Date: Fri, 28 May 2010 12:59:04 +0200 Subject: s3-waf: Detect which version of krb5_enctype_to_string is used MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pair-Programmed-With: Günther Deschner --- source3/wscript | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/source3/wscript b/source3/wscript index 0911e85718..7e39a60580 100644 --- a/source3/wscript +++ b/source3/wscript @@ -471,6 +471,30 @@ pkdata = krb5_princ_component(context, principal, 0); headers='krb5.h', lib='krb5', msg="Checking whether krb5_princ_component is available") + conf.CHECK_CODE(''' +int main(void) { +char buf[256]; +krb5_enctype_to_string(1, buf, 256); +return 0; +}''', + 'HAVE_KRB5_ENCTYPE_TO_STRING_WITH_SIZE_T_ARG', + headers='krb5.h', lib='krb5', + addmain=False, cflags='-Werror', + msg="Checking whether krb5_enctype_to_string takes size_t argument") + + conf.CHECK_CODE(''' +int main(void) { +krb5_context context = NULL; +char *str = NULL; +krb5_enctype_to_string(context, 1, &str); +if (str) free (str); +return 0; +}''', + 'HAVE_KRB5_ENCTYPE_TO_STRING_WITH_KRB5_CONTEXT_ARG', + headers='krb5.h stdlib.h', lib='krb5', + addmain=False, cflags='-Werror', + msg="Checking whether krb5_enctype_to_string takes krb5_context argument") + else: conf.SET_TARGET_TYPE('krb5', 'EMPTY') conf.SET_TARGET_TYPE('gssapi', 'EMPTY') -- cgit