[gnutls-dev] autoconf version handling

Simon Josefsson simon at josefsson.org
Fri Apr 20 15:01:07 CEST 2007


Timo Schulz <twoaday at gmx.net> writes:

> Simon Josefsson wrote:
>
>> 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:
>
> I need to check this, but to make sure that the right opencdk version
> is used, I will add a check for a function which is new in 0.6.0.

Sounds good.

>> 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
>
> You mean in the included version of opencdk in gnutls?

No, in opencdk CVS, I'm think you should add to opencdk.h.in:

#define OPENCDK_VERSION_MAJOR @MAJOR_VERSION@
#define OPENCDK_VERSION_MINOR @MINOR_VERSION@
#define OPENCDK_VERSION_PATCH @PATCH_VERSION@

and the related mechanism in configure.ac.

> And BTW, I'm not sure if this is the intended purpose, but the
> preference for the opencdk.h header is always libextra/opencdk.h a
> not /usr/include/opencdk.h.

That should be fixed, I think.

>> '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.
>
> I'm not sure if there are any self tests. I will look and if there are
> no test, I will at least write a very basic one.

Yes, I think that will be good.  We can't really talk about
regressions unless there are self-tests for things we care about.

/Simon



More information about the Gnutls-dev mailing list