1############################### 2# start SMB_EXT_LIB_GNUTLS 3# check for gnutls/gnutls.h and -lgnutls 4SMB_EXT_LIB_FROM_PKGCONFIG(GNUTLS, gnutls) 5 6if test x$SMB_ENABLE_GNUTLS = xNO; then 7 AC_CHECK_HEADERS(gnutls/gnutls.h) 8 AC_CHECK_LIB_EXT(gnutls, GNUTLS_LIBS, gnutls_global_init) 9 AC_CHECK_DECL(gnutls_x509_crt_set_version, 10 [AC_DEFINE(HAVE_GNUTLS_X509_CRT_SET_VERSION,1,gnutls set_version)], [], [ 11 #include <gnutls/gnutls.h> 12 #include <gnutls/x509.h> 13 ]) 14 if test x"$ac_cv_header_gnutls_gnutls_h" = x"yes" -a x"$ac_cv_lib_ext_gnutls_gnutls_global_init" = x"yes" -a x"$ac_cv_have_decl_gnutls_x509_crt_set_version" = x"yes";then 15 SMB_ENABLE(GNUTLS,YES) 16 AC_CHECK_DECL(gnutls_x509_crt_set_subject_key_id, 17 [AC_DEFINE(HAVE_GNUTLS_X509_CRT_SET_SUBJECT_KEY_ID,1,gnutls subject_key)], [], [ 18 #include <gnutls/gnutls.h> 19 #include <gnutls/x509.h> 20 ]) 21 fi 22 SMB_EXT_LIB(GNUTLS, $GNUTLS_LIBS) 23fi 24if test x$SMB_ENABLE_GNUTLS = xYES; then 25 #Some older versions have a different type name 26 AC_CHECK_TYPES([gnutls_datum],,,[#include "gnutls/gnutls.h"]) 27 AC_CHECK_TYPES([gnutls_datum_t],,,[#include "gnutls/gnutls.h"]) 28 AC_DEFINE(ENABLE_GNUTLS,1,[Whether we have gnutls support (SSL)]) 29fi 30# end SMB_EXT_LIB_GNUTLS 31############################### 32