diff options
-rw-r--r-- | configure.ac | 40 | ||||
-rw-r--r-- | src/core/Makefile.am | 2 | ||||
-rw-r--r-- | src/datastore/Makefile.am | 2 | ||||
-rw-r--r-- | src/dht/Makefile.am | 4 | ||||
-rw-r--r-- | src/testbed/Makefile.am | 6 | ||||
-rw-r--r-- | src/util/Makefile.am | 2 |
6 files changed, 38 insertions, 18 deletions
diff --git a/configure.ac b/configure.ac index 178fdf94a..52bc8967d 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -568,14 +568,38 @@ AM_CONDITIONAL(HAVE_POSTGRES, test x$postgres = xtrue) | |||
568 | AC_SUBST(POSTGRES_CPPFLAGS) | 568 | AC_SUBST(POSTGRES_CPPFLAGS) |
569 | AC_SUBST(POSTGRES_LDFLAGS) | 569 | AC_SUBST(POSTGRES_LDFLAGS) |
570 | 570 | ||
571 | # test for libz (maybe required for linking mysql) | 571 | # test for zlib |
572 | zlib=1 | 572 | SAVE_LDFLAGS=$LDFLAGS |
573 | AC_CHECK_LIB(z, compress,,zlib=0) | 573 | SAVE_CPPFLAGS=$CPPFLAGS |
574 | AM_CONDITIONAL(HAVE_ZLIB, test x$zlib = x1) | 574 | AC_ARG_WITH(zlib, |
575 | if test "$zlib" != 1 | 575 | [ --with-zlib[[=DIR]] use libz in DIR], |
576 | then | 576 | [AS_IF([test "$withval" = "no"], |
577 | AC_MSG_ERROR([GNUnet requires zlib]) | 577 | [AC_MSG_ERROR([GNUnet requires zlib])], |
578 | fi | 578 | [test "$withval" != "yes"], |
579 | [ | ||
580 | Z_DIR=$withval | ||
581 | CPPFLAGS="${CPPFLAGS} -I$withval/include" | ||
582 | LDFLAGS="${LDFLAGS} -L$withval/lib" | ||
583 | ]) | ||
584 | ]) | ||
585 | AC_CHECK_HEADER(zlib.h, | ||
586 | [], | ||
587 | [AC_MSG_ERROR([GNUnet requires zlib])]) | ||
588 | AC_CHECK_LIB(z, compress2, | ||
589 | [ | ||
590 | AC_DEFINE([HAVE_ZLIB], [], [Have compression library]) | ||
591 | if test "x${Z_DIR}" != "x"; then | ||
592 | Z_CFLAGS="-I${Z_DIR}/include" | ||
593 | Z_LIBS="-L${Z_DIR}/lib -lz" | ||
594 | else | ||
595 | Z_LIBS="-lz" | ||
596 | fi], | ||
597 | [AC_MSG_ERROR([GNUnet requires zlib])]) | ||
598 | AC_SUBST(Z_CFLAGS) | ||
599 | AC_SUBST(Z_LIBS) | ||
600 | |||
601 | LDFLAGS=$SAVE_LDFLAGS | ||
602 | CPPFLAGS=$SAVE_CPPFLAGS | ||
579 | 603 | ||
580 | # mysql & windows | 604 | # mysql & windows |
581 | AC_CHECK_TYPES([sigset_t, off_t], [], [], [#include <sys/types.h>]) | 605 | AC_CHECK_TYPES([sigset_t, off_t], [], [], [#include <sys/types.h>]) |
diff --git a/src/core/Makefile.am b/src/core/Makefile.am index a3ef13f5a..7e4cd7f54 100644 --- a/src/core/Makefile.am +++ b/src/core/Makefile.am | |||
@@ -49,7 +49,7 @@ gnunet_service_core_LDADD = \ | |||
49 | $(top_builddir)/src/statistics/libgnunetstatistics.la \ | 49 | $(top_builddir)/src/statistics/libgnunetstatistics.la \ |
50 | $(top_builddir)/src/transport/libgnunettransport.la \ | 50 | $(top_builddir)/src/transport/libgnunettransport.la \ |
51 | $(top_builddir)/src/util/libgnunetutil.la \ | 51 | $(top_builddir)/src/util/libgnunetutil.la \ |
52 | $(GN_LIBINTL) -lz | 52 | $(GN_LIBINTL) $(Z_LIBS) |
53 | 53 | ||
54 | 54 | ||
55 | gnunet_core_SOURCES = \ | 55 | gnunet_core_SOURCES = \ |
diff --git a/src/datastore/Makefile.am b/src/datastore/Makefile.am index c2acc2ffe..ef14175b2 100644 --- a/src/datastore/Makefile.am +++ b/src/datastore/Makefile.am | |||
@@ -124,7 +124,7 @@ libgnunet_plugin_datastore_mysql_la_SOURCES = \ | |||
124 | libgnunet_plugin_datastore_mysql_la_LIBADD = \ | 124 | libgnunet_plugin_datastore_mysql_la_LIBADD = \ |
125 | $(top_builddir)/src/mysql/libgnunetmysql.la \ | 125 | $(top_builddir)/src/mysql/libgnunetmysql.la \ |
126 | $(top_builddir)/src/statistics/libgnunetstatistics.la \ | 126 | $(top_builddir)/src/statistics/libgnunetstatistics.la \ |
127 | $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lz -lmysqlclient | 127 | $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) $(Z_LIBS) -lmysqlclient |
128 | libgnunet_plugin_datastore_mysql_la_LDFLAGS = \ | 128 | libgnunet_plugin_datastore_mysql_la_LDFLAGS = \ |
129 | $(GN_PLUGIN_LDFLAGS) $(MYSQL_LDFLAGS) -lmysqlclient | 129 | $(GN_PLUGIN_LDFLAGS) $(MYSQL_LDFLAGS) -lmysqlclient |
130 | libgnunet_plugin_datastore_mysql_la_CPPFLAGS = \ | 130 | libgnunet_plugin_datastore_mysql_la_CPPFLAGS = \ |
diff --git a/src/dht/Makefile.am b/src/dht/Makefile.am index 6bbc19188..305931728 100644 --- a/src/dht/Makefile.am +++ b/src/dht/Makefile.am | |||
@@ -12,10 +12,6 @@ libexecdir= $(pkglibdir)/libexec/ | |||
12 | pkgcfg_DATA = \ | 12 | pkgcfg_DATA = \ |
13 | dht.conf | 13 | dht.conf |
14 | 14 | ||
15 | if HAVE_ZLIB | ||
16 | ZLIB_LNK = -lz | ||
17 | endif | ||
18 | |||
19 | if USE_COVERAGE | 15 | if USE_COVERAGE |
20 | AM_CFLAGS = --coverage -O0 | 16 | AM_CFLAGS = --coverage -O0 |
21 | XLIB = -lgcov | 17 | XLIB = -lgcov |
diff --git a/src/testbed/Makefile.am b/src/testbed/Makefile.am index 902d8391b..eb6d050ad 100644 --- a/src/testbed/Makefile.am +++ b/src/testbed/Makefile.am | |||
@@ -48,7 +48,7 @@ gnunet_service_testbed_LDADD = $(XLIB) \ | |||
48 | $(top_builddir)/src/testing/libgnunettesting.la \ | 48 | $(top_builddir)/src/testing/libgnunettesting.la \ |
49 | $(top_builddir)/src/testbed/libgnunettestbed.la \ | 49 | $(top_builddir)/src/testbed/libgnunettestbed.la \ |
50 | $(top_builddir)/src/arm/libgnunetarm.la \ | 50 | $(top_builddir)/src/arm/libgnunetarm.la \ |
51 | $(LTLIBINTL) -lz | 51 | $(LTLIBINTL) $(Z_LIBS) |
52 | gnunet_service_testbed_DEPENDENCIES = \ | 52 | gnunet_service_testbed_DEPENDENCIES = \ |
53 | libgnunettestbed.la | 53 | libgnunettestbed.la |
54 | 54 | ||
@@ -71,7 +71,7 @@ gnunet_helper_testbed_LDADD = $(XLIB) \ | |||
71 | $(top_builddir)/src/util/libgnunetutil.la \ | 71 | $(top_builddir)/src/util/libgnunetutil.la \ |
72 | $(top_builddir)/src/testing/libgnunettesting.la \ | 72 | $(top_builddir)/src/testing/libgnunettesting.la \ |
73 | libgnunettestbed.la \ | 73 | libgnunettestbed.la \ |
74 | $(LTLIBINTL) -lz | 74 | $(LTLIBINTL) $(Z_LIBS) |
75 | gnunet_helper_testbed_DEPENDENCIES = \ | 75 | gnunet_helper_testbed_DEPENDENCIES = \ |
76 | gnunet-service-testbed.$(OBJEXT) \ | 76 | gnunet-service-testbed.$(OBJEXT) \ |
77 | libgnunettestbed.la | 77 | libgnunettestbed.la |
@@ -268,7 +268,7 @@ test_gnunet_helper_testbed_SOURCES = \ | |||
268 | test_gnunet_helper_testbed_LDADD = \ | 268 | test_gnunet_helper_testbed_LDADD = \ |
269 | $(top_builddir)/src/util/libgnunetutil.la \ | 269 | $(top_builddir)/src/util/libgnunetutil.la \ |
270 | libgnunettestbed.la \ | 270 | libgnunettestbed.la \ |
271 | -lz | 271 | $(Z_LIBZ) |
272 | 272 | ||
273 | test_testbed_api_testbed_run_topologyrandom_SOURCES = \ | 273 | test_testbed_api_testbed_run_topologyrandom_SOURCES = \ |
274 | test_testbed_api_testbed_run.c | 274 | test_testbed_api_testbed_run.c |
diff --git a/src/util/Makefile.am b/src/util/Makefile.am index 491006a42..06cd283c8 100644 --- a/src/util/Makefile.am +++ b/src/util/Makefile.am | |||
@@ -116,7 +116,7 @@ libgnunetutil_la_LIBADD = \ | |||
116 | $(LIBGCRYPT_LIBS) \ | 116 | $(LIBGCRYPT_LIBS) \ |
117 | $(LTLIBICONV) \ | 117 | $(LTLIBICONV) \ |
118 | $(LTLIBINTL) \ | 118 | $(LTLIBINTL) \ |
119 | -lltdl -lz -lunistring $(XLIB) | 119 | -lltdl $(Z_LIBS) -lunistring $(XLIB) |
120 | 120 | ||
121 | libgnunetutil_la_LDFLAGS = \ | 121 | libgnunetutil_la_LDFLAGS = \ |
122 | $(GN_LIB_LDFLAGS) \ | 122 | $(GN_LIB_LDFLAGS) \ |