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

Ovidiu Sas osas at voipembedded.com
Sun Dec 2 05:32:38 CET 2012


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

Author: Ovidiu Sas <osas at voipembedded.com>
Committer: Ovidiu Sas <osas at voipembedded.com>
Date:   Sat Dec  1 23:27:44 2012 -0500

presence_conference: fix cross-compilation

---

 modules_k/presence_conference/Makefile |   16 +++++++++++++---
 1 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/modules_k/presence_conference/Makefile b/modules_k/presence_conference/Makefile
index 94ee59b..9c909dd 100644
--- a/modules_k/presence_conference/Makefile
+++ b/modules_k/presence_conference/Makefile
@@ -4,9 +4,19 @@
 include ../../Makefile.defs
 auto_gen=
 NAME=presence_conference.so
-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