Commit 943ddcb7120 partially fixed this bug in gnutls configure code.
However we also need to backup and modify CFLAGS and do if for
AC_CHECK_HEADERS as well.
Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
Pushed under build breaker rule.
m4/virt-gnutls.m4 | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/m4/virt-gnutls.m4 b/m4/virt-gnutls.m4
index 77122c1202..37adad85d8 100644
--- a/m4/virt-gnutls.m4
+++ b/m4/virt-gnutls.m4
@@ -54,15 +54,18 @@ AC_DEFUN([LIBVIRT_CHECK_GNUTLS],[
[set to 1 if it is known or assumed that GNUTLS uses gcrypt])
fi
+ OLD_CFLAGS="$CFLAGS"
+ OLD_LIBS="$LIBS"
+ CFLAGS="$CFLAGS $GNUTLS_CFLAGS"
+ LIBS="$LIBS $GNUTLS_LIBS"
AC_CHECK_HEADERS([gnutls/crypto.h], [], [], [[
#include <gnutls/gnutls.h>
]])
- OLD_LIBS="$LIBS"
- LIBS="$LIBS $GNUTLS_LIBS"
AC_CHECK_FUNCS([gnutls_rnd])
AC_CHECK_FUNCS([gnutls_cipher_encrypt])
- LIBS=$OLD_LIBS
+ CFLAGS="$OLD_CFLAGS"
+ LIBS="$OLD_LIBS"
fi
])
--
2.11.0