From 0632fac52ea1ab36c42a479bb43893929493b7a9 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 24 Mar 2010 04:48:32 +1100 Subject: build: add cflags from pkg_config results to header/function tests When we find a package with pkg_config we may need to use the resulting ccflags and ldflags in later tests. Support this by adding lib= options to CHECK_FUNC and CHECK_HEADER This gets gnutls on FreeBSD working --- source4/lib/tls/wscript | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'source4/lib/tls') diff --git a/source4/lib/tls/wscript b/source4/lib/tls/wscript index 66cc762b98..4fbbd0deaa 100644 --- a/source4/lib/tls/wscript +++ b/source4/lib/tls/wscript @@ -15,17 +15,21 @@ def configure(conf): if 'HAVE_GNUTLS' in conf.env and not Options.options.disable_gnutls: conf.DEFINE('ENABLE_GNUTLS', 1) - conf.CHECK_FUNCS_IN('gnutls_global_init', 'gnutls', headers='gnutls/gnutls.h') + conf.CHECK_FUNCS_IN('gnutls_global_init', 'gnutls', + headers='gnutls/gnutls.h') conf.CHECK_VARIABLE('gnutls_x509_crt_set_version', headers='gnutls/gnutls.h gnutls/x509.h', - define='HAVE_GNUTLS_X509_CRT_SET_VERSION') + define='HAVE_GNUTLS_X509_CRT_SET_VERSION', + lib='gnutls') conf.CHECK_VARIABLE('gnutls_x509_crt_set_subject_key_id', headers='gnutls/gnutls.h gnutls/x509.h', - define='HAVE_GNUTLS_X509_CRT_SET_SUBJECT_KEY_ID') + define='HAVE_GNUTLS_X509_CRT_SET_SUBJECT_KEY_ID', + lib='gnutls') # check for gnutls_datum types - conf.CHECK_TYPES('gnutls_datum gnutls_datum_t', headers='gnutls/gnutls.h') + conf.CHECK_TYPES('gnutls_datum gnutls_datum_t', + headers='gnutls/gnutls.h', lib='gnutls') conf.CHECK_FUNCS_IN('gcry_control', 'gcrypt', headers='gcrypt.h') conf.CHECK_FUNCS_IN('gpg_err_code_from_errno', 'gpg-error') -- cgit