This adds an lws cmake option that builds all the minimal examples as part of lws,
it's useful for QA.
It adds a macro to examples that depend on a particular lws configuration to understand
they should just null out their project definition in builds where the lws configuration
requirement is not met, and we are building as part of lws.
It also adapts all the example library additions to select the just-built-but-not-yet-installed
library in the case it is built as part of lws. If built standalone, it now uses the cmake
platform-abstracted way to add the library requirement too.
Until now LWS_CALLBACK_CLOSED has served the same for
client and server connections. This introduces a new
LWS_CALLBACK_CLIENT_CLOSE which is sent on established
ws client connections, insread of LWS_CALLBACK_CLOSED.
LWS_CALLBACK_CLOSED continues to be sent when server
ws connections close.
This allows you to set a 404 handler URL on a vhost.
The necessary user code looks like...
info.error_document_404 = "/404.html";
... at vhost-creation time.
In the existing lws_return_http_status() api, if it sees
the vhost has an "error_document_404" path set and that
we are trying to report a 404, it changes the action
instead to a redirect to the error_document_404 path.
The redirect target is returned using 404 status code.
If the redirect target doesn't exist, then it falls back
to just reporting the simple canned 404.