Ver código fonte

pua_dialoginfo: fix cross-compilation

Ovidiu Sas 12 anos atrás
pai
commit
417c7d9f4b
1 arquivos alterados com 11 adições e 3 exclusões
  1. 11 3
      modules_k/pua_dialoginfo/Makefile

+ 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