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

Ovidiu Sas osas at voipembedded.com
Sat Dec 1 22:51:14 CET 2012


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 <osas at voipembedded.com>
Committer: Ovidiu Sas <osas at voipembedded.com>
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
 




More information about the sr-dev mailing list