Module: sip-router
Branch: master
Commit: beb3425e309b0f7d1b2bccee942c35f541a2dd7d
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=beb3425…
Author: Ovidiu Sas <osas(a)voipembedded.com>
Committer: Ovidiu Sas <osas(a)voipembedded.com>
Date: Sun Dec 2 14:53:44 2012 -0500
pua_xmpp: fix cross-compilation
---
modules_k/pua_xmpp/Makefile | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/modules_k/pua_xmpp/Makefile b/modules_k/pua_xmpp/Makefile
index fc5f7b3..2db0f59 100644
--- a/modules_k/pua_xmpp/Makefile
+++ b/modules_k/pua_xmpp/Makefile
@@ -6,8 +6,17 @@ auto_gen=
NAME= pua_xmpp.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