diff options
author | Pierre Ossman <ossman@cendio.se> | 2014-10-28 17:05:01 +0100 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2014-10-28 17:05:01 +0100 |
commit | f93682705a5808954f1c6a923b2e9cdf373923fa (patch) | |
tree | a297ba59c6d7c335ccd2d4a4d2406c3c2f4caf17 | |
parent | 893e727070186f910685e9ccd2ec8b6e8828f8c5 (diff) | |
parent | ced99a9dba1c103447d60c53ed182155c0df2870 (diff) | |
download | tigervnc-f93682705a5808954f1c6a923b2e9cdf373923fa.tar.gz tigervnc-f93682705a5808954f1c6a923b2e9cdf373923fa.zip |
Merge branch 'build' of https://github.com/CendioOssman/tigervnc
-rw-r--r-- | cmake/StaticBuild.cmake | 34 | ||||
-rw-r--r-- | common/rfb/CSecurityTLS.cxx | 13 | ||||
-rw-r--r-- | common/rfb/CSecurityVeNCrypt.h | 1 | ||||
-rw-r--r-- | common/rfb/SSecurityTLS.cxx | 13 |
4 files changed, 24 insertions, 37 deletions
diff --git a/cmake/StaticBuild.cmake b/cmake/StaticBuild.cmake index 5800a078..7679f458 100644 --- a/cmake/StaticBuild.cmake +++ b/cmake/StaticBuild.cmake @@ -8,7 +8,7 @@ # option(BUILD_STATIC - "Link statically against most libraries, if possible" ON) + "Link statically against most libraries, if possible" OFF) if(BUILD_STATIC) message(STATUS "Attempting to link static binaries...") @@ -34,7 +34,7 @@ if(BUILD_STATIC) set(GNUTLS_LIBRARIES "-Wl,-Bstatic -lgnutls -ltasn1") if(NETTLE_LIBRARY) - set(GNUTLS_LIBRARIES "${GNUTLS_LIBRARIES} -lnettle -lhogweed -lgmp -lcrypt32") + set(GNUTLS_LIBRARIES "${GNUTLS_LIBRARIES} -lnettle -lhogweed -lgmp") endif() if(GCRYPT_LIBRARY) set(GNUTLS_LIBRARIES "${GNUTLS_LIBRARIES} -lgcrypt -lgpg-error") @@ -42,31 +42,45 @@ if(BUILD_STATIC) set(GNUTLS_LIBRARIES "${GNUTLS_LIBRARIES} -Wl,-Bdynamic") + # GnuTLS uses various crypto-api stuff + if (WIN32) + set(GNUTLS_LIBRARIES "${GNUTLS_LIBRARIES} -lcrypt32") + endif() + # nanosleep() lives here on Solaris if(${CMAKE_SYSTEM_NAME} MATCHES "SunOS") - set(GNUTLS_LIBRARIES ${GNUTLS_LIBRARIES} -lrt) + set(GNUTLS_LIBRARIES "${GNUTLS_LIBRARIES} -lrt") endif() + + # GnuTLS uses gettext and zlib, so make sure those are always + # included and in the proper order + set(GNUTLS_LIBRARIES "${GNUTLS_LIBRARIES} ${ZLIB_LIBRARIES}") + set(GNUTLS_LIBRARIES "${GNUTLS_LIBRARIES} ${GETTEXT_LIBRARIES}") + + # The last variables might introduce whitespace, which CMake + # throws a hissy fit about + string(STRIP ${GNUTLS_LIBRARIES} GNUTLS_LIBRARIES) endif() if(FLTK_FOUND) set(FLTK_LIBRARIES "-Wl,-Bstatic -lfltk_images -lpng -ljpeg -lfltk -Wl,-Bdynamic") if(WIN32) - set(FLTK_LIBRARIES ${FLTK_LIBRARIES} comctl32) + set(FLTK_LIBRARIES "${FLTK_LIBRARIES} -lcomctl32") elseif(APPLE) - set(FLTK_LIBRARIES ${FLTK_LIBRARIES} "-framework Cocoa") + set(FLTK_LIBRARIES "${FLTK_LIBRARIES} -framework Cocoa") else() - set(FLTK_LIBRARIES ${FLTK_LIBRARIES} m) + set(FLTK_LIBRARIES "${FLTK_LIBRARIES} -lm") endif() if(X11_FOUND AND NOT APPLE) if(${CMAKE_SYSTEM_NAME} MATCHES "SunOS") - set(FLTK_LIBRARIES ${FLTK_LIBRARIES} ${X11_Xcursor_LIB} ${X11_Xfixes_LIB} "-Wl,-Bstatic -lXft -Wl,-Bdynamic" fontconfig Xext -R/usr/sfw/lib) + set(FLTK_LIBRARIES "${FLTK_LIBRARIES} ${X11_Xcursor_LIB} ${X11_Xfixes_LIB} -Wl,-Bstatic -lXft -Wl,-Bdynamic -lfontconfig -lXext -R/usr/sfw/lib") else() - set(FLTK_LIBRARIES ${FLTK_LIBRARIES} "-Wl,-Bstatic -lXcursor -lXfixes -lXft -lfontconfig -lexpat -lfreetype -lbz2 -lXrender -lXext -lXinerama -Wl,-Bdynamic") + set(FLTK_LIBRARIES "${FLTK_LIBRARIES} -Wl,-Bstatic -lXcursor -lXfixes -lXft -lfontconfig -lexpat -lfreetype -lbz2 -lXrender -lXext -lXinerama -Wl,-Bdynamic") endif() - set(FLTK_LIBRARIES ${FLTK_LIBRARIES} X11) + set(FLTK_LIBRARIES "${FLTK_LIBRARIES} -lX11") endif() endif() @@ -74,7 +88,7 @@ if(BUILD_STATIC) # them statically, even libXext. libX11 is somewhat stable, although # even it has had an ABI change once or twice. if(X11_FOUND AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "SunOS") - set(X11_LIBRARIES "-Wl,-Bstatic -lXext -Wl,-Bdynamic" X11) + set(X11_LIBRARIES "-Wl,-Bstatic -lXext -Wl,-Bdynamic -lX11") if(X11_XTest_LIB) set(X11_XTest_LIB "-Wl,-Bstatic -lXtst -Wl,-Bdynamic") endif() diff --git a/common/rfb/CSecurityTLS.cxx b/common/rfb/CSecurityTLS.cxx index 30de37e5..222748c0 100644 --- a/common/rfb/CSecurityTLS.cxx +++ b/common/rfb/CSecurityTLS.cxx @@ -67,12 +67,6 @@ StringParameter CSecurityTLS::X509CA("X509CA", "X509 CA certificate", "", ConfVi StringParameter CSecurityTLS::X509CRL("X509CRL", "X509 CRL file", "", ConfViewer); static LogWriter vlog("TLS"); -static LogWriter vlog_raw("RawTLS"); - -static void debug_log(int level, const char* str) -{ - vlog_raw.debug("[%d]: %s", level, str); -} void CSecurityTLS::initGlobal() { @@ -80,13 +74,6 @@ void CSecurityTLS::initGlobal() if (!globalInitDone) { gnutls_global_init(); - - /* 100 means debug log */ - if (vlog_raw.getLevel() >= 100) { - gnutls_global_set_log_level(10); - gnutls_global_set_log_function(debug_log); - } - globalInitDone = true; } } diff --git a/common/rfb/CSecurityVeNCrypt.h b/common/rfb/CSecurityVeNCrypt.h index 46ffff73..55d0744a 100644 --- a/common/rfb/CSecurityVeNCrypt.h +++ b/common/rfb/CSecurityVeNCrypt.h @@ -55,7 +55,6 @@ namespace rfb { rdr::U8 nAvailableTypes; rdr::U32 *availableTypes; rdr::U8 iAvailableType; - const char* desc; }; } #endif diff --git a/common/rfb/SSecurityTLS.cxx b/common/rfb/SSecurityTLS.cxx index a40ec138..d4e88d74 100644 --- a/common/rfb/SSecurityTLS.cxx +++ b/common/rfb/SSecurityTLS.cxx @@ -45,12 +45,6 @@ StringParameter SSecurityTLS::X509_KeyFile ("X509Key", "Path to the key of the X509 certificate in PEM format", "", ConfServer); static LogWriter vlog("TLS"); -static LogWriter vlog_raw("RawTLS"); - -static void debug_log(int level, const char* str) -{ - vlog.debug("[%d]: %s", level, str); -} void SSecurityTLS::initGlobal() { @@ -59,13 +53,6 @@ void SSecurityTLS::initGlobal() if (!globalInitDone) { if (gnutls_global_init() != GNUTLS_E_SUCCESS) throw AuthFailureException("gnutls_global_init failed"); - - /* 100 means debug log */ - if (vlog_raw.getLevel() >= 100) { - gnutls_global_set_log_level(10); - gnutls_global_set_log_function(debug_log); - } - globalInitDone = true; } } |