Browse code

xcap_server: use xml2-config to get include and libs compile flags

Daniel-Constantin Mierla authored on 09/09/2011 08:08:33
Showing 1 changed files
... ...
@@ -10,9 +10,20 @@ auto_gen=
10 10
 NAME=xcap_server.so
11 11
 LIBS=
12 12
 
13
-DEFS+=-I/usr/include/libxml2 -I$(LOCALBASE)/include/libxml2 \
14
-      -I$(LOCALBASE)/include
15
-LIBS+=-L$(LOCALBASE)/lib -lxml2
13
+XML2CFG=$(shell which xml2-config)
14
+
15
+ifneq ($(XML2CFG),)
16
+
17
+	DEFS += $(shell $(XML2CFG) --cflags)
18
+	LIBS += $(shell $(XML2CFG) --libs)
19
+
20
+else
21
+
22
+	DEFS+=-I/usr/include/libxml2 -I$(LOCALBASE)/include/libxml2 \
23
+		-I$(LOCALBASE)/include
24
+	LIBS+=-L$(LOCALBASE)/lib -lxml2
25
+
26
+endif
16 27
 
17 28
 DEFS+=-DOPENSER_MOD_INTERFACE
18 29