]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Fix GnuTLS pkg-config check
authorMatthias Bolte <matthias.bolte@googlemail.com>
Mon, 21 Dec 2009 17:47:12 +0000 (18:47 +0100)
committerMatthias Bolte <matthias.bolte@googlemail.com>
Tue, 22 Dec 2009 12:04:50 +0000 (13:04 +0100)
The testlogic for $PKG_CONFIG was inverted, checking for an empty string
before using PKG_CHECK_MODULES. Use -x instead of -z and add an else branch
to the if checking for $GNUTLS_FOUND = no to add -lgcrypt in case the
GnuTLS libraries are detected by pkg-config.

configure.in

index 81548b8ccad34c5de55c346c80ddc75374bd95e2..a86b8cabeaf996bc1c096b6d2f4c7d542a8e1bb0 100644 (file)
@@ -555,7 +555,7 @@ dnl GnuTLS library
 GNUTLS_CFLAGS=
 GNUTLS_LIBS=
 GNUTLS_FOUND=no
-if test -z "$PKG_CONFIG" ; then
+if test -x "$PKG_CONFIG" ; then
   PKG_CHECK_MODULES(GNUTLS, gnutls >= $GNUTLS_REQUIRED,
      [GNUTLS_FOUND=yes], [GNUTLS_FOUND=no])
 fi
@@ -572,6 +572,8 @@ if test "$GNUTLS_FOUND" = "no"; then
   dnl it explicitly for the calls to gcry_control/check_version
   GNUTLS_LIBS="$LIBS -lgcrypt"
   LIBS="$old_libs"
+else
+  GNUTLS_LIBS="$GNUTLS_LIBS -lgcrypt"
 fi
 
 AC_SUBST([GNUTLS_CFLAGS])