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

Ovidiu Sas osas at voipembedded.com
Sun Dec 2 20:49:48 CET 2012


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

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

pua_dialoginfo: fix cross-compilation

---

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

diff --git a/modules_k/pua_dialoginfo/Makefile b/modules_k/pua_dialoginfo/Makefile
index f756c3b..f99f41f 100644
--- a/modules_k/pua_dialoginfo/Makefile
+++ b/modules_k/pua_dialoginfo/Makefile
@@ -6,9 +6,17 @@ auto_gen=
 NAME=pua_dialoginfo.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