From b8da9acbc38c58b867b464d5774cbd74fe20727c Mon Sep 17 00:00:00 2001 From: Joerg Steffens Date: Wed, 26 Nov 2014 11:56:18 +0100 Subject: [PATCH] GnuTLS: check for required function added a check for function gnutls_cipher_init (GnuTLS >= 2.10.0). Without it, Bareos will fail to build with GnuTLS, therefore GnuTLS will be disabled. --- autoconf/configure.in | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/autoconf/configure.in b/autoconf/configure.in index ed32ef75a1a..d714beaa5cb 100644 --- a/autoconf/configure.in +++ b/autoconf/configure.in @@ -1273,6 +1273,18 @@ if test "x$support_crypto" != "xno" -o "x$support_tls" != "xno"; then ) fi + if test "$have_gnutls" = "yes"; then + # do an additional check to see if required functions are available, + # otherwise disable gnutls + AC_CHECK_FUNCS(gnutls_cipher_init, + [ + have_gnutls="yes" + ], [ + have_gnutls="no" + ] + ) + fi + if test "$have_gnutls" = "yes"; then AC_DEFINE(HAVE_GNUTLS, 1, [Define to 1 if GNUTLS library is available]) # gnutls_transport_set_ptr may cause problems on some platforms,