[prev in list] [next in list] [prev in thread] [next in thread] 

List:       elinks-dev
Subject:    [elinks-dev] [patch] ignore GNU TLS if too old at configure time
From:       Kalle Olavi Niemitalo <kon () iki ! fi>
Date:       2005-12-03 13:57:20
Message-ID: 87hd9qp96t.fsf () Astalo ! kon ! iki ! fi
[Download RAW message or body]

[Attachment #2 (multipart/signed)]

[Attachment #4 (multipart/mixed)]

<kahmalo> elinks/src/network/ssl/ssl.h does #define ssl_t gnutls_session_t,
	  but <gnutls/gnutls.h> of Debian libgnutls11-dev 1.0.16-13.1 does not
	  define gnutls_session_t.  It defines struct gnutls_session_int and
	  gnutls_session, though.					[13:30]
<fonseca> From NEWS file: * SSL support via GNUTLS now requires 1.2 or higher
									[13:35]
<pasky`> gnutls is a mess						[13:36]
<pasky`> and it turned out to be too complicated to support multiple gnutls
	 versions at once
<pasky`> complain to gnutls maintainers about breaking API between minor
	 versions
<kahmalo> I see.							[13:41]
<kahmalo> Well how about checking the version at configure time?
<kahmalo> and giving an understandable error message
<kahmalo> Would you accept a patch for this?				[13:42]
<fonseca> Yes, that would be great.

So, the following patch makes the configure script of ELinks
ignore an installed GNUTLS that is too old.  If --with-gnutls
was specified, this results in a fatal error.

Tested with:
- Debian libgnutls11-dev 1.0.16-14, configure --with-gnutls
  -> error at configure time
- Debian libgnutls-dev 1.2.9-2, configure --with-gnutls
  -> compiles OK


[Attachment #7 (text/x-patch)]

diff --git a/configure.in b/configure.in
index 328a8a3..3871726 100644
--- a/configure.in
+++ b/configure.in
@@ -918,9 +918,12 @@ else
 			CFLAGS="$CFLAGS_X $GNUTLS_CFLAGS"
 			CPPFLAGS="$CPPFLAGS_X $GNUTLS_CFLAGS"
 
-			# Verify if it's really usable
+			# Verify if it's really usable.  gnutls_session was
+			# renamed to gnutls_session_t before GNU TLS 1.2.0
+			# (on 2004-06-13); ELinks now requires this.
 			AC_TRY_LINK([#include <gnutls/gnutls.h>],
-				    [gnutls_check_version(NULL)],
+				    [gnutls_session_t dummy;
+				     gnutls_check_version(NULL)],
 				    cf_result=yes, cf_result=no)
 		fi
 
@@ -938,14 +941,14 @@ else
 						  MD5_Init)
 		else
 			if test -n "$gnutls_withval" && test "x$gnutls_withval" != xno; then
-				AC_MSG_ERROR([GNUTLS not found])
+				AC_MSG_ERROR([GNUTLS (1.2 or later) not found.  ELinks no longer supports GNUTLS 1.1.])
 			fi
 			EL_RESTORE_FLAGS
 		fi
 	fi
 fi
 
-AC_MSG_CHECKING([for GNU TLS])
+AC_MSG_CHECKING([for GNU TLS (1.2 or later)])
 AC_MSG_RESULT($cf_result)
 
 dnl Final SSL setup

[Attachment #8 (application/pgp-signature)]

_______________________________________________
elinks-dev mailing list
elinks-dev@linuxfromscratch.org
http://linuxfromscratch.org/mailman/listinfo/elinks-dev


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic