فهرست منبع

module*/*/Makefile: libpcre dependencies build fixes

Arnout Vandecappelle (Essensium/Mind) 12 سال پیش
والد
کامیت
66cc4397e0
3فایلهای تغییر یافته به همراه27 افزوده شده و 13 حذف شده
  1. 9 5
      modules/dialplan/Makefile
  2. 9 4
      modules/lcr/Makefile
  3. 9 4
      modules_k/regex/Makefile

+ 9 - 5
modules/dialplan/Makefile

@@ -7,17 +7,21 @@ auto_gen=
 NAME=dialplan.so
 
 ifeq ($(CROSS_COMPILE),)
-BUILDER = $(shell which pcre-config)
+PCRE_BUILDER = $(shell \
+	if pkg-config --exists libcre; then \
+		echo 'pkg-config libpcre'; \
+	else \
+		which pcre-config; \
+	fi)
 endif
 
-ifeq ($(BUILDER),)
+ifeq ($(PCRE_BUILDER),)
 	PCREDEFS=-I$(LOCALBASE)/include
 	PCRELIBS=-L$(LOCALBASE)/lib -lpcre
 else
-	PCREDEFS = $(shell pcre-config --cflags)
-	PCRELIBS = $(shell pcre-config --libs)
+	PCREDEFS = $(shell $(PCRE_BUILDER) --cflags)
+	PCRELIBS = $(shell $(PCRE_BUILDER) --libs)
 endif
-
 DEFS+=$(PCREDEFS)
 LIBS=$(PCRELIBS)
 

+ 9 - 4
modules/lcr/Makefile

@@ -9,15 +9,20 @@ auto_gen=
 NAME=lcr.so
 
 ifeq ($(CROSS_COMPILE),)
-BUILDER = $(shell which pcre-config)
+PCRE_BUILDER = $(shell \
+	if pkg-config --exists libcre; then \
+		echo 'pkg-config libpcre'; \
+	else \
+		which pcre-config; \
+	fi)
 endif
 
-ifeq ($(BUILDER),)
+ifeq ($(PCRE_BUILDER),)
 	PCREDEFS=-I$(LOCALBASE)/include
 	PCRELIBS=-L$(LOCALBASE)/lib -lpcre
 else
-	PCREDEFS = $(shell pcre-config --cflags)
-	PCRELIBS = $(shell pcre-config --libs)
+	PCREDEFS = $(shell $(PCRE_BUILDER) --cflags)
+	PCRELIBS = $(shell $(PCRE_BUILDER) --libs)
 endif
 
 DEFS+=$(PCREDEFS)

+ 9 - 4
modules_k/regex/Makefile

@@ -5,15 +5,20 @@ auto_gen=
 NAME=regex.so
 
 ifeq ($(CROSS_COMPILE),)
-BUILDER = $(shell which pcre-config)
+PCRE_BUILDER = $(shell \
+	if pkg-config --exists libcre; then \
+		echo 'pkg-config libpcre'; \
+	else \
+		which pcre-config; \
+	fi)
 endif
 
-ifeq ($(BUILDER),)
+ifeq ($(PCRE_BUILDER),)
 	PCREDEFS=-I$(LOCALBASE)/include
 	PCRELIBS=-L$(LOCALBASE)/lib -lpcre
 else
-	PCREDEFS = $(shell pcre-config --cflags)
-	PCRELIBS = $(shell pcre-config --libs)
+	PCREDEFS = $(shell $(PCRE_BUILDER) --cflags)
+	PCRELIBS = $(shell $(PCRE_BUILDER) --libs)
 endif
 
 DEFS+=$(PCREDEFS)