]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: show PCRE version and JIT status in -vv
authorLukas Tribus <luky-37@hotmail.com>
Thu, 4 Apr 2013 10:24:16 +0000 (12:24 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 4 Apr 2013 20:39:56 +0000 (22:39 +0200)
haproxy -vv shows build informations about USE flags and lib versions.
This patch introduces informations about PCRE and the new JIT feature.
It also makes USE_PCRE_JIT=1 appear in the haproxy -vv "OPTIONS".

This is useful since with the introduction of JIT we will see libpcre
related issues.

Makefile
src/haproxy.c

index f2ac3730f4cdb2082745ed109bdd96f53d09bed3..68e2ff81cc1e2a6ecaa5aea8c46dd0d4ffd41939 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -562,6 +562,7 @@ endif
 # JIT PCRE
 ifneq ($(USE_PCRE_JIT),)
 OPTIONS_CFLAGS  += -DUSE_PCRE_JIT
+BUILD_OPTIONS   += $(call ignore_implicit,USE_PCRE_JIT)
 endif
 endif
 
index dd1adcd7574de97a3eb9848b67efdf1db3e076be..15c14e3029fb589477a1bd0bc78b8ae48cd99b31 100644 (file)
@@ -289,6 +289,20 @@ void display_build_opts()
 #else /* USE_OPENSSL */
        printf("Built without OpenSSL support (USE_OPENSSL not set)\n");
 #endif
+
+#ifdef USE_PCRE
+       printf("Built with PCRE version : %s", pcre_version());
+       printf("\nPCRE library supports JIT : "
+#ifndef USE_PCRE_JIT
+              "no (USE_PCRE_JIT not set)"
+#else
+              "yes"
+#endif
+              "\n");
+#else
+       printf("Built without PCRE support (using libc's regex instead)\n");
+#endif
+
        putchar('\n');
 
        list_pollers(stdout);