Module: sip-router
Branch: master
Commit: ebde66ba5f97ff5587e36b8e952b19a1becd08ab
URL:    
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=ebde66ba5f97ff5587e36b8e952b19a1becd08ab

Author: Ovidiu Sas <[email protected]>
Committer: Ovidiu Sas <[email protected]>
Date:   Thu Jan 17 19:19:37 2013 -0500

carrierroute: fix cross-compilation

---

 modules/carrierroute/Makefile |   28 +++++++++++-----------------
 1 files changed, 11 insertions(+), 17 deletions(-)

diff --git a/modules/carrierroute/Makefile b/modules/carrierroute/Makefile
index d4bc7bc..b06441a 100644
--- a/modules/carrierroute/Makefile
+++ b/modules/carrierroute/Makefile
@@ -10,28 +10,22 @@ auto_gen=
 NAME=carrierroute.so
 
 ifeq ($(CROSS_COMPILE),)
-BUILDER = $(shell which confuse-config)
+CONFUSE_BUILDER = $(shell \
+       if which confuse-config &>/dev/null;then \
+               echo 'confuse-config'; \
+       elif pkg-config --exists libconfuse; then \
+               echo 'pkg-config libconfuse'; \
+       fi)
 endif
 
-ifeq ($(BUILDER),)
-       ifeq ($(CROSS_COMPILE),)
-       BUILDER = $(shell which pkg-config)
-       endif
-       ifeq ($(BUILDER),)
-               CONFUSEDEFS=-I$(LOCALBASE)/include
-               CONFUSELIBS=-L$(LOCALBASE)/lib -lconfuse
-       else
-               CONFUSEDEFS = $(shell pkg-config --cflags libconfuse)
-               CONFUSELIBS = $(shell pkg-config --libs libconfuse)
-       endif
+ifeq ($(CONFUSE_BUILDER),)
+       DEFS += -I$(LOCALBASE)/include
+       LIBS += -L$(LOCALBASE)/lib -lconfuse
 else
-               CONFUSEDEFS = $(shell confuse-config --cflags)
-               CONFUSELIBS = $(shell confuse-config --libs)
+       DEFS += $(shell $(CONFUSE_BUILDER) --cflags)
+       LIBS += $(shell $(CONFUSE_BUILDER) --libs)
 endif
 
-DEFS+=$(CONFUSEDEFS)
-LIBS=$(CONFUSELIBS)
-
 DEFS+=-DKAMAILIO_MOD_INTERFACE
 
 SERLIBPATH=../../lib


_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to