BUILD: make it possible to look for pcre in the default system paths
If running "make PCREDIR=" will not force to add -I nor -L anymore.
This commit is contained in:
parent
4894040fa0
commit
32d0272394
11
Makefile
11
Makefile
|
@ -438,13 +438,14 @@ endif
|
|||
|
||||
ifneq ($(USE_PCRE),)
|
||||
# PCREDIR is the directory hosting include/pcre.h and lib/libpcre.*. It is
|
||||
# automatically detected but can be forced if required.
|
||||
# automatically detected but can be forced if required. Forcing it to an empty
|
||||
# string will result in search only in the default paths.
|
||||
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
|
||||
OPTIONS_CFLAGS += -DUSE_PCRE $(if $(PCREDIR),-I$(PCREDIR)/include)
|
||||
OPTIONS_LDFLAGS += $(if $(PCREDIR),-L$(PCREDIR)/lib) -lpcreposix -lpcre
|
||||
endif
|
||||
BUILD_OPTIONS += $(call ignore_implicit,USE_PCRE)
|
||||
endif
|
||||
|
@ -455,8 +456,8 @@ ifneq ($(USE_STATIC_PCRE),)
|
|||
ifeq ($(PCREDIR),)
|
||||
PCREDIR := $(shell pcre-config --prefix 2>/dev/null || echo /usr/local)
|
||||
endif
|
||||
OPTIONS_CFLAGS += -DUSE_PCRE -I$(PCREDIR)/include
|
||||
OPTIONS_LDFLAGS += -L$(PCREDIR)/lib -Wl,-Bstatic -lpcreposix -lpcre -Wl,-Bdynamic
|
||||
OPTIONS_CFLAGS += -DUSE_PCRE $(if $(PCREDIR),-I$(PCREDIR)/include)
|
||||
OPTIONS_LDFLAGS += $(if $(PCREDIR),-L$(PCREDIR)/lib) -Wl,-Bstatic -lpcreposix -lpcre -Wl,-Bdynamic
|
||||
BUILD_OPTIONS += $(call ignore_implicit,USE_STATIC_PCRE)
|
||||
endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue