]> source.dussan.org Git - tigervnc.git/commitdiff
Added complete checks of GnuTLS.
authorHenrik Andersson <henrik.andersson@cendio.com>
Tue, 8 Mar 2011 15:32:24 +0000 (15:32 +0000)
committerHenrik Andersson <henrik.andersson@cendio.com>
Tue, 8 Mar 2011 15:32:24 +0000 (15:32 +0000)
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4331 3789f03b-4d11-0410-bbf8-ca57d06f2519

CMakeLists.txt
config.h.cmake.in

index 111159ea553becc271dbf69543207cc3111cf3ee..64360aa542621e688009b316f6c80c82841bc572 100644 (file)
@@ -124,6 +124,18 @@ if(GNUTLS_FOUND)
   include_directories(${GNUTLS_INCLUDE_DIR})
   add_definitions("-DHAVE_GNUTLS")
   add_definitions(${GNUTLS_DEFINITIONS})
+  
+  # Detect old version of GnuTLS
+  set(CMAKE_EXTRA_INCLUDE_FILES gnutls/gnutls.h)
+  set(CMAKE_REQUIRED_LIBRARIES gnutls)
+  check_function_exists(gnutls_transport_set_global_errno HAVE_OLD_GNUTLS)
+  check_function_exists(gnutls_x509_crt_print HAVE_GNUTLS_X509_CRT_PRINT)
+  check_type_size(gnutls_x509_crt_t GNUTLS_CRT_T)
+  check_type_size(gnutls_datum_t GNUTLS_DATUM_T)
+  check_type_size(gnutls_pk_algorithm_t GNUTLS_PK_ALGORITHM_T)
+  check_type_size(gnutls_sign_algorithm_t GNUTLS_SIGN_ALGORITHM_T)
+  set(CMAKE_EXTRA_INCLUDE_FILES) 
+  set(CMAKE_REQUIRED_LIBRARIES)
 endif()
 
 # Check for socket functions
index 54f6035cda4f8160c35d11c6ab6455c51a806085..a2da3d2b6a627cb250298e0dd2b0d1912fb10ffa 100644 (file)
@@ -5,6 +5,12 @@
 #cmakedefine HAVE_STRCASECMP
 #cmakedefine HAVE_STRNCASECMP
 #cmakedefine HAVE_VSNPRINTF
+#cmakedefine HAVE_OLD_GNUTLS
+#cmakedefine HAVE_GNUTLS_X509_CRT_PRINT
+#cmakedefine HAVE_GNUTLS_CRT_T
+#cmakedefine HAVE_GNUTLS_DATUM_T
+#cmakedefine HAVE_GNUTLS_PK_ALGORITHM_T
+#cmakedefine HAVE_GNUTLS_SIGN_ALGORITHM_T
 
 /* MS Visual Studio 2008 and newer doesn't know ssize_t */
 #if defined(HAVE_GNUTLS) && defined(WIN32) && !defined(__MINGW32__)