[libvirt] [PATCH] Fix GnuTLS pkg-config check
Daniel P. Berrange
berrange at redhat.com
Tue Dec 22 10:19:52 UTC 2009
On Tue, Dec 22, 2009 at 02:13:34AM +0100, Matthias Bolte wrote:
> 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 | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/configure.in b/configure.in
> index 81548b8..a86b8ca 100644
> --- a/configure.in
> +++ b/configure.in
> @@ -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])
> --
ACK
Daniel
--
|: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
More information about the libvir-list
mailing list