BUILD: report zlib support in haproxy -vv
Compression algorithms are not always supported depending on build options.
"haproxy -vv" now reports if zlib is supported and lists compression algorithms
also supported.
diff --git a/src/haproxy.c b/src/haproxy.c
index cfd6f84..d973ae2 100644
--- a/src/haproxy.c
+++ b/src/haproxy.c
@@ -101,6 +101,8 @@
/*********************************************************************/
+extern const struct comp_algo comp_algos[];
+
/*********************************************************************/
/* list of config files */
@@ -225,6 +227,24 @@
#endif
"\n");
+#ifdef USE_ZLIB
+ printf("Built with zlib version : " ZLIB_VERSION "\n");
+#else /* USE_ZLIB */
+ printf("Built without zlib support (USE_ZLIB not set)\n");
+#endif
+ printf("Compression algorithms supported :");
+ {
+ int i;
+
+ for (i = 0; comp_algos[i].name; i++) {
+ printf("%s %s", (i == 0 ? "" : ","), comp_algos[i].name);
+ }
+ if (i == 0) {
+ printf("none");
+ }
+ }
+ printf("\n");
+
#ifdef USE_OPENSSL
printf("Built with OpenSSL version : " OPENSSL_VERSION_TEXT "\n");
printf("OpenSSL library supports TLS extensions : "