Browse Source

Support building with older versions of gnutls; Fix gnutls detection when building statically using build-xorg


git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4147 3789f03b-4d11-0410-bbf8-ca57d06f2519
tags/v1.0.90
DRC 13 years ago
parent
commit
3e465a6525
3 changed files with 14 additions and 2 deletions
  1. 4
    0
      common/rdr/TLSInStream.cxx
  2. 4
    0
      common/rdr/TLSOutStream.cxx
  3. 6
    2
      configure.ac

+ 4
- 0
common/rdr/TLSInStream.cxx View File

@@ -27,6 +27,10 @@
#include <rdr/TLSInStream.h>
#include <errno.h>

#ifdef HAVE_OLD_GNUTLS
#define gnutls_transport_set_global_errno(A) do { errno = (A); } while(0)
#endif

#ifdef HAVE_GNUTLS
using namespace rdr;


+ 4
- 0
common/rdr/TLSOutStream.cxx View File

@@ -27,6 +27,10 @@
#include <rdr/TLSOutStream.h>
#include <errno.h>

#ifdef HAVE_OLD_GNUTLS
#define gnutls_transport_set_global_errno(A) do { errno = (A); } while(0)
#endif

#ifdef HAVE_GNUTLS
using namespace rdr;


+ 6
- 2
configure.ac View File

@@ -76,8 +76,12 @@ AC_ARG_ENABLE([gnutls],
GNUTLS_LIBS=
if test "x$enable_gnutls" = xyes; then
AC_CHECK_LIB([gnutls], [gnutls_global_init],
[GNUTLS_LIBS='-lgnutls'
AC_DEFINE([HAVE_GNUTLS], 1, [Is gnutls present? ])])
[GNUTLS_LIBS='-lgnutls -lgcrypt -lgpg-error'
AC_DEFINE([HAVE_GNUTLS], 1, [Is gnutls present? ])], [],
[-lgcrypt -lgpg-error])
AC_CHECK_LIB([gnutls], [gnutls_transport_set_global_errno], [],
[AC_DEFINE([HAVE_OLD_GNUTLS], 1, [Does gnutls lack the gnutls_transport_set_global_errno() function? ])],
[-lgcrypt -lgpg-error])
fi
AC_SUBST([GNUTLS_LIBS])
AM_CONDITIONAL([HAVE_GNUTLS], [ ! test "x$GNUTLS_LIBS" = x ])

Loading…
Cancel
Save