Commit 1f00a5bf authored by Luca Boccassi's avatar Luca Boccassi

Problem: WS build option is independent of DRAFT

Solution: make the default depend on the value of the DRAFT build flag
parent ddae567f
......@@ -98,11 +98,15 @@ if(APPLE)
option(ZMQ_BUILD_FRAMEWORK "Build as OS X framework" OFF)
endif()
# Disable webSocket transport
option(DISABLE_WS "Disable WebSocket transport" OFF)
# Enable webSocket transport
if (ENABLE_DRAFTS)
option(ENABLE_WS "Enable WebSocket transport" ON)
else()
option(ENABLE_WS "Enable WebSocket transport" OFF)
endif()
option(WITH_NSS "Use NSS instead of builtin sha1" OFF)
if (NOT DISABLE_WS)
if (ENABLE_WS)
list(APPEND sources
${CMAKE_CURRENT_SOURCE_DIR}/src/ws_address.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/wss_address.cpp
......
......@@ -27,7 +27,7 @@
of WebSockets (and secure WebSockets via TLS) via the ZWS 2.0 protocol.
WSS requires the GnuTLS library for TLS support. ZMQ_WSS_ specific socket
options were added to support TLS.
WebSockets support can be disabled at build time with --disable-ws.
WebSockets support is disabled by default if DRAFT APIs are disabled.
* Fixed #3566 - malformed CURVE message can cause memory leak
......
......@@ -565,7 +565,9 @@ AM_CONDITIONAL(USE_WEPOLL, test "$poller" = "wepoll")
ws_crypto_library=""
AC_ARG_ENABLE([ws],
[AS_HELP_STRING([--disable-ws], [Disable WebSocket transport [default=no]])])
[AS_HELP_STRING([--enable-ws], [Enable WebSocket transport [default=state of DRAFT]])],
[enable_ws=$enableval],
[enable_ws=$enable_drafts])
AC_ARG_WITH([nss],
[AS_HELP_STRING([--with-nss], [use nss instead of built-in sha1 [default=no]])])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment