Преглед изворни кода

Merge branch 'master' of ssh://git.sip-router.org/sip-router

* 'master' of ssh://git.sip-router.org/sip-router:
  xcap_server: fix cross-compilation
  regex: fix cross-compilation
  pua_xmpp: fix cross-compilation
  pua_usrloc: fix cross-compilation
  pua_reginfo: fix cross-compilation
  pua_dialoginfo: fix cross-compilation
  pua_bla: fix cross-compilation
  pua: fix cross-compilation
  presence_xml: fix cross-compilation
  presence_reginfo: no need to link against libxml2
Olle E. Johansson пре 12 година
родитељ
комит
291df73af6

+ 0 - 3
modules_k/presence_reginfo/Makefile

@@ -7,9 +7,6 @@
 include ../../Makefile.defs
 auto_gen=
 NAME=presence_reginfo.so
-DEFS+=-I/usr/include/libxml2 -I$(LOCALBASE)/include/libxml2 \
-      -I$(LOCALBASE)/include
-LIBS+=-L$(LOCALBASE)/lib -lxml2
 
 DEFS+=-DKAMAILIO_MOD_INTERFACE
 

+ 3 - 5
modules_k/presence_xml/Makefile

@@ -6,19 +6,17 @@ auto_gen=
 NAME=presence_xml.so
 LIBS=
 
+ifeq ($(CROSS_COMPILE),)
 XML2CFG=$(shell which xml2-config)
+endif
 
 ifneq ($(XML2CFG),)
-
 	DEFS += $(shell $(XML2CFG) --cflags )
 	LIBS += $(shell $(XML2CFG) --libs)
-
 else
-
-	DEFS+=-I/usr/include/libxml2 -I$(LOCALBASE)/include/libxml2 \
+	DEFS+=-I$(LOCALBASE)/include/libxml2 \
 		-I$(LOCALBASE)/include
 	LIBS+=-L$(LOCALBASE)/lib -lxml2
-
 endif
 
 DEFS+=-DKAMAILIO_MOD_INTERFACE

+ 11 - 3
modules_k/pua/Makefile

@@ -6,9 +6,17 @@ auto_gen=
 NAME=pua.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
 

+ 12 - 3
modules_k/pua_bla/Makefile

@@ -4,9 +4,18 @@
 include ../../Makefile.defs
 auto_gen=
 NAME=pua_bla.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
 

+ 11 - 3
modules_k/pua_dialoginfo/Makefile

@@ -6,9 +6,17 @@ auto_gen=
 NAME=pua_dialoginfo.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
 

+ 11 - 3
modules_k/pua_reginfo/Makefile

@@ -10,9 +10,17 @@ auto_gen=
 NAME=pua_reginfo.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
 

+ 11 - 3
modules_k/pua_usrloc/Makefile

@@ -6,9 +6,17 @@ auto_gen=
 NAME=pua_usrloc.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
 

+ 11 - 2
modules_k/pua_xmpp/Makefile

@@ -6,8 +6,17 @@ auto_gen=
 NAME= pua_xmpp.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
 

+ 5 - 5
modules_k/regex/Makefile

@@ -4,20 +4,20 @@ include ../../Makefile.defs
 auto_gen=
 NAME=regex.so
 
+ifeq ($(CROSS_COMPILE),)
 BUILDER = $(shell which pcre-config)
+endif
 
 ifeq ($(BUILDER),)
-	PCREDEFS=-I$(LOCALBASE)/include -I/usr/local/include -I/opt/include \
-	-I/usr/sfw/include
-	PCRELIBS=-L$(LOCALBASE)/lib -L/usr/local/lib -L/usr/sfw/lib \
-	-L/opt/lib -lpcre
+	PCREDEFS=-I$(LOCALBASE)/include
+	PCRELIBS=-L$(LOCALBASE)/lib -lpcre
 else
 	PCREDEFS = $(shell pcre-config --cflags)
 	PCRELIBS = $(shell pcre-config --libs)
 endif
 
 DEFS+=$(PCREDEFS)
-LIBS=$(PCRELIBS)
+LIBS+=$(PCRELIBS)
 
 DEFS+=-DKAMAILIO_MOD_INTERFACE
 

+ 3 - 7
modules_k/xcap_server/Makefile

@@ -8,21 +8,17 @@
 include ../../Makefile.defs
 auto_gen=
 NAME=xcap_server.so
-LIBS=
 
+ifeq ($(CROSS_COMPILE),)
 XML2CFG=$(shell which xml2-config)
+endif
 
 ifneq ($(XML2CFG),)
-
 	DEFS += $(shell $(XML2CFG) --cflags)
 	LIBS += $(shell $(XML2CFG) --libs)
-
 else
-
-	DEFS+=-I/usr/include/libxml2 -I$(LOCALBASE)/include/libxml2 \
-		-I$(LOCALBASE)/include
+	DEFS+=-I$(LOCALBASE)/include/libxml2 -I$(LOCALBASE)/include
 	LIBS+=-L$(LOCALBASE)/lib -lxml2
-
 endif
 
 DEFS+=-DKAMAILIO_MOD_INTERFACE