summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2009-01-08 13:15:10 +0100
committerJelmer Vernooij <jelmer@samba.org>2009-01-08 13:15:10 +0100
commitd44a6982f33efca09861201953b4abfc6710fd4a (patch)
tree65df4fe7c50b1f3919d9be5f0152731001301ec6 /source4
parente548660c871827d1cbaa967339ba5da2d6b49579 (diff)
downloadsamba-d44a6982f33efca09861201953b4abfc6710fd4a.tar.gz
samba-d44a6982f33efca09861201953b4abfc6710fd4a.tar.bz2
samba-d44a6982f33efca09861201953b4abfc6710fd4a.zip
Don't attempt to use GNUTLS >= 2.6, as it is known broken with the socket-tls backend.
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/tls/config.m458
1 files changed, 28 insertions, 30 deletions
diff --git a/source4/lib/tls/config.m4 b/source4/lib/tls/config.m4
index 2af9192cca..4f42efb62c 100644
--- a/source4/lib/tls/config.m4
+++ b/source4/lib/tls/config.m4
@@ -2,7 +2,7 @@
# start SMB_EXT_LIB_GNUTLS
# check for gnutls/gnutls.h and -lgnutls
-use_gnutls=yes
+use_gnutls=auto
AC_ARG_ENABLE(gnutls,
[ --enable-gnutls Turn on gnutls support (default=yes)],
[if test x$enable_gnutls = xno; then
@@ -10,35 +10,33 @@ AC_ARG_ENABLE(gnutls,
fi])
-if test x$use_gnutls = xyes; then
- SMB_EXT_LIB_FROM_PKGCONFIG(GNUTLS, gnutls,
- [SMB_ENABLE_GNUTLS=YES],
- [SMB_ENABLE_GNUTLS=NO])
+if test x$use_gnutls = xauto && pkg-config --exists gnutls; then
+ SMB_EXT_LIB_FROM_PKGCONFIG(GNUTLS, gnutls < 2.6.0,
+ [use_gnutls=yes],
+ [use_gnutls=no])
+fi
- if test x$SMB_ENABLE_GNUTLS = xNO; then
- AC_CHECK_HEADERS(gnutls/gnutls.h)
- AC_CHECK_LIB_EXT(gnutls, GNUTLS_LIBS, gnutls_global_init)
- AC_CHECK_DECL(gnutls_x509_crt_set_version,
- [AC_DEFINE(HAVE_GNUTLS_X509_CRT_SET_VERSION,1,gnutls set_version)], [], [
- #include <gnutls/gnutls.h>
- #include <gnutls/x509.h>
- ])
- 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
- SMB_ENABLE(GNUTLS,YES)
- AC_CHECK_DECL(gnutls_x509_crt_set_subject_key_id,
- [AC_DEFINE(HAVE_GNUTLS_X509_CRT_SET_SUBJECT_KEY_ID,1,gnutls subject_key)], [], [
- #include <gnutls/gnutls.h>
- #include <gnutls/x509.h>
- ])
- fi
- SMB_EXT_LIB(GNUTLS, $GNUTLS_LIBS)
- fi
- if test x$SMB_ENABLE_GNUTLS = xYES; then
- #Some older versions have a different type name
- AC_CHECK_TYPES([gnutls_datum],,,[#include "gnutls/gnutls.h"])
- AC_CHECK_TYPES([gnutls_datum_t],,,[#include "gnutls/gnutls.h"])
- AC_DEFINE(ENABLE_GNUTLS,1,[Whether we have gnutls support (SSL)])
+if test x$use_gnutls = xauto; then
+ AC_CHECK_HEADERS(gnutls/gnutls.h)
+ AC_CHECK_LIB_EXT(gnutls, GNUTLS_LIBS, gnutls_global_init)
+ AC_CHECK_DECL(gnutls_x509_crt_set_version,
+ [AC_DEFINE(HAVE_GNUTLS_X509_CRT_SET_VERSION,1,gnutls set_version)], [], [
+ #include <gnutls/gnutls.h>
+ #include <gnutls/x509.h>
+ ])
+ 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
+ SMB_ENABLE(GNUTLS,YES)
+ AC_CHECK_DECL(gnutls_x509_crt_set_subject_key_id,
+ [AC_DEFINE(HAVE_GNUTLS_X509_CRT_SET_SUBJECT_KEY_ID,1,gnutls subject_key)], [], [
+ #include <gnutls/gnutls.h>
+ #include <gnutls/x509.h>
+ ])
fi
+ SMB_EXT_LIB(GNUTLS, $GNUTLS_LIBS)
+fi
+if test x$use_gnutls = xyes; then
+ #Some older versions have a different type name
+ AC_CHECK_TYPES([gnutls_datum],,,[#include "gnutls/gnutls.h"])
+ AC_CHECK_TYPES([gnutls_datum_t],,,[#include "gnutls/gnutls.h"])
+ AC_DEFINE(ENABLE_GNUTLS,1,[Whether we have gnutls support (SSL)])
fi
-# end SMB_EXT_LIB_GNUTLS
-###############################