Skip to content

Commit

Permalink
restorecond: get pcre cflags/libs from pkg-config
Browse files Browse the repository at this point in the history
Signed-off-by: Jason Zaman <jason@perfinion.com>
  • Loading branch information
perfinion authored and stephensmalley committed Apr 25, 2017
1 parent fcb5d5c commit 74093be
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions restorecond/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,15 @@ override CFLAGS += $(DBUSFLAGS)

USE_PCRE2 ?= n
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
PCRE_LDFLAGS := -lpcre
PCRE_CFLAGS := $(shell $(PKG_CONFIG) --cflags libpcre)
PCRE_LDLIBS := $(shell $(PKG_CONFIG) --libs libpcre)
endif
export PCRE_CFLAGS PCRE_LDLIBS

LDLIBS += -lselinux $(PCRE_LDFLAGS) $(DBUSLIB) -L$(LIBDIR)
LDLIBS += -lselinux $(PCRE_LDLIBS) $(DBUSLIB)

all: restorecond

Expand Down

0 comments on commit 74093be

Please sign in to comment.