Skip to content

Commit

Permalink
GnuTLS: check for required function
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
joergsteffens authored and Marco van Wieringen committed Feb 17, 2015
1 parent 5104fea commit 0dda2a4
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions autoconf/configure.in
Expand Up @@ -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,
Expand Down

0 comments on commit 0dda2a4

Please sign in to comment.