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

Ovidiu Sas osas at voipembedded.com
Sat Dec 1 07:35:44 CET 2012


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

Author: Ovidiu Sas <osas at voipembedded.com>
Committer: Ovidiu Sas <osas at voipembedded.com>
Date:   Sat Dec  1 01:28:03 2012 -0500

utils: fix cross-compilation

---

 modules/utils/Makefile |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/modules/utils/Makefile b/modules/utils/Makefile
index fc98e3f..727fa8c 100644
--- a/modules/utils/Makefile
+++ b/modules/utils/Makefile
@@ -9,9 +9,18 @@ auto_gen=
 NAME=utils.so
 LIBS=
 
-DEFS+=-I/usr/include/libxml2 -I$(LOCALBASE)/include/libxml2 \
+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 -lcurl -lxml2
+	LIBS+=-L$(LOCALBASE)/lib -lcurl -lxml2
+endif
 
 DEFS+=-DKAMAILIO_MOD_INTERFACE
 




More information about the sr-dev mailing list