Gentoo-Bug: https://bugs.gentoo.org/500674 Signed-off-by: Jason Zaman <jason@xxxxxxxxxxxxx> --- libselinux/Makefile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libselinux/Makefile b/libselinux/Makefile index 979e225..98776d2 100644 --- a/libselinux/Makefile +++ b/libselinux/Makefile @@ -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 -- 2.10.2