address Debian #758937: allow use of curl if it is really the gnutls version and...
[oweals/gnunet.git] / src / hostlist / Makefile.am
1 AM_CPPFLAGS = -I$(top_srcdir)/src/include
2
3 pkgcfgdir= $(pkgdatadir)/config.d/
4
5 libexecdir= $(pkglibdir)/libexec/
6
7 dist_pkgcfg_DATA = \
8   hostlist.conf
9
10 if USE_COVERAGE
11   AM_CFLAGS = --coverage -O0
12 endif
13
14 if HAVE_MHD
15  HOSTLIST_SERVER_SOURCES = \
16    gnunet-daemon-hostlist_server.c gnunet-daemon-hostlist_server.h
17  GN_LIBMHD = -lmicrohttpd
18 endif
19
20 if HAVE_LIBGNURL
21 libexec_PROGRAMS = \
22  gnunet-daemon-hostlist
23 LIB_GNURL=@LIBGNURL@
24 CPP_GNURL=@LIBGNURL_CPPFLAGS@
25 else
26 if HAVE_LIBCURL
27 libexec_PROGRAMS = \
28  gnunet-daemon-hostlist
29 LIB_GNURL=@LIBCURL@
30 CPP_GNURL=@LIBCURL_CPPFLAGS@
31 endif
32 endif
33
34 gnunet_daemon_hostlist_SOURCES = \
35  gnunet-daemon-hostlist.c gnunet-daemon-hostlist.h \
36  gnunet-daemon-hostlist_client.c gnunet-daemon-hostlist_client.h \
37  $(HOSTLIST_SERVER_SOURCES)
38
39 gnunet_daemon_hostlist_LDADD = \
40   $(top_builddir)/src/core/libgnunetcore.la \
41   $(top_builddir)/src/hello/libgnunethello.la \
42   $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
43   $(top_builddir)/src/statistics/libgnunetstatistics.la \
44   $(top_builddir)/src/transport/libgnunettransport.la \
45   $(top_builddir)/src/util/libgnunetutil.la \
46   $(GN_LIBMHD) \
47   $(LIB_GNURL) \
48   $(GN_LIBINTL)
49
50 gnunet_daemon_hostlist_CPPFLAGS = \
51  $(CPP_GNURL) \
52  $(AM_CPPFLAGS)
53
54 if HAVE_LIBGNURL
55 check_PROGRAMS = \
56  test_gnunet_daemon_hostlist \
57  test_gnunet_daemon_hostlist_reconnect \
58  test_gnunet_daemon_hostlist_learning
59
60 if HAVE_MHD
61 if ENABLE_TEST_RUN
62 AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;
63 TESTS = \
64  test_gnunet_daemon_hostlist \
65  test_gnunet_daemon_hostlist_reconnect \
66  test_gnunet_daemon_hostlist_learning
67 endif
68 endif
69 endif
70
71 test_gnunet_daemon_hostlist_SOURCES = \
72  test_gnunet_daemon_hostlist.c
73 test_gnunet_daemon_hostlist_LDADD = \
74   $(top_builddir)/src/transport/libgnunettransport.la \
75   $(top_builddir)/src/util/libgnunetutil.la
76
77 test_gnunet_daemon_hostlist_reconnect_SOURCES = \
78  test_gnunet_daemon_hostlist_reconnect.c
79 test_gnunet_daemon_hostlist_reconnect_LDADD = \
80   $(top_builddir)/src/transport/libgnunettransport.la \
81   $(top_builddir)/src/util/libgnunetutil.la
82
83 test_gnunet_daemon_hostlist_learning_SOURCES = \
84  test_gnunet_daemon_hostlist_learning.c
85 test_gnunet_daemon_hostlist_learning_LDADD = \
86   $(top_builddir)/src/transport/libgnunettransport.la \
87   $(top_builddir)/src/core/libgnunetcore.la \
88   $(top_builddir)/src/statistics/libgnunetstatistics.la \
89   $(top_builddir)/src/util/libgnunetutil.la
90
91 EXTRA_DIST = \
92   test_hostlist_defaults.conf \
93   test_gnunet_daemon_hostlist_data.conf \
94   test_gnunet_daemon_hostlist_peer1.conf \
95   test_gnunet_daemon_hostlist_peer2.conf \
96   test_learning_adv_peer.conf \
97   test_learning_learn_peer.conf \
98   test_learning_learn_peer2.conf \
99   learning_data.conf