[gnutls-dev] autoconf version handling
Simon Josefsson
simon at josefsson.org
Sun Apr 22 09:28:20 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.
Building GnuTLS CVS doesn't detect that the system OpenCDK is out of
date:
checking whether to disable OpenPGP Certificate authentication support... no
checking for libopencdk... yes
checking how to link with libopencdk... -lopencdk
checking whether to use the included opencdk... no
It then fails when building the code that uses OpenCDK:
make[3]: Entering directory `/home/jas/src/gnutls/libextra/openpgp'
/bin/sh ../../libtool --tag=CC --mode=compile gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../.. -I../../lgl -I../../lgl -I../../crypto -I../../lib -I../../includes -I../../includes -I../../libextra/opencdk -I../../lib/minitasn1 -D_REENTRANT -D_THREAD_SAFE -g -Wall -Wcast-align -W -Wpointer-arith -Wchar-subscripts -Wformat-security -Wno-format-y2k -Wmissing-braces -Winline -Wstrict-prototypes -Wno-unused-parameter -Wno-pointer-sign -pipe -I/usr/local/include -I/usr/local/include -MT pgp.lo -MD -MP -MF .deps/pgp.Tpo -c -o pgp.lo pgp.c
gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../.. -I../../lgl -I../../lgl -I../../crypto -I../../lib -I../../includes -I../../includes -I../../libextra/opencdk -I../../lib/minitasn1 -D_REENTRANT -D_THREAD_SAFE -g -Wall -Wcast-align -W -Wpointer-arith -Wchar-subscripts -Wformat-security -Wno-format-y2k -Wmissing-braces -Winline -Wstrict-prototypes -Wno-unused-parameter -Wno-pointer-sign -pipe -I/usr/local/include -I/usr/local/include -MT pgp.lo -MD -MP -MF .deps/pgp.Tpo -c pgp.c -fPIC -DPIC -o .libs/pgp.o
pgp.c: In function 'gnutls_openpgp_key_import':
pgp.c:99: error: too many arguments to function 'cdk_stream_tmp_from_mem'
pgp.c:99: warning: assignment makes integer from pointer without a cast
pgp.c: In function 'gnutls_openpgp_key_export':
pgp.c:165: warning: implicit declaration of function 'cdk_armor_encode_buffer'
make[3]: *** [pgp.lo] Error 1
make[3]: Leaving directory `/home/jas/src/gnutls/libextra/openpgp'
I installed this patch:
Index: configure.in
===================================================================
RCS file: /cvs/gnutls/gnutls/configure.in,v
retrieving revision 2.495
retrieving revision 2.496
diff -u -p -r2.495 -r2.496
--- configure.in 16 Apr 2007 14:34:23 -0000 2.495
+++ configure.in 22 Apr 2007 07:21:55 -0000 2.496
@@ -396,8 +396,7 @@ if test x$ac_enable_openpgp = xyes; then
ac_enable_included_opencdk=no)
if test x$ac_enable_included_opencdk = xno;then
AC_LIB_HAVE_LINKFLAGS(opencdk,, [
-#include <stddef.h> /* opencdk <= 0.5.13 uses size_t without this include */
-#include <opencdk.h>], [cdk_check_version (OPENCDK_VERSION);])
+#include <opencdk.h>], [cdk_armor_encode_buffer (NULL, 0, NULL, 0, NULL, 0);])
if test "$ac_cv_libopencdk" != yes; then
ac_enable_included_opencdk=yes
AC_MSG_WARN([[
We should update the included OpenCDK version in GnuTLS with 0.6.0
too.. And test how well older GnuTLS releases deals with OpenCDK
0.6.0.
/Simon
More information about the Gnutls-devel
mailing list