[sr-dev] git:master: module*/*/Makefile: libpcre dependencies build fixes
Ovidiu Sas
osas at voipembedded.com
Tue Jan 8 18:54:27 CET 2013
Module: sip-router
Branch: master
Commit: 66cc4397e04591fd5b2af9798a1ab22d3dbaf7b6
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=66cc4397e04591fd5b2af9798a1ab22d3dbaf7b6
Author: Arnout Vandecappelle (Essensium/Mind) <arnout at mind.be>
Committer: Ovidiu Sas <osas at voipembedded.com>
Date: Tue Jan 8 12:42:40 2013 -0500
module*/*/Makefile: libpcre dependencies build fixes
---
modules/dialplan/Makefile | 14 +++++++++-----
modules/lcr/Makefile | 13 +++++++++----
modules_k/regex/Makefile | 13 +++++++++----
3 files changed, 27 insertions(+), 13 deletions(-)
diff --git a/modules/dialplan/Makefile b/modules/dialplan/Makefile
index 1a3899e..987ddf7 100644
--- a/modules/dialplan/Makefile
+++ b/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)
diff --git a/modules/lcr/Makefile b/modules/lcr/Makefile
index 70d6400..bf6e8fb 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)
+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)
diff --git a/modules_k/regex/Makefile b/modules_k/regex/Makefile
index 947c14c..7b3fc28 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)
+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)
More information about the sr-dev
mailing list