libselinux: get pcre CFLAGS/LDFLAGS from pkg-config

Gentoo-Bug: https://bugs.gentoo.org/500674

Signed-off-by: Jason Zaman <jason@perfinion.com>
This commit is contained in:
Jason Zaman 2017-04-25 01:59:54 +08:00 committed by Stephen Smalley
parent 584e32a23b
commit 3eebfc2873
1 changed files with 5 additions and 3 deletions

View File

@ -1,5 +1,6 @@
SUBDIRS = src include utils man
PKG_CONFIG ?= pkg-config
DISABLE_SETRANS ?= n
DISABLE_RPM ?= n
ANDROID_HOST ?= n
@ -20,10 +21,11 @@ export DISABLE_SETRANS DISABLE_RPM DISABLE_FLAGS ANDROID_HOST
USE_PCRE2 ?= n
ifeq ($(USE_PCRE2),y)
PCRE_CFLAGS := -DUSE_PCRE2 -DPCRE2_CODE_UNIT_WIDTH=8
PCRE_LDFLAGS := -lpcre2-8
PCRE_CFLAGS := -DUSE_PCRE2 -DPCRE2_CODE_UNIT_WIDTH=8 $(shell $(PKG_CONFIG) --cflags libpcre2-8)
PCRE_LDFLAGS := $(shell $(PKG_CONFIG) --libs libpcre2-8)
else
PCRE_LDFLAGS := -lpcre
PCRE_CFLAGS := $(shell $(PKG_CONFIG) --cflags libpcre)
PCRE_LDFLAGS := $(shell $(PKG_CONFIG) --libs libpcre)
endif
export PCRE_CFLAGS PCRE_LDFLAGS