Forráskód Böngészése

presence_conference: fix cross-compilation

Ovidiu Sas 12 éve
szülő
commit
3aa1929ac1
1 módosított fájl, 13 hozzáadás és 3 törlés
  1. 13 3
      modules_k/presence_conference/Makefile

+ 13 - 3
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