gnutls-devel
[Top][All Lists]
Advanced

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

[gnutls-dev] Re: pkg-config support for opencdk


From: Simon Josefsson
Subject: [gnutls-dev] Re: pkg-config support for opencdk
Date: Fri, 18 Aug 2006 10:41:15 +0200
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux)

Martin Lambers <address@hidden> writes:

> On Tue, 08. Aug 2006, 14:47:39 +0200, Simon Josefsson wrote:
>> I think Bruno's AC_LIB_HAVE_LINKFLAGS is the best choice.  It works
>> for cross-compilations, can check for particular versions through the
>> gnutls.h LIBGNUTLS_VERSION* symbols, and doesn't add unnecessary
>> libraries to the link line, and works with and without libtool.
>
> How does the check for particular versions work with
> AC_LIB_HAVE_LINKFLAGS? Can you give an example?

In gsasl I use:

  AC_LIB_HAVE_LINKFLAGS(gnutls,, [#include <gnutls/gnutls.h>],
    [gnutls_certificate_verify_peers2 (0, 0);])

You could modify it into:

  AC_LIB_HAVE_LINKFLAGS(gnutls,,
    [#include <gnutls/gnutls.h>
     #if LIBGNUTLS_VERSION_NUMBER < 0x010500
     error too old gnutls
     #endif],
    [gnutls_certificate_verify_peers2 (0, 0);])

I didn't test this, but something like it should work.

Note that the test for gnutls_certificate_verify_peers2() is an
implicit version test -- gsasl need a gnutls version that have that
particular feature.  That is the best approach: test the GnuTLS
library for the properties (e.g., APIs) that your application actually
needs.  Doing so will work even if someone has back-ported a feature
to an older version, for example.

/Simon



reply via email to

[Prev in Thread] Current Thread [Next in Thread]