summaryrefslogtreecommitdiff
path: root/source4/lib/tls
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2006-05-11 21:21:36 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:05:55 -0500
commit36a64c56b4debe814284c2fc742ad75bdd7a249e (patch)
tree514c357f090620386f56ace45d0ce08aeb9a3ebc /source4/lib/tls
parent5761c59ef7733d006ff8051ab3592a1596192800 (diff)
downloadsamba-36a64c56b4debe814284c2fc742ad75bdd7a249e.tar.gz
samba-36a64c56b4debe814284c2fc742ad75bdd7a249e.tar.bz2
samba-36a64c56b4debe814284c2fc742ad75bdd7a249e.zip
r15538: Use pkg-config file where possible and
only fall back to manual tests if that can't be found (for systems that have older versions of gnutls without the .pc file installed) (This used to be commit d77ea8f9072070f47b2b44676facaf66ed40fd17)
Diffstat (limited to 'source4/lib/tls')
-rw-r--r--source4/lib/tls/config.m427
1 files changed, 14 insertions, 13 deletions
diff --git a/source4/lib/tls/config.m4 b/source4/lib/tls/config.m4
index 3d81c6692a..9cbb3ef47d 100644
--- a/source4/lib/tls/config.m4
+++ b/source4/lib/tls/config.m4
@@ -1,19 +1,20 @@
###############################
# start SMB_EXT_LIB_GNUTLS
# check for gnutls/gnutls.h and -lgnutls
-#
-# Should eventually change to simply:
-# SMB_EXT_LIB_FROM_PKGCONFIG(GNUTLS, gnutls)
-AC_CHECK_HEADERS(gnutls/gnutls.h)
-AC_CHECK_LIB_EXT(gnutls, GNUTLS_LIBS, gnutls_global_init)
-if test x"$ac_cv_header_gnutls_gnutls_h" = x"yes" -a x"$ac_cv_lib_ext_gnutls_gnutls_global_init" = 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>
-])
+SMB_EXT_LIB_FROM_PKGCONFIG(GNUTLS, gnutls)
+
+if test x$SMB_ENABLE_GNUTLS = xNO; then
+ AC_CHECK_HEADERS(gnutls/gnutls.h)
+ AC_CHECK_LIB_EXT(gnutls, GNUTLS_LIBS, gnutls_global_init)
+ if test x"$ac_cv_header_gnutls_gnutls_h" = x"yes" -a x"$ac_cv_lib_ext_gnutls_gnutls_global_init" = 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
-SMB_EXT_LIB(GNUTLS, $GNUTLS_LIBS)
# end SMB_EXT_LIB_GNUTLS
###############################