Module: sip-router
Branch: master
Commit: 5ffd8eda41567f12c7224d68e32a1a20779d22a6
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=5ffd8ed…
Author: Ovidiu Sas <osas(a)voipembedded.com>
Committer: Ovidiu Sas <osas(a)voipembedded.com>
Date: Sat Dec 1 23:21:44 2012 -0500
rls: fix cross-compilation
---
modules_k/rls/Makefile | 16 ++++++++++++----
1 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/modules_k/rls/Makefile b/modules_k/rls/Makefile
index 323a4b8..726c9c5 100644
--- a/modules_k/rls/Makefile
+++ b/modules_k/rls/Makefile
@@ -8,11 +8,19 @@
include ../../Makefile.defs
auto_gen=
NAME=rls.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