introduce without extensions

The new --without-extensions config flag completely removes all code
and data related to extensions from the build throughout the library
when given.

Signed-off-by: Andy Green <andy.green@linaro.org>
diff --git a/test-server/test-client.c b/test-server/test-client.c
index 919f258..348196b 100644
--- a/test-server/test-client.c
+++ b/test-server/test-client.c
@@ -109,7 +109,8 @@
 {
 	unsigned char buf[LWS_SEND_BUFFER_PRE_PADDING + 4096 +
 						  LWS_SEND_BUFFER_POST_PADDING];
-	int l;
+	int l = 0;
+	int n;
 
 	switch (reason) {
 
@@ -134,7 +135,8 @@
 
 	case LWS_CALLBACK_CLIENT_WRITEABLE:
 
-		l = sprintf((char *)&buf[LWS_SEND_BUFFER_PRE_PADDING],
+		for (n = 0; n < 1; n++)
+			l += sprintf((char *)&buf[LWS_SEND_BUFFER_PRE_PADDING + l],
 					"c #%06X %d %d %d;",
 					(int)random() & 0xffffff,
 					(int)random() % 500,
@@ -258,7 +260,12 @@
 	 */
 
 	context = libwebsocket_create_context(CONTEXT_PORT_NO_LISTEN, NULL,
-				protocols, libwebsocket_internal_extensions,
+				protocols,
+#ifndef LWS_NO_EXTENSIONS
+				libwebsocket_internal_extensions,
+#else
+				NULL,
+#endif
 				NULL, NULL, NULL, -1, -1, 0, NULL);
 	if (context == NULL) {
 		fprintf(stderr, "Creating libwebsocket context failed\n");