summarylogtreecommitdiffstats
path: root/jsonc-compile.patch
blob: e54f7410ccf11678e25b38c926af15f3ca39921c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
diff -Naur a/config.h b/config.h
--- a/config.h  1969-12-31 16:00:00.000000000 -0800
+++ b/config.h  2015-07-01 13:39:20.906185032 -0700
@@ -0,0 +1,3 @@
+#ifdef __CONFIG__
+#define META_DRIVER
+#endif
\ No newline at end of file
diff -Naur a/Makefile.meta b/Makefile.meta
--- a/Makefile.meta     2015-02-27 05:47:37.000000000 -0800
+++ b/Makefile.meta     2015-07-01 13:43:37.139605246 -0700
@@ -12,13 +12,10 @@
 # on another platform, change env_posix.os in MONGO_OBJS with the appropriate
 # environment object file.
 #
-LIBJSON = json-c
-LIBJSON_OBJS =  $(LIBJSON)/json_util.o $(LIBJSON)/json_object.o $(LIBJSON)/json_tokener.o \
-                                $(LIBJSON)/json_object_iterator.o $(LIBJSON)/printbuf.o $(LIBJSON)/linkhash.o \
-                                $(LIBJSON)/arraylist.o $(LIBJSON)/random_seed.o $(LIBJSON)/debug.o
 
+LIBJSON_INCLUDE = $(shell pkg-config --cflags json-c)
 MONGO_INCLUDE = $(shell pkg-config --cflags libmongoc-1.0)
-PG_CPPFLAGS = --std=c99 $(MONGO_INCLUDE) -I$(LIBJSON) -DMETA_DRIVER
+PG_CPPFLAGS = --std=c99 $(MONGO_INCLUDE) $(LIBJSON_INCLUDE) -DMETA_DRIVER
-SHLIB_LINK = $(shell pkg-config --libs libmongoc-1.0)
+SHLIB_LINK = $(shell pkg-config --libs libmongoc-1.0 json-c)
 
 OBJS = connection.o option.o mongo_wrapper_meta.o mongo_fdw.o mongo_query.o