Module: sip-router
Branch: master
Commit: c4b91489ac3f2e2fcbe16413f56ef8cb8e7e2dde
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=c4b9148…
Author: Ovidiu Sas <osas(a)voipembedded.com>
Committer: Ovidiu Sas <osas(a)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