[libvirt] [PATCH] Fix detection of GnuTLS 1.x.y

Matthias Bolte matthias.bolte at googlemail.com
Wed Aug 3 16:28:06 UTC 2011


2011/8/3 Eric Blake <eblake at redhat.com>:
> On 08/03/2011 08:22 AM, Matthias Bolte wrote:
>>
>> Detection based on gnutls_session doesn't work because GnuTLS 2.x.y
>> comes with a compat.h that defines gnutls_session to gnutls_session_t.
>>
>> Instead detect this based on LIBGNUTLS_VERSION_MAJOR.
>> ---
>>  configure.ac |   22 +++++++++++++++-------
>>  1 files changed, 15 insertions(+), 7 deletions(-)
>
> ACK for correctness.
>
> However, I wonder if it is the most efficient.  We aren't using this as a
> Makefile conditional, and LIBGNUTLS_VERSION_MAJOR is available at compile
> time.  That is, I think that we could skip the configure check altogether,
> and just move the #if LIBGNUTLS_VERSION_MAJOR < 2 check into a common header
> used by all files that want to use gnutls in the first place, for a slightly
> smaller and faster configure.

Here's a v2 that does this.

-- 
Matthias Bolte
http://photron.blogspot.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-detection-of-GnuTLS-1.x.y_v2.patch
Type: text/x-diff
Size: 2780 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110803/f5654c96/attachment-0001.bin>


More information about the libvir-list mailing list