summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Barksdale <amatus@amat.us>2019-08-27 14:29:17 -0500
committerDavid Barksdale <amatus@amat.us>2019-08-27 14:29:17 -0500
commit53fd26b7e0deef386aeb207bfc1e3f7c00a1f775 (patch)
treedb4ed21ae7fb6677b7f7092f529175a76e3d4f6b
parentba2cae9617e32bf789001415cd787f50af8b3ce9 (diff)
Use pkg-config to check for MHD
-rw-r--r--configure.ac82
-rw-r--r--src/auction/gnunet-auction-create.c2
-rw-r--r--src/credential/Makefile.am3
-rw-r--r--src/gns/Makefile.am13
-rw-r--r--src/hostlist/Makefile.am10
-rw-r--r--src/identity/Makefile.am3
-rw-r--r--src/json/Makefile.am8
-rw-r--r--src/namestore/Makefile.am6
-rw-r--r--src/peerinfo-tool/Makefile.am3
-rw-r--r--src/pt/Makefile.am25
-rw-r--r--src/reclaim/Makefile.am6
-rw-r--r--src/rest/Makefile.am14
-rw-r--r--src/transport/Makefile.am23
13 files changed, 76 insertions, 122 deletions
diff --git a/configure.ac b/configure.ac
index 330b02875..3ddebf7a6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1262,73 +1262,23 @@ AS_IF([test "$sqlite" = 0 -a "$mysql" = 0],
# libmicrohttpd
lmhd=0
-AC_MSG_CHECKING([for libmicrohttpd])
+m4_define([MHD_MODULE], [libmicrohttpd >= 0.9.63])
AC_ARG_WITH(microhttpd,
- [ --with-microhttpd=PFX base of libmicrohttpd installation],
- [AC_MSG_RESULT([$with_microhttpd])
- AS_CASE([$with_microhttpd],
- [no],[],
- [yes|""],[
- AC_CHECK_HEADERS([microhttpd.h],
- AC_CHECK_DECL(MHD_OPTION_PER_IP_CONNECTION_LIMIT,
- AC_CHECK_LIB([microhttpd], [MHD_get_fdset2],
- [AC_MSG_CHECKING([for libmicrohttpd >= 0.9.63])
- AC_COMPILE_IFELSE([AC_LANG_SOURCE([
- #include "$native_srcdir/src/include/platform.h"
- #include <microhttpd.h>
- #if (MHD_VERSION < 0x0096300)
- #error needs at least version 0.9.63
- #endif
- int main () { return 0; }
- ])],
- [AC_MSG_RESULT(ok)
- lmhd=1],
- [AC_MSG_RESULT(failed)])]),
- [],[#include "$native_srcdir/src/include/platform.h"
- #include <microhttpd.h>]),,
- [#include "$native_srcdir/src/include/platform.h"])
- ],[
- LDFLAGS="-L$with_microhttpd/lib $LDFLAGS"
- CPPFLAGS="-I$with_microhttpd/include $CPPFLAGS"
- AC_CHECK_HEADERS(microhttpd.h,
- AC_CHECK_DECL(MHD_OPTION_PER_IP_CONNECTION_LIMIT,
- AC_CHECK_LIB([microhttpd], [MHD_get_fdset2],
- EXT_LIB_PATH="-L$with_microhttpd/lib $EXT_LIB_PATH"
- [AC_MSG_CHECKING([for libmicrohttpd >= 0.9.52])
- AC_COMPILE_IFELSE([AC_LANG_SOURCE([
- #include "$native_srcdir/src/include/platform.h"
- #include <microhttpd.h>
- #if (MHD_VERSION < 0x0094200)
- #error needs at least version 0.9.42
- #endif
- int main () { return 0; }
- ])],
- [AC_MSG_RESULT(ok)
- lmhd=1],
- [AC_MSG_RESULT(failed)])]),
- [],[#include "$native_srcdir/src/include/platform.h"
- #include <microhttpd.h>]),,
- [#include "$native_srcdir/src/include/platform.h"])
- ])
- ],
- [AC_MSG_RESULT([--with-microhttpd not specified])
- AC_CHECK_HEADERS([microhttpd.h],
- AC_CHECK_DECL(MHD_OPTION_PER_IP_CONNECTION_LIMIT,
- AC_CHECK_LIB([microhttpd], [MHD_get_fdset2],
- [AC_MSG_CHECKING([for libmicrohttpd >= 0.9.52])
- AC_COMPILE_IFELSE([AC_LANG_SOURCE([
- #include "$native_srcdir/src/include/platform.h"
- #include <microhttpd.h>
- #if (MHD_VERSION < 0x0094200)
- #error needs at least version 0.9.52
- #endif
- ])],
- [AC_MSG_RESULT(ok)
- lmhd=1],
- [AC_MSG_RESULT(failed)])]),
- [],[#include "$native_srcdir/src/include/platform.h"
- #include <microhttpd.h>]),,
- [#include "$native_srcdir/src/include/platform.h"])])
+ [AS_HELP_STRING([--with-microhttpd[[=PFX]]],
+ [base of libmicrohttpd installation])],
+ [],
+ [with_microhttpd=check])
+AS_CASE([$with_microhttpd],
+ [no], [],
+ [yes], [PKG_CHECK_MODULES([MHD], [MHD_MODULE], [lmhd=1])],
+ [check], [PKG_CHECK_MODULES([MHD], [MHD_MODULE],
+ [lmhd=1],
+ [AC_MSG_WARN([Building without libmicrohttpd])])],
+ [SAVE_PKG_CONFIG_PATH=$PKG_CONFIG_PATH
+ PKG_CONFIG_PATH=$with_microhttpd/lib/pkgconfig
+ export PKG_CONFIG_PATH
+ PKG_CHECK_MODULES([MHD], [MHD_MODULE], [lmhd=1])
+ PKG_CONFIG_PATH=$SAVE_PKG_CONFIG_PATH])
AM_CONDITIONAL(HAVE_MHD, test x$lmhd = x1)
AC_DEFINE_UNQUOTED([HAVE_MHD], $lmhd, [We have libmicrohttpd])
diff --git a/src/auction/gnunet-auction-create.c b/src/auction/gnunet-auction-create.c
index a094d2a56..3ee4d3554 100644
--- a/src/auction/gnunet-auction-create.c
+++ b/src/auction/gnunet-auction-create.c
@@ -28,7 +28,7 @@
#include <float.h>
#include "gnunet_util_lib.h"
-#include "gnunet_json_lib.h"
+#include <jansson.h>
/* #include "gnunet_auction_service.h" */
#define FIRST_PRICE 0
diff --git a/src/credential/Makefile.am b/src/credential/Makefile.am
index f2550eca6..bc6c49deb 100644
--- a/src/credential/Makefile.am
+++ b/src/credential/Makefile.am
@@ -100,9 +100,10 @@ endif
# $(top_builddir)/src/rest/libgnunetrest.la \
# $(top_builddir)/src/identity/libgnunetidentity.la \
# $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) \
-# $(LTLIBINTL) -ljansson -lmicrohttpd
+# $(LTLIBINTL) -ljansson $(MHD_LIBS)
#libgnunet_plugin_rest_credential_la_LDFLAGS = \
# $(GN_PLUGIN_LDFLAGS)
+#libgnunet_plugin_rest_credential_la_CFLAGS = $(MHD_CFLAGS) $(AM_CFLAGS)
diff --git a/src/gns/Makefile.am b/src/gns/Makefile.am
index 642172e69..0d38cb51e 100644
--- a/src/gns/Makefile.am
+++ b/src/gns/Makefile.am
@@ -122,9 +122,10 @@ libgnunet_plugin_rest_gns_la_LIBADD = \
$(top_builddir)/src/identity/libgnunetidentity.la \
$(top_builddir)/src/json/libgnunetjson.la \
$(top_builddir)/src/util/libgnunetutil.la $(XLIBS) \
- $(LTLIBINTL) -ljansson -lmicrohttpd
+ $(LTLIBINTL) -ljansson $(MHD_LIBS)
libgnunet_plugin_rest_gns_la_LDFLAGS = \
$(GN_PLUGIN_LDFLAGS)
+libgnunet_plugin_rest_gns_la_CFLAGS = $(MHD_CFLAGS) $(AM_CFLAGS)
libgnunet_plugin_gnsrecord_gns_la_SOURCES = \
@@ -158,7 +159,8 @@ gnunet_bcd_SOURCES = \
gnunet-bcd.c
gnunet_bcd_LDADD = \
$(top_builddir)/src/util/libgnunetutil.la \
- $(GN_LIBINTL) -lmicrohttpd
+ $(GN_LIBINTL) $(MHD_LIBS)
+gnunet_bcd_CFLAGS = $(MHD_CFLAGS) $(AM_CFLAGS)
gnunet_dns2gns_SOURCES = \
@@ -180,8 +182,7 @@ endif
gnunet_gns_proxy_SOURCES = \
gnunet-gns-proxy.c
-gnunet_gns_proxy_CPPFLAGS = $(AM_CPPFLAGS) $(CPP_GNURL)
-gnunet_gns_proxy_LDADD = -lmicrohttpd $(LIB_GNURL) -lgnutls \
+gnunet_gns_proxy_LDADD = $(MHD_LIBS) $(LIB_GNURL) -lgnutls \
libgnunetgns.la \
$(top_builddir)/src/identity/libgnunetidentity.la \
$(top_builddir)/src/util/libgnunetutil.la \
@@ -189,12 +190,14 @@ gnunet_gns_proxy_LDADD = -lmicrohttpd $(LIB_GNURL) -lgnutls \
if HAVE_GNUTLS_DANE
gnunet_gns_proxy_LDADD += -lgnutls-dane
endif
+gnunet_gns_proxy_CFLAGS = $(MHD_CFLAGS) $(CPP_GNURL) $(AM_CFLAGS)
test_gns_proxy_SOURCES = \
test_gns_proxy.c
-test_gns_proxy_LDADD = -lmicrohttpd $(LIB_GNURL) -lgnutls \
+test_gns_proxy_LDADD = $(MHD_LIBS) $(LIB_GNURL) -lgnutls \
$(top_builddir)/src/util/libgnunetutil.la \
$(GN_LIBINTL)
+test_gns_proxy_CFLAGS = $(MHD_CFLAGS) $(CPP_GNURL) $(AM_CFLAGS)
gnunet_gns_helper_service_w32_SOURCES = \
gnunet-gns-helper-service-w32.c
diff --git a/src/hostlist/Makefile.am b/src/hostlist/Makefile.am
index 17f0bdfa0..a8621a2b0 100644
--- a/src/hostlist/Makefile.am
+++ b/src/hostlist/Makefile.am
@@ -13,7 +13,8 @@ endif
if HAVE_MHD
HOSTLIST_SERVER_SOURCES = \
gnunet-daemon-hostlist_server.c gnunet-daemon-hostlist_server.h
- GN_LIBMHD = -lmicrohttpd
+ GN_LIBMHD = $(MHD_LIBS)
+ GN_CPPMHD = $(MHD_CFLAGS)
endif
if HAVE_LIBGNURL
@@ -50,9 +51,10 @@ gnunet_daemon_hostlist_LDADD = \
$(LIB_GNURL) \
$(GN_LIBINTL)
-gnunet_daemon_hostlist_CPPFLAGS = \
- $(CPP_GNURL) \
- $(AM_CPPFLAGS)
+gnunet_daemon_hostlist_CFLAGS = \
+ $(GN_CPPMHD) \
+ $(CPP_GNURL) \
+ $(AM_CFLAGS)
if HAVE_LIBGNURL
check_PROGRAMS = \
diff --git a/src/identity/Makefile.am b/src/identity/Makefile.am
index 476d981bb..9c87ec2c0 100644
--- a/src/identity/Makefile.am
+++ b/src/identity/Makefile.am
@@ -35,9 +35,10 @@ libgnunet_plugin_rest_identity_la_LIBADD = \
libgnunetidentity.la \
$(top_builddir)/src/rest/libgnunetrest.la \
$(top_builddir)/src/util/libgnunetutil.la $(XLIBS) \
- $(LTLIBINTL) -ljansson -lmicrohttpd
+ $(LTLIBINTL) -ljansson $(MHD_LIBS)
libgnunet_plugin_rest_identity_la_LDFLAGS = \
$(GN_PLUGIN_LDFLAGS)
+libgnunet_plugin_rest_identity_la_CFLAGS = $(MHD_CFLAGS) $(AM_CFLAGS)
libgnunetidentity_la_SOURCES = \
diff --git a/src/json/Makefile.am b/src/json/Makefile.am
index dfe185d5e..886c0691d 100644
--- a/src/json/Makefile.am
+++ b/src/json/Makefile.am
@@ -12,6 +12,7 @@ lib_LTLIBRARIES = \
libgnunetjson_la_LDFLAGS = \
-version-info 0:0:0 \
-no-undefined
+libgnunetjson_la_CFLAGS = $(MHD_CFLAGS) $(AM_CFLAGS)
libgnunetjson_la_SOURCES = \
json.c \
json_mhd.c \
@@ -22,7 +23,7 @@ libgnunetjson_la_LIBADD = \
$(top_builddir)/src/util/libgnunetutil.la \
$(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
-ljansson \
- -lmicrohttpd \
+ $(MHD_LIBS) \
$(XLIB) \
$(Z_LIBS)
@@ -58,8 +59,7 @@ test_json_mhd_LDADD = \
libgnunetjson.la \
$(top_builddir)/src/util/libgnunetutil.la \
-ljansson \
- -lmicrohttpd \
+ $(MHD_LIBS) \
$(Z_LIBS) \
$(LIB_GNURL)
-test_json_mhd_CPPFLAGS = \
- $(CPP_GNURL) $(AM_CPPFLAGS)
+test_json_mhd_CFLAGS = $(MHD_CFLAGS) $(CPP_GNURL) $(AM_CFLAGS)
diff --git a/src/namestore/Makefile.am b/src/namestore/Makefile.am
index e95add6c7..ad99a3f0b 100644
--- a/src/namestore/Makefile.am
+++ b/src/namestore/Makefile.am
@@ -143,9 +143,10 @@ libgnunet_plugin_rest_namestore_la_LIBADD = \
$(top_builddir)/src/json/libgnunetjson.la \
$(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
$(top_builddir)/src/util/libgnunetutil.la $(XLIBS) \
- $(LTLIBINTL) -ljansson -lmicrohttpd
+ $(LTLIBINTL) -ljansson $(MHD_LIBS)
libgnunet_plugin_rest_namestore_la_LDFLAGS = \
$(GN_PLUGIN_LDFLAGS)
+libgnunet_plugin_rest_namestore_la_CFLAGS = $(MHD_CFLAGS) $(AM_CFLAGS)
libgnunetnamestore_la_SOURCES = \
@@ -185,12 +186,13 @@ gnunet_namestore_LDADD = \
gnunet_namestore_fcfsd_SOURCES = \
gnunet-namestore-fcfsd.c
-gnunet_namestore_fcfsd_LDADD = -lmicrohttpd \
+gnunet_namestore_fcfsd_LDADD = $(MHD_LIBS) \
$(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
$(top_builddir)/src/identity/libgnunetidentity.la \
libgnunetnamestore.la \
$(top_builddir)/src/util/libgnunetutil.la \
$(GN_LIBINTL)
+gnunet_namestore_fcfsd_CFLAGS = $(MHD_CFLAGS) $(AM_CFLAGS)
gnunet_service_namestore_SOURCES = \
diff --git a/src/peerinfo-tool/Makefile.am b/src/peerinfo-tool/Makefile.am
index a5fd60246..8293288c8 100644
--- a/src/peerinfo-tool/Makefile.am
+++ b/src/peerinfo-tool/Makefile.am
@@ -32,9 +32,10 @@ libgnunet_plugin_rest_peerinfo_la_LIBADD = \
$(top_builddir)/src/rest/libgnunetrest.la \
$(top_builddir)/src/json/libgnunetjson.la \
$(top_builddir)/src/util/libgnunetutil.la $(XLIBS) \
- $(LTLIBINTL) -ljansson -lmicrohttpd
+ $(LTLIBINTL) -ljansson $(MHD_LIBS)
libgnunet_plugin_rest_peerinfo_la_LDFLAGS = \
$(GN_PLUGIN_LDFLAGS)
+libgnunet_plugin_rest_peerinfo_la_CFLAGS = $(MHD_CFLAGS) $(AM_CFLAGS)
gnunet_peerinfo_SOURCES = \
diff --git a/src/pt/Makefile.am b/src/pt/Makefile.am
index 188387c0c..1d94a3429 100644
--- a/src/pt/Makefile.am
+++ b/src/pt/Makefile.am
@@ -93,47 +93,42 @@ EXTRA_DIST = \
test_gns_vpn_SOURCES = \
test_gns_vpn.c
-test_gns_vpn_LDADD = -lmicrohttpd $(LIB_GNURL) \
+test_gns_vpn_LDADD = $(MHD_LIBS) $(LIB_GNURL) \
$(top_builddir)/src/namestore/libgnunetnamestore.la \
$(top_builddir)/src/identity/libgnunetidentity.la \
$(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
$(top_builddir)/src/testing/libgnunettesting.la \
$(top_builddir)/src/util/libgnunetutil.la
-test_gns_vpn_CPPFLAGS = \
- $(CPP_GNURL) $(AM_CPPFLAGS)
+test_gns_vpn_CFLAGS = $(MHD_CFLAGS) $(CPP_GNURL) $(AM_CFLAGS)
test_gnunet_vpn_4_over_SOURCES = \
test_gnunet_vpn.c
-test_gnunet_vpn_4_over_LDADD = -lmicrohttpd $(LIB_GNURL) \
+test_gnunet_vpn_4_over_LDADD = $(MHD_LIBS) $(LIB_GNURL) \
$(top_builddir)/src/vpn/libgnunetvpn.la \
$(top_builddir)/src/testing/libgnunettesting.la \
$(top_builddir)/src/util/libgnunetutil.la
-test_gnunet_vpn_4_over_CPPFLAGS = \
- $(LIB_GNURL) $(AM_CPPFLAGS)
+test_gnunet_vpn_4_over_CFLAGS = $(MHD_CFLAGS) $(CPP_GNURL) $(AM_CFLAGS)
test_gnunet_vpn_6_over_SOURCES = \
test_gnunet_vpn.c
-test_gnunet_vpn_6_over_LDADD = -lmicrohttpd $(LIB_GNURL) \
+test_gnunet_vpn_6_over_LDADD = $(MHD_LIBS) $(LIB_GNURL) \
$(top_builddir)/src/vpn/libgnunetvpn.la \
$(top_builddir)/src/testing/libgnunettesting.la \
$(top_builddir)/src/util/libgnunetutil.la
-test_gnunet_vpn_6_over_CPPFLAGS = \
- $(CPP_GNURL) $(AM_CPPFLAGS)
+test_gnunet_vpn_6_over_CFLAGS = $(MHD_CFLAGS) $(CPP_GNURL) $(AM_CFLAGS)
test_gnunet_vpn_4_to_6_SOURCES = \
test_gnunet_vpn.c
-test_gnunet_vpn_4_to_6_LDADD = -lmicrohttpd $(LIB_GNURL) \
+test_gnunet_vpn_4_to_6_LDADD = $(MHD_LIBS) $(LIB_GNURL) \
$(top_builddir)/src/vpn/libgnunetvpn.la \
$(top_builddir)/src/testing/libgnunettesting.la \
$(top_builddir)/src/util/libgnunetutil.la
-test_gnunet_vpn_4_to_6_CPPFLAGS = \
- $(CPP_GNURL) $(AM_CPPFLAGS)
+test_gnunet_vpn_4_to_6_CFLAGS = $(MHD_CFLAGS) $(CPP_GNURL) $(AM_CFLAGS)
test_gnunet_vpn_6_to_4_SOURCES = \
test_gnunet_vpn.c
-test_gnunet_vpn_6_to_4_LDADD = -lmicrohttpd $(LIB_GNURL) \
+test_gnunet_vpn_6_to_4_LDADD = $(MHD_LIBS) $(LIB_GNURL) \
$(top_builddir)/src/vpn/libgnunetvpn.la \
$(top_builddir)/src/testing/libgnunettesting.la \
$(top_builddir)/src/util/libgnunetutil.la
-test_gnunet_vpn_6_to_4_CPPFLAGS = \
- $(CPP_GNURL) $(AM_CPPFLAGS)
+test_gnunet_vpn_6_to_4_CFLAGS = $(MHD_CFLAGS) $(CPP_GNURL) $(AM_CFLAGS)
diff --git a/src/reclaim/Makefile.am b/src/reclaim/Makefile.am
index 6e5046437..6937b1af6 100644
--- a/src/reclaim/Makefile.am
+++ b/src/reclaim/Makefile.am
@@ -58,9 +58,10 @@ libgnunet_plugin_rest_reclaim_la_LIBADD = \
$(top_builddir)/src/reclaim-attribute/libgnunetreclaimattribute.la \
$(top_builddir)/src/namestore/libgnunetnamestore.la \
$(top_builddir)/src/util/libgnunetutil.la $(XLIBS) \
- $(LTLIBINTL) -ljansson -lmicrohttpd
+ $(LTLIBINTL) -ljansson $(MHD_LIBS)
libgnunet_plugin_rest_reclaim_la_LDFLAGS = \
$(GN_PLUGIN_LDFLAGS)
+libgnunet_plugin_rest_reclaim_la_CFLAGS = $(MHD_CFLAGS) $(AM_CFLAGS)
libgnunet_plugin_rest_openid_connect_la_SOURCES = \
@@ -76,9 +77,10 @@ libgnunet_plugin_rest_openid_connect_la_LIBADD = \
$(top_builddir)/src/gns/libgnunetgns.la \
$(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
$(top_builddir)/src/util/libgnunetutil.la $(XLIBS) \
- $(LTLIBINTL) -ljansson -lmicrohttpd
+ $(LTLIBINTL) -ljansson $(MHD_LIBS)
libgnunet_plugin_rest_openid_connect_la_LDFLAGS = \
$(GN_PLUGIN_LDFLAGS)
+libgnunet_plugin_rest_openid_connect_la_CFLAGS = $(MHD_CFLAGS) $(AM_CFLAGS)
libgnunet_plugin_gnsrecord_reclaim_la_SOURCES = \
diff --git a/src/rest/Makefile.am b/src/rest/Makefile.am
index 8fe48198f..1fd2816c0 100644
--- a/src/rest/Makefile.am
+++ b/src/rest/Makefile.am
@@ -37,34 +37,36 @@ libgnunet_plugin_rest_copying_la_SOURCES = \
libgnunet_plugin_rest_copying_la_LIBADD = \
libgnunetrest.la \
$(top_builddir)/src/util/libgnunetutil.la $(XLIBS) \
- $(LTLIBINTL) -lmicrohttpd
+ $(LTLIBINTL) $(MHD_LIBS)
libgnunet_plugin_rest_copying_la_LDFLAGS = \
$(GN_PLUGIN_LDFLAGS)
+libgnunet_plugin_rest_copying_la_CFLAGS = $(MHD_CFLAGS) $(AM_CFLAGS)
libgnunet_plugin_rest_config_la_SOURCES = \
plugin_rest_config.c
libgnunet_plugin_rest_config_la_LIBADD = \
libgnunetrest.la \
$(top_builddir)/src/util/libgnunetutil.la $(XLIBS) \
- $(LTLIBINTL) -lmicrohttpd -ljansson
+ $(LTLIBINTL) $(MHD_LIBS) -ljansson
libgnunet_plugin_rest_config_la_LDFLAGS = \
$(GN_PLUGIN_LDFLAGS)
+libgnunet_plugin_rest_config_la_CFLAGS = $(MHD_CFLAGS) $(AM_CFLAGS)
gnunet_rest_server_SOURCES = \
gnunet-rest-server.c
-
gnunet_rest_server_LDADD = \
$(top_builddir)/src/util/libgnunetutil.la \
- $(GN_LIBINTL) -lmicrohttpd
+ $(GN_LIBINTL) $(MHD_LIBS)
+gnunet_rest_server_CFLAGS = $(MHD_CFLAGS) $(AM_CFLAGS)
libgnunetrest_la_SOURCES = \
rest.c
libgnunetrest_la_LIBADD = \
$(top_builddir)/src/util/libgnunetutil.la $(XLIB) \
- $(GN_LIBINTL) -lmicrohttpd
+ $(GN_LIBINTL) $(MHD_LIBS)
libgnunetrest_la_LDFLAGS = \
$(GN_LIB_LDFLAGS) \
-version-info 0:0:0
-
+libgnunetrest_la_CFLAGS = $(MHD_CFLAGS) $(AM_CFLAGS)
diff --git a/src/transport/Makefile.am b/src/transport/Makefile.am
index e6729f2a9..a9b0d19d6 100644
--- a/src/transport/Makefile.am
+++ b/src/transport/Makefile.am
@@ -12,7 +12,6 @@ pkgcfg_DATA = \
communicator-unix.conf
if HAVE_MHD
- GN_LIBMHD = -lmicrohttpd
HTTP_SERVER_PLUGIN_LA = libgnunet_plugin_transport_http_server.la
HTTPS_SERVER_PLUGIN_LA = libgnunet_plugin_transport_https_server.la
HTTP_SERVER_PLUGIN_TEST = test_plugin_http_server
@@ -369,7 +368,7 @@ gnunet_service_transport_LDADD = \
$(GN_GLPK) \
$(GN_LIBINTL)
gnunet_service_transport_CFLAGS = \
- $(CFLAGS)
+ $(AM_CFLAGS)
# -DANALYZE
@@ -430,7 +429,7 @@ libgnunet_plugin_transport_wlan_la_LIBADD = \
libgnunet_plugin_transport_wlan_la_LDFLAGS = \
$(GN_PLUGIN_LDFLAGS)
libgnunet_plugin_transport_wlan_la_CFLAGS = \
- $(CFLAGS) -DBUILD_WLAN
+ $(AM_CFLAGS) -DBUILD_WLAN
libgnunet_plugin_transport_bluetooth_la_SOURCES = \
plugin_transport_wlan.c plugin_transport_wlan.h
@@ -443,7 +442,7 @@ libgnunet_plugin_transport_bluetooth_la_LIBADD = \
libgnunet_plugin_transport_bluetooth_la_LDFLAGS = \
$(GN_PLUGIN_LDFLAGS)
libgnunet_plugin_transport_bluetooth_la_CFLAGS = \
- $(CFLAGS) -DBUILD_BLUETOOTH
+ $(AM_CFLAGS) -DBUILD_BLUETOOTH
libgnunet_plugin_transport_udp_la_SOURCES = \
plugin_transport_udp.c plugin_transport_udp.h \
@@ -482,24 +481,22 @@ libgnunet_plugin_transport_http_client_la_LIBADD = \
libgnunet_plugin_transport_http_client_la_LDFLAGS = \
$(GN_PLUGIN_LDFLAGS)
libgnunet_plugin_transport_http_client_la_CFLAGS = \
- $(CFLAGS)
-libgnunet_plugin_transport_http_client_la_CPPFLAGS = \
- $(CPP_GNURL) $(AM_CPPFLAGS)
+ $(CPP_GNURL) $(AM_CFLAGS)
libgnunet_plugin_transport_http_server_la_SOURCES = \
plugin_transport_http_server.c plugin_transport_http_common.c
libgnunet_plugin_transport_http_server_la_LIBADD = \
+ $(MHD_LIBS) \
$(top_builddir)/src/hello/libgnunethello.la \
$(top_builddir)/src/statistics/libgnunetstatistics.la \
$(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
$(top_builddir)/src/nat/libgnunetnatnew.la \
$(top_builddir)/src/util/libgnunetutil.la
libgnunet_plugin_transport_http_server_la_LDFLAGS = \
- $(GN_LIBMHD) \
$(GN_PLUGIN_LDFLAGS)
libgnunet_plugin_transport_http_server_la_CFLAGS = \
- $(CFLAGS)
+ $(MHD_CFLAGS) $(AM_CFLAGS)
libgnunet_plugin_transport_https_client_la_SOURCES = \
plugin_transport_http_client.c plugin_transport_http_common.c
@@ -512,24 +509,22 @@ libgnunet_plugin_transport_https_client_la_LIBADD = \
libgnunet_plugin_transport_https_client_la_LDFLAGS = \
$(GN_PLUGIN_LDFLAGS)
libgnunet_plugin_transport_https_client_la_CFLAGS = \
- $(CFLAGS) -DBUILD_HTTPS
-libgnunet_plugin_transport_https_client_la_CPPFLAGS = \
- $(CPP_GNURL) $(AM_CPPFLAGS)
+ $(CPP_GNURL) $(AM_CFLAGS) -DBUILD_HTTPS
libgnunet_plugin_transport_https_server_la_SOURCES = \
plugin_transport_http_server.c plugin_transport_http_common.c
libgnunet_plugin_transport_https_server_la_LIBADD = \
+ $(MHD_LIBS) \
$(top_builddir)/src/hello/libgnunethello.la \
$(top_builddir)/src/statistics/libgnunetstatistics.la \
$(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
$(top_builddir)/src/nat/libgnunetnatnew.la \
$(top_builddir)/src/util/libgnunetutil.la
libgnunet_plugin_transport_https_server_la_LDFLAGS = \
- $(GN_LIBMHD) \
$(GN_PLUGIN_LDFLAGS)
libgnunet_plugin_transport_https_server_la_CFLAGS = \
- $(CFLAGS) -DBUILD_HTTPS
+ $(MHD_CFLAGS) $(AM_CFLAGS) -DBUILD_HTTPS
if HAVE_TESTING