|
@@ -8,9 +8,28 @@ include ../../Makefile.defs
|
|
|
|
|
|
auto_gen=
|
|
|
NAME=pua_json.so
|
|
|
+LIBS=
|
|
|
+JLIB=json
|
|
|
|
|
|
-LIBS=-ljson-c
|
|
|
-DEFS+=-I$(LOCALBASE)/include -I/usr/local/include $(shell pkg-config --cflags json-c)
|
|
|
+BUILDER = $(shell which pkg-config)
|
|
|
+ifeq ($(BUILDER),)
|
|
|
+ JSONC=$(shell ls $(SYSBASE)/include/lib/libjson*.so $(LOCALBASE)/lib/libjson*.so 2>/dev/null | grep json-c)
|
|
|
+else
|
|
|
+ JSONC=$(shell pkg-config --libs json-c 2>/dev/null | grep json-c)
|
|
|
+endif
|
|
|
+
|
|
|
+ifneq ($(JSONC),)
|
|
|
+ JLIB=json-c
|
|
|
+endif
|
|
|
+
|
|
|
+ifeq ($(BUILDER),)
|
|
|
+ DEFS+=-I/usr/include/$(JLIB) -I$(LOCALBASE)/include/$(JLIB) \
|
|
|
+ -I$(LOCALBASE)/include
|
|
|
+ LIBS+=-L$(SYSBASE)/include/lib -L$(LOCALBASE)/lib -l$(JLIB)
|
|
|
+else
|
|
|
+ DEFS+= $(shell pkg-config --cflags $(JLIB))
|
|
|
+ LIBS+= $(shell pkg-config --libs $(JLIB))
|
|
|
+endif
|
|
|
|
|
|
DEFS+=-DKAMAILIO_MOD_INTERFACE
|
|
|
|