[sr-dev] git:master: pua_usrloc: fix cross-compilation

Ovidiu Sas osas at voipembedded.com
Sun Dec 2 20:57:06 CET 2012


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

Author: Ovidiu Sas <osas at voipembedded.com>
Committer: Ovidiu Sas <osas at voipembedded.com>
Date:   Sun Dec  2 14:52:16 2012 -0500

pua_usrloc: fix cross-compilation

---

 modules_k/pua_usrloc/Makefile |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/modules_k/pua_usrloc/Makefile b/modules_k/pua_usrloc/Makefile
index 5e53345..70af784 100644
--- a/modules_k/pua_usrloc/Makefile
+++ b/modules_k/pua_usrloc/Makefile
@@ -6,9 +6,17 @@ auto_gen=
 NAME=pua_usrloc.so
 LIBS=
 
-DEFS+=-I/usr/include/libxml2 -I$(LOCALBASE)/include/libxml2 \
-      -I$(LOCALBASE)/include
-LIBS+=-L$(LOCALBASE)/lib -lxml2
+ifeq ($(CROSS_COMPILE),)
+XML2CFG=$(shell which xml2-config)
+endif
+
+ifneq ($(XML2CFG),)
+	DEFS += $(shell $(XML2CFG) --cflags )
+	LIBS += $(shell $(XML2CFG) --libs)
+else
+	DEFS+=-I$(LOCALBASE)/include/libxml2 -I$(LOCALBASE)/include
+	LIBS+=-L$(LOCALBASE)/lib -lxml2
+endif
 
 DEFS+=-DKAMAILIO_MOD_INTERFACE
 




More information about the sr-dev mailing list