zeromq / libzmq

ZeroMQ core engine in C++, implements ZMTP/3.1
https://www.zeromq.org
Mozilla Public License 2.0
9.46k stars 2.34k forks source link

Variable $enable_drafts is used before it is assigned in configure.ac #4612

Open ellert opened 8 months ago

ellert commented 8 months ago

https://github.com/zeromq/libzmq/blob/f0c471aaabb7f619fc0569317e300f28d00a22ec/configure.ac#L634

In the line above, the variable $enable_drafts is used before it is assigned. The intended purpose of using the value of --enable-drafts as the defaut value for ----enable-ws is therefore not accomplished.

ellert commented 8 months ago

Since due to the above the default value for enable_ws is the empty string, the condition

https://github.com/zeromq/libzmq/blob/f0c471aaabb7f619fc0569317e300f28d00a22ec/configure.ac#L642

results in that ws will be enabled by default. To make this explicit (and so that ./configure --help shows the default that is actually used) this could be changed to:

AC_ARG_ENABLE([ws],
    [AS_HELP_STRING([--enable-ws], [Enable WebSocket transport [default=yes]])],
    [enable_ws=$enableval],
    [enable_ws=yes])