add test for json_mhd.c logic
[oweals/gnunet.git] / src / json / Makefile.am
index f3fa28d69eec30da856a66533583a9f80ea669af..f030c3016cae69f92d625a22ed775bce4cf0add0 100644 (file)
@@ -25,7 +25,8 @@ libgnunetjson_la_LIBADD = \
   $(XLIB)
 
 check_PROGRAMS = \
-  test_json
+  test_json \
+  test_json_mhd
 
 TESTS = \
   $(check_PROGRAMS)
@@ -36,3 +37,26 @@ test_json_LDADD = \
   libgnunetjson.la \
   $(top_builddir)/src/util/libgnunetutil.la \
   -ljansson
+
+
+if HAVE_LIBGNURL
+LIB_GNURL=@LIBGNURL@
+CPP_GNURL=@LIBGNURL_CPPFLAGS@
+else
+if HAVE_LIBCURL
+LIB_GNURL=@LIBCURL@
+CPP_GNURL=@LIBCURL_CPPFLAGS@
+endif
+endif
+
+
+test_json_mhd_SOURCES = \
+  test_json_mhd.c
+test_json_mhd_LDADD = \
+  libgnunetjson.la \
+  $(top_builddir)/src/util/libgnunetutil.la \
+  -ljansson \
+  -lmicrohttpd \
+  $(LIB_GNURL)
+test_json_mhd_CPPFLAGS = \
+ $(CPP_GNURL) $(AM_CPPFLAGS)