···11-From 588b4ca7412326abd51a5b2060eafbc04611e419 Mon Sep 17 00:00:00 2001
22-From: Radovan Sroka <rsroka@redhat.com>
33-Date: Tue, 11 Aug 2015 17:09:15 +0200
44-Subject: [PATCH] Fix detection of the GnuTLS package
55-66-This commit fixes a number of issues that cropped up from these changes:
77-23c5b3e replace deprecated GnuTLS functions with newer ones if available
88-88f0651 bugfix: ommysql did not work when gnutls was enabled
99-ce560b6 build system: Failure action in AC_CHECK_LIB check for
1010-1111-The solution is based on the assumption that the call to AC_CHECK_LIB()
1212-was added purely to satisfy the subsequent calls to AC_CHECK_FUNCS().
1313-23c5b3e had the unintentional result of libgnutls being added to LIBS
1414-and linked to undesired components.
1515-The next commit removed libgnutls from LIBS which made the following
1616-calls to AC_CHECK_FUNCS() nonfunctional.
1717-Another commit made the processing not stop upon detecting a missing
1818-component which, again, makes the calls to AC_CHECK_FUNCS() malfunction.
1919-2020-The solution is to get rid of AC_CHECK_LIB() and temporarily override
2121-LIBS for use by AC_CHECK_FUNCS().
2222----
2323- configure.ac | 14 ++++----------
2424- 1 file changed, 4 insertions(+), 10 deletions(-)
2525-2626-diff --git a/configure.ac b/configure.ac
2727-index 6f82f0c..ba3f791 100644
2828---- a/configure.ac
2929-+++ b/configure.ac
3030-@@ -763,18 +763,13 @@ AC_ARG_ENABLE(gnutls,
3131- if test "x$enable_gnutls" = "xyes"; then
3232- PKG_CHECK_MODULES(GNUTLS, gnutls >= 1.4.0)
3333- AC_DEFINE([ENABLE_GNUTLS], [1], [Indicator that GnuTLS is present])
3434-- AC_CHECK_LIB(
3535-- [gnutls],
3636-- [gnutls_global_init],
3737-- [
3838-- AC_DEFINE(HAVE_LIB_GNUTLS, 1, [gnutls is available])
3939-- ],
4040-- [AC_MSG_WARN([gnutls_global_init function missing or not detected])],
4141-- []
4242-- )
4343-+ save_libs=$LIBS
4444-+ LIBS="$LIBS $GNUTLS_LIBS"
4545- AC_CHECK_FUNCS(gnutls_certificate_set_retrieve_function,,)
4646- AC_CHECK_FUNCS(gnutls_certificate_type_set_priority,,)
4747-+ LIBS=$save_libs
4848- fi
4949-+
5050- AM_CONDITIONAL(ENABLE_GNUTLS, test x$enable_gnutls = xyes)
5151-5252- # libgcrypt support
5353-@@ -1655,7 +1650,6 @@ else
5454- AC_MSG_NOTICE([Not running from git source])
5555- fi
5656-5757--
5858- AM_CONDITIONAL(ENABLE_GENERATE_MAN_PAGES, test x$have_to_generate_man_pages = xyes)
5959-6060- # rst2man