Patch commit-ed.
Thank you,
Ovidiu Sas
On Tue, Dec 11, 2012 at 6:13 AM, Arnout Vandecappelle (Essensium/Mind)
<arnout(a)mind.be> wrote:
From: "Arnout Vandecappelle
(Essensium/Mind)" <arnout(a)mind.be>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout(a)mind.be>
---
modules/dialplan/Makefile | 11 ++++++++---
modules/lcr/Makefile | 11 ++++++++---
modules_k/regex/Makefile | 11 ++++++++---
3 files changed, 24 insertions(+), 9 deletions(-)
diff --git a/modules/dialplan/Makefile b/modules/dialplan/Makefile
index 1a3899e..4bb150a 100644
--- a/modules/dialplan/Makefile
+++ b/modules/dialplan/Makefile
@@ -7,15 +7,20 @@ auto_gen=
NAME=dialplan.so
ifeq ($(CROSS_COMPILE),)
-BUILDER = $(shell which pcre-config)
+BUILDER = $(shell \
+ if pkg-config --exists libpcre; then \
+ echo 'pkg-config libpcre'; \
+ else \
+ which pcre-config; \
+ fi)
endif
ifeq ($(BUILDER),)
PCREDEFS=-I$(LOCALBASE)/include
PCRELIBS=-L$(LOCALBASE)/lib -lpcre
else
- PCREDEFS = $(shell pcre-config --cflags)
- PCRELIBS = $(shell pcre-config --libs)
+ PCREDEFS = $(shell $(BUILDER) --cflags)
+ PCRELIBS = $(shell $(BUILDER) --libs)
endif
DEFS+=$(PCREDEFS)
diff --git a/modules/lcr/Makefile b/modules/lcr/Makefile
index 70d6400..228a27f 100644
--- a/modules/lcr/Makefile
+++ b/modules/lcr/Makefile
@@ -9,15 +9,20 @@ auto_gen=
NAME=lcr.so
ifeq ($(CROSS_COMPILE),)
-BUILDER = $(shell which pcre-config)
+BUILDER = $(shell \
+ if pkg-config --exists libpcre; then \
+ echo 'pkg-config libpcre'; \
+ else \
+ which pcre-config; \
+ fi)
endif
ifeq ($(BUILDER),)
PCREDEFS=-I$(LOCALBASE)/include
PCRELIBS=-L$(LOCALBASE)/lib -lpcre
else
- PCREDEFS = $(shell pcre-config --cflags)
- PCRELIBS = $(shell pcre-config --libs)
+ PCREDEFS = $(shell $(BUILDER) --cflags)
+ PCRELIBS = $(shell $(BUILDER) --libs)
endif
DEFS+=$(PCREDEFS)
diff --git a/modules_k/regex/Makefile b/modules_k/regex/Makefile
index 947c14c..ae435e9 100644
--- a/modules_k/regex/Makefile
+++ b/modules_k/regex/Makefile
@@ -5,15 +5,20 @@ auto_gen=
NAME=regex.so
ifeq ($(CROSS_COMPILE),)
-BUILDER = $(shell which pcre-config)
+BUILDER = $(shell \
+ if pkg-config --exists libpcre; then \
+ echo 'pkg-config libpcre'; \
+ else \
+ which pcre-config; \
+ fi)
endif
ifeq ($(BUILDER),)
PCREDEFS=-I$(LOCALBASE)/include
PCRELIBS=-L$(LOCALBASE)/lib -lpcre
else
- PCREDEFS = $(shell pcre-config --cflags)
- PCRELIBS = $(shell pcre-config --libs)
+ PCREDEFS = $(shell $(BUILDER) --cflags)
+ PCRELIBS = $(shell $(BUILDER) --libs)
endif
DEFS+=$(PCREDEFS)
--
1.7.10.4
_______________________________________________
sr-dev mailing list
sr-dev(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
--
VoIP Embedded, Inc.