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

Ovidiu Sas osas at voipembedded.com
Thu Jan 10 22:49:20 CET 2013


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

Author: Ovidiu Sas <osas at voipembedded.com>
Committer: Ovidiu Sas <osas at voipembedded.com>
Date:   Thu Jan 10 16:42:08 2013 -0500

ims_auth: fix cross-compilation

---

 modules/ims_auth/Makefile |   19 ++++++++++++-------
 1 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/modules/ims_auth/Makefile b/modules/ims_auth/Makefile
index 5b168b2..a891adf 100644
--- a/modules/ims_auth/Makefile
+++ b/modules/ims_auth/Makefile
@@ -8,17 +8,22 @@
 include ../../Makefile.defs
 auto_gen=
 NAME=ims_auth.so
-LIBS=
 
-DEFS+=-DOPENSER_MOD_INTERFACE
-
-DEFS += -I/usr/include/libxml2
-LIBS += -L$(LOCALBASE)/lib -lxml2
+ifeq ($(CROSS_COMPILE),)
+XML2CFG=$(shell which xml2-config)
+endif
 
-ifneq ($(OS),darwin)
-	LIBS += -lrt
+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+=-DOPENSER_MOD_INTERFACE
+
 SERLIBPATH=../../lib
 SER_LIBS+=$(SERLIBPATH)/kcore/kcore
 SER_LIBS+=$(SERLIBPATH)/ims/kamailio_ims




More information about the sr-dev mailing list