1 from waflib import Options
3 gnutls_min_required_version = "3.4.7"
5 gnutls_required_version = gnutls_min_required_version
7 conf.CHECK_CFG(package='gnutls',
8 args=('"gnutls >= %s" --cflags --libs' % gnutls_required_version),
9 msg='Checking for GnuTLS >= %s' % gnutls_required_version,
12 # Define gnutls as a system library
13 conf.SET_TARGET_TYPE('gnutls', 'SYSLIB')
15 # Check for gnutls_pkcs7_get_embedded_data_oid (>= 3.5.5) required by libmscat
16 conf.CHECK_FUNCS_IN('gnutls_pkcs7_get_embedded_data_oid', 'gnutls')
18 # Check for gnutls_aead_cipher_encryptv2 (>= 3.6.10)
19 conf.CHECK_FUNCS_IN('gnutls_aead_cipher_encryptv2', 'gnutls')
21 if conf.CHECK_VALUEOF('GNUTLS_CIPHER_AES_128_CFB8', headers='gnutls/gnutls.h'):
22 conf.DEFINE('HAVE_GNUTLS_AES_CFB8', 1)
24 Logs.warn('No gnutls support for AES CFB8')
26 if conf.CHECK_VALUEOF('GNUTLS_MAC_AES_CMAC_128', headers='gnutls/gnutls.h'):
27 conf.DEFINE('HAVE_GNUTLS_AES_CMAC', 1)
29 Logs.warn('No gnutls support for AES CMAC')