The attached patch upgrades the use of gnutls for version 3.4.x. It is only basic support (i.e. it would break 3.0.x and below gnutls linking).
Checking against the installed version of gnutls would allow full compatibility, but that is left to you all; I just needed it up and running on my current server quickly. :)
Attached is a modified and working patch.
Tested in gnutls-3.3/3.4/3.5.
Please apply.
This patch shall make it possible to compile with both GnuTLS2 and GnuTLS3.
configure.ac states that the minimal required version og GnuTLS is 2.11.7.