[PATCH] m4/virt-gnutls: properly backup CFLAGS and LIBS for AC_CHECK_* macros

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---

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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux