restorecond: get pcre cflags/libs from pkg-config

Signed-off-by: Jason Zaman <jason@perfinion.com>
This commit is contained in:
Jason Zaman 2017-04-25 01:59:57 +08:00 committed by Stephen Smalley
parent fcb5d5cc72
commit 74093beab0

View File

@ -21,12 +21,15 @@ override CFLAGS += $(DBUSFLAGS)
USE_PCRE2 ?= n USE_PCRE2 ?= n
ifeq ($(USE_PCRE2),y) ifeq ($(USE_PCRE2),y)
PCRE_LDFLAGS := -lpcre2-8 PCRE_CFLAGS := -DUSE_PCRE2 -DPCRE2_CODE_UNIT_WIDTH=8 $(shell $(PKG_CONFIG) --cflags libpcre2-8)
PCRE_LDLIBS := $(shell $(PKG_CONFIG) --libs libpcre2-8)
else else
PCRE_LDFLAGS := -lpcre PCRE_CFLAGS := $(shell $(PKG_CONFIG) --cflags libpcre)
PCRE_LDLIBS := $(shell $(PKG_CONFIG) --libs libpcre)
endif endif
export PCRE_CFLAGS PCRE_LDLIBS
LDLIBS += -lselinux $(PCRE_LDFLAGS) $(DBUSLIB) -L$(LIBDIR) LDLIBS += -lselinux $(PCRE_LDLIBS) $(DBUSLIB)
all: restorecond all: restorecond