]> git.kaiwu.me - haproxy.git/commitdiff
[BUILD] Fixed Makefile for linking pcre
authorChristian Wiese <morfoh@opensde.org>
Thu, 20 Nov 2008 13:47:04 +0000 (14:47 +0100)
committerWilly Tarreau <w@1wt.eu>
Sun, 10 May 2009 16:19:21 +0000 (18:19 +0200)
If both make parameters USE_PCRE and USE_STATIC_PCRE are set to 1
while building haproxy, pcre gets linked in dynamically.

Therefore we check if USE_STATIC_PCRE was explicitely enabled to
ommit the CFLAGS and LDFLAGS normally set if USE_PCRE is enabled.
(cherry picked from commit c820300adf36700cbbff15249a8629baa63c5f5a)
(cherry picked from commit b376f0163e7171162f077d8c722751d496a34e6c)

Makefile

index a04ce0d250e1b3c10b3883fb950a6f540380b009..5995b49e2f4aa6a5a1a221c9106ac82db3bae97d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -381,8 +381,10 @@ ifneq ($(USE_PCRE),)
 ifeq ($(PCREDIR),)
 PCREDIR                := $(shell pcre-config --prefix 2>/dev/null || echo /usr/local)
 endif
+ifeq ($(USE_STATIC_PCRE),)
 OPTIONS_CFLAGS  += -DUSE_PCRE -I$(PCREDIR)/include
 OPTIONS_LDFLAGS += -L$(PCREDIR)/lib -lpcreposix -lpcre
+endif
 BUILD_OPTIONS   += $(call ignore_implicit,USE_PCRE)
 endif