]> git.ipfire.org Git - thirdparty/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>
Sat, 21 Mar 2009 09:18:04 +0000 (10:18 +0100)
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.

Makefile

index 3d87d70e1a19950a192e733b347bb601bc59c859..eb2a0958ce95fd0e62f0cdad3e27074dd35a01e4 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -393,8 +393,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