[gnutls-dev] autoconf version handling

Simon Josefsson simon at josefsson.org
Fri Apr 20 14:20:42 CEST 2007


Timo Schulz <twoaday at gmx.net> writes:

> Hi!
>
> Is it correct that the current configure.in
> version does not check for required third party
> library versions?
>
> I mean how do we differ between 0.5.13 and
> the new 0.6.0 lib?
>
> I tried to find a 'AM_PATH_GPG_ERROR' like macro or
> 'AC_CHECK_PTH' like macro but I did not find anything.

A better solution is to test for features and not version numbers.
Did you add some new externally visible API in 0.6, that the updated
GnuTLS code would need?  Then check for that, using something like:

  AC_LIB_HAVE_LINKFLAGS(opencdk,, [
#include <stddef.h> /* opencdk <= 0.5.13 uses size_t without this include */
#include <opencdk.h>], [cdk_new_function_foobar;])

Btw, I think we should add something like what's in gnutls.h into
opencdk.h:

#define LIBGNUTLS_VERSION_MAJOR 1
#define LIBGNUTLS_VERSION_MINOR 7
#define LIBGNUTLS_VERSION_PATCH 9

This allows M4 tests to do version-based testing, if someone prefers
to use that in some situation.  It should go into opencdk.h.in, and be
substituted, of course.

> The changes are ready to commit. The code currently
> depends on the unreleased 0.6.0 version of opencdk.
> When we are sure that the openpgp code in GnuTLS does
> not need more interfaces/functions, I will release 0.6.0.
> Of course the newest opencdk code is available via the CVS.

Sounds good!  Maybe you could post the patch for easier review?

> My test to check the code was:
> ./gnutls-cli --debug 6 --ctypes openpgp \
>              --pgpcertfile openpgp/cli_pub.asc \
> 	     --pgpkeyfile openpgp/cli_sec.asc \
> 	     -p 5556 test.gnutls.org
>
> Is there anything I can try to test the code?

'make check'?  If there are no self-tests for OpenPGP, which I guess
there aren't, write a self-test and test it with the old/new code.
See pskself.c, anonself.c etc.

/Simon



More information about the Gnutls-dev mailing list