[BUILD] Fixed Makefile for linking pcre

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.
This commit is contained in:
Christian Wiese 2008-11-20 14:47:04 +01:00 committed by Willy Tarreau
parent 6b6a53db5f
commit c820300adf
1 changed files with 2 additions and 0 deletions

View File

@ -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