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

Author: Ovidiu Sas <[email protected]>
Committer: Ovidiu Sas <[email protected]>
Date:   Sat Dec  1 16:46:10 2012 -0500

xhttp_pi: fix cross-compilation

---

 modules/xhttp_pi/Makefile |   15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/modules/xhttp_pi/Makefile b/modules/xhttp_pi/Makefile
index 9e8d1fe..d98c979 100644
--- a/modules/xhttp_pi/Makefile
+++ b/modules/xhttp_pi/Makefile
@@ -9,9 +9,18 @@ NAME=xhttp_pi.so
 DEFS +=
 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
 


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

Reply via email to