Module: sip-router Branch: master Commit: 11cedccfbc11c9efde566ecd2afb883246c64ba7 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=11cedccf...
Author: Ovidiu Sas osas@voipembedded.com Committer: Ovidiu Sas osas@voipembedded.com Date: Fri Jan 11 15:59:31 2013 -0500
lib/ims: fix cross compilation
---
lib/ims/Makefile | 16 +++++++++++++--- 1 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/lib/ims/Makefile b/lib/ims/Makefile index 7cd4b62..d0771a9 100644 --- a/lib/ims/Makefile +++ b/lib/ims/Makefile @@ -9,9 +9,19 @@ MAJOR_VER=0 MINOR_VER=1 BUGFIX_VER=0 DEFS+=-DSER -libxml2_includes=-I/usr/include/libxml2 -I$(LOCALBASE)/include/libxml2 \ - -I$(LOCALBASE)/include -libxml2_libs=-L$(LOCALBASE)/lib -lxml2 + +ifeq ($(CROSS_COMPILE),) +XML2CFG=$(shell which xml2-config) +endif + +ifneq ($(XML2CFG),) + libxml2_includes = $(shell $(XML2CFG) --cflags) + libxml2_libs = $(shell $(XML2CFG) --libs) +else + libxml2_includes = -I$(LOCALBASE)/include/libxml2 -I$(LOCALBASE)/include + libxml2_libs = -L$(LOCALBASE)/lib -lxml2 +endif + INCLUDES= -I$(CURDIR)/.. -I$(CURDIR)/../.. $(libxml2_includes) LIBS=$(libxml2_libs) #SERLIBPATH=..