diff options
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | src/Makefile.am | 6 | ||||
-rw-r--r-- | src/gns/Makefile.am | 4 | ||||
-rw-r--r-- | src/identity/Makefile.am | 4 | ||||
-rw-r--r-- | src/namestore/Makefile.am | 4 | ||||
-rw-r--r-- | src/rest/Makefile.am | 2 | ||||
-rw-r--r-- | src/rest/rest.c | 7 |
7 files changed, 17 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac index e89f7befb..5b2f3fef2 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -970,8 +970,6 @@ AC_ARG_WITH(microhttpd, | |||
970 | AM_CONDITIONAL(HAVE_MHD, test x$lmhd = x1) | 970 | AM_CONDITIONAL(HAVE_MHD, test x$lmhd = x1) |
971 | AC_DEFINE_UNQUOTED([HAVE_MHD], $lmhd, [We have libmicrohttpd]) | 971 | AC_DEFINE_UNQUOTED([HAVE_MHD], $lmhd, [We have libmicrohttpd]) |
972 | 972 | ||
973 | AM_CONDITIONAL(HAVE_REST, [test x$lmhd = x1 -a x$jansson = x1]) | ||
974 | |||
975 | AM_CONDITIONAL(HAVE_JSON, [test x$jansson = x1]) | 973 | AM_CONDITIONAL(HAVE_JSON, [test x$jansson = x1]) |
976 | 974 | ||
977 | # restore LIBS | 975 | # restore LIBS |
diff --git a/src/Makefile.am b/src/Makefile.am index 946711797..5582c178b 100644 --- a/src/Makefile.am +++ b/src/Makefile.am | |||
@@ -19,9 +19,11 @@ if HAVE_EXPERIMENTAL | |||
19 | 19 | ||
20 | endif | 20 | endif |
21 | 21 | ||
22 | if HAVE_REST | 22 | if HAVE_JSON |
23 | if HAVE_MHD | ||
23 | PROVIDER_DIR = identity-provider | 24 | PROVIDER_DIR = identity-provider |
24 | endif | 25 | endif |
26 | endif | ||
25 | 27 | ||
26 | if HAVE_JSON | 28 | if HAVE_JSON |
27 | JSON_DIR = json | 29 | JSON_DIR = json |
@@ -50,7 +52,7 @@ if HAVE_POSTGRESQL | |||
50 | POSTGRES_DIR = pq postgres | 52 | POSTGRES_DIR = pq postgres |
51 | endif | 53 | endif |
52 | 54 | ||
53 | if HAVE_REST | 55 | if HAVE_MHD |
54 | REST_DIR = rest | 56 | REST_DIR = rest |
55 | if HAVE_JSON | 57 | if HAVE_JSON |
56 | JSONAPI_DIR = jsonapi | 58 | JSONAPI_DIR = jsonapi |
diff --git a/src/gns/Makefile.am b/src/gns/Makefile.am index 5ac598735..04fe45224 100644 --- a/src/gns/Makefile.am +++ b/src/gns/Makefile.am | |||
@@ -92,9 +92,11 @@ plugin_LTLIBRARIES = \ | |||
92 | libgnunet_plugin_gnsrecord_gns.la | 92 | libgnunet_plugin_gnsrecord_gns.la |
93 | 93 | ||
94 | 94 | ||
95 | if HAVE_REST | 95 | if HAVE_MHD |
96 | if HAVE_JSON | ||
96 | plugin_LTLIBRARIES += libgnunet_plugin_rest_gns.la | 97 | plugin_LTLIBRARIES += libgnunet_plugin_rest_gns.la |
97 | endif | 98 | endif |
99 | endif | ||
98 | 100 | ||
99 | libgnunet_plugin_gnsrecord_gns_la_SOURCES = \ | 101 | libgnunet_plugin_gnsrecord_gns_la_SOURCES = \ |
100 | plugin_gnsrecord_gns.c | 102 | plugin_gnsrecord_gns.c |
diff --git a/src/identity/Makefile.am b/src/identity/Makefile.am index f902f74fd..9b28ac093 100644 --- a/src/identity/Makefile.am +++ b/src/identity/Makefile.am | |||
@@ -39,11 +39,13 @@ bin_PROGRAMS = \ | |||
39 | libexec_PROGRAMS = \ | 39 | libexec_PROGRAMS = \ |
40 | gnunet-service-identity | 40 | gnunet-service-identity |
41 | 41 | ||
42 | if HAVE_REST | 42 | if HAVE_MHD |
43 | if HAVE_JSON | ||
43 | plugin_LTLIBRARIES = \ | 44 | plugin_LTLIBRARIES = \ |
44 | libgnunet_plugin_rest_identity.la \ | 45 | libgnunet_plugin_rest_identity.la \ |
45 | libgnunet_plugin_gnsrecord_identity.la | 46 | libgnunet_plugin_gnsrecord_identity.la |
46 | endif | 47 | endif |
48 | endif | ||
47 | 49 | ||
48 | 50 | ||
49 | gnunet_service_identity_SOURCES = \ | 51 | gnunet_service_identity_SOURCES = \ |
diff --git a/src/namestore/Makefile.am b/src/namestore/Makefile.am index cf47e8507..5fddebfa8 100644 --- a/src/namestore/Makefile.am +++ b/src/namestore/Makefile.am | |||
@@ -71,9 +71,11 @@ check_PROGRAMS = \ | |||
71 | $(TESTING_TESTS) | 71 | $(TESTING_TESTS) |
72 | endif | 72 | endif |
73 | 73 | ||
74 | if HAVE_REST | 74 | if HAVE_MHD |
75 | if HAVE_JSON | ||
75 | REST_PLUGIN=libgnunet_plugin_rest_namestore.la | 76 | REST_PLUGIN=libgnunet_plugin_rest_namestore.la |
76 | endif | 77 | endif |
78 | endif | ||
77 | 79 | ||
78 | if ENABLE_TEST_RUN | 80 | if ENABLE_TEST_RUN |
79 | AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH; | 81 | AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH; |
diff --git a/src/rest/Makefile.am b/src/rest/Makefile.am index 9ab7c03e0..c0feb9122 100644 --- a/src/rest/Makefile.am +++ b/src/rest/Makefile.am | |||
@@ -38,7 +38,7 @@ libgnunetrest_la_SOURCES = \ | |||
38 | rest.c | 38 | rest.c |
39 | libgnunetrest_la_LIBADD = \ | 39 | libgnunetrest_la_LIBADD = \ |
40 | $(top_builddir)/src/util/libgnunetutil.la $(XLIB) \ | 40 | $(top_builddir)/src/util/libgnunetutil.la $(XLIB) \ |
41 | $(GN_LIBINTL) -lmicrohttpd -ljansson | 41 | $(GN_LIBINTL) -lmicrohttpd |
42 | libgnunetrest_la_LDFLAGS = \ | 42 | libgnunetrest_la_LDFLAGS = \ |
43 | $(GN_LIB_LDFLAGS) \ | 43 | $(GN_LIB_LDFLAGS) \ |
44 | -version-info 0:0:0 | 44 | -version-info 0:0:0 |
diff --git a/src/rest/rest.c b/src/rest/rest.c index bf32c9849..b0d7e5ace 100644 --- a/src/rest/rest.c +++ b/src/rest/rest.c | |||
@@ -48,13 +48,13 @@ GNUNET_REST_namespace_match (const char *url, const char *namespace) | |||
48 | } | 48 | } |
49 | 49 | ||
50 | /** | 50 | /** |
51 | * Create JSON API MHD response | 51 | * Create MHD response |
52 | * | 52 | * |
53 | * @param data JSON result | 53 | * @param data result |
54 | * @retun MHD response | 54 | * @retun MHD response |
55 | */ | 55 | */ |
56 | struct MHD_Response* | 56 | struct MHD_Response* |
57 | GNUNET_REST_create_json_response (const char *data) | 57 | GNUNET_REST_create_response (const char *data) |
58 | { | 58 | { |
59 | struct MHD_Response *resp; | 59 | struct MHD_Response *resp; |
60 | size_t len; | 60 | size_t len; |
@@ -69,7 +69,6 @@ GNUNET_REST_create_json_response (const char *data) | |||
69 | resp = MHD_create_response_from_buffer (len, | 69 | resp = MHD_create_response_from_buffer (len, |
70 | (void*)data, | 70 | (void*)data, |
71 | MHD_RESPMEM_MUST_COPY); | 71 | MHD_RESPMEM_MUST_COPY); |
72 | MHD_add_response_header (resp,MHD_HTTP_HEADER_CONTENT_TYPE,"application/json"); | ||
73 | return resp; | 72 | return resp; |
74 | 73 | ||
75 | } | 74 | } |