gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r27400 - in gnunet: . src/core src/datastore src/dht src/te


From: gnunet
Subject: [GNUnet-SVN] r27400 - in gnunet: . src/core src/datastore src/dht src/testbed src/util
Date: Sun, 9 Jun 2013 06:46:52 +0200

Author: amatus
Date: 2013-06-09 06:46:52 +0200 (Sun, 09 Jun 2013)
New Revision: 27400

Modified:
   gnunet/configure.ac
   gnunet/src/core/Makefile.am
   gnunet/src/datastore/Makefile.am
   gnunet/src/dht/Makefile.am
   gnunet/src/testbed/Makefile.am
   gnunet/src/util/Makefile.am
Log:
Add --with-zlib=[DIR] configure option.


Modified: gnunet/configure.ac
===================================================================
--- gnunet/configure.ac 2013-06-07 14:51:00 UTC (rev 27399)
+++ gnunet/configure.ac 2013-06-09 04:46:52 UTC (rev 27400)
@@ -568,15 +568,39 @@
 AC_SUBST(POSTGRES_CPPFLAGS)
 AC_SUBST(POSTGRES_LDFLAGS)
 
-# test for libz (maybe required for linking mysql)
-zlib=1
-AC_CHECK_LIB(z, compress,,zlib=0)
-AM_CONDITIONAL(HAVE_ZLIB, test x$zlib = x1)
-if test "$zlib" != 1
-then
- AC_MSG_ERROR([GNUnet requires zlib])
-fi
+# test for zlib
+SAVE_LDFLAGS=$LDFLAGS
+SAVE_CPPFLAGS=$CPPFLAGS
+AC_ARG_WITH(zlib,
+           [  --with-zlib[[=DIR]]       use libz in DIR],
+           [AS_IF([test "$withval" = "no"],
+                  [AC_MSG_ERROR([GNUnet requires zlib])],
+                  [test "$withval" != "yes"],
+                  [
+                    Z_DIR=$withval
+                    CPPFLAGS="${CPPFLAGS} -I$withval/include"
+                    LDFLAGS="${LDFLAGS} -L$withval/lib"
+                  ])
+           ])
+AC_CHECK_HEADER(zlib.h,
+               [],
+               [AC_MSG_ERROR([GNUnet requires zlib])])
+AC_CHECK_LIB(z, compress2,
+            [
+             AC_DEFINE([HAVE_ZLIB], [], [Have compression library])
+             if test "x${Z_DIR}" != "x"; then
+                     Z_CFLAGS="-I${Z_DIR}/include"
+                     Z_LIBS="-L${Z_DIR}/lib -lz"
+             else
+                     Z_LIBS="-lz"
+             fi],
+             [AC_MSG_ERROR([GNUnet requires zlib])])
+AC_SUBST(Z_CFLAGS)
+AC_SUBST(Z_LIBS)
 
+LDFLAGS=$SAVE_LDFLAGS
+CPPFLAGS=$SAVE_CPPFLAGS
+
 # mysql & windows
 AC_CHECK_TYPES([sigset_t, off_t], [], [], [#include <sys/types.h>])
 AC_CHECK_TYPES([size_t], [], [], [#include <stdio.h>])

Modified: gnunet/src/core/Makefile.am
===================================================================
--- gnunet/src/core/Makefile.am 2013-06-07 14:51:00 UTC (rev 27399)
+++ gnunet/src/core/Makefile.am 2013-06-09 04:46:52 UTC (rev 27400)
@@ -49,7 +49,7 @@
   $(top_builddir)/src/statistics/libgnunetstatistics.la \
   $(top_builddir)/src/transport/libgnunettransport.la \
   $(top_builddir)/src/util/libgnunetutil.la \
-  $(GN_LIBINTL) -lz
+  $(GN_LIBINTL) $(Z_LIBS)
 
 
 gnunet_core_SOURCES = \

Modified: gnunet/src/datastore/Makefile.am
===================================================================
--- gnunet/src/datastore/Makefile.am    2013-06-07 14:51:00 UTC (rev 27399)
+++ gnunet/src/datastore/Makefile.am    2013-06-09 04:46:52 UTC (rev 27400)
@@ -124,7 +124,7 @@
 libgnunet_plugin_datastore_mysql_la_LIBADD = \
   $(top_builddir)/src/mysql/libgnunetmysql.la \
   $(top_builddir)/src/statistics/libgnunetstatistics.la \
-  $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lz -lmysqlclient
+  $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) $(Z_LIBS) -lmysqlclient
 libgnunet_plugin_datastore_mysql_la_LDFLAGS = \
  $(GN_PLUGIN_LDFLAGS) $(MYSQL_LDFLAGS) -lmysqlclient
 libgnunet_plugin_datastore_mysql_la_CPPFLAGS = \

Modified: gnunet/src/dht/Makefile.am
===================================================================
--- gnunet/src/dht/Makefile.am  2013-06-07 14:51:00 UTC (rev 27399)
+++ gnunet/src/dht/Makefile.am  2013-06-09 04:46:52 UTC (rev 27400)
@@ -12,10 +12,6 @@
 pkgcfg_DATA = \
   dht.conf 
 
-if HAVE_ZLIB
- ZLIB_LNK = -lz
-endif
-
 if USE_COVERAGE
   AM_CFLAGS = --coverage -O0
   XLIB = -lgcov

Modified: gnunet/src/testbed/Makefile.am
===================================================================
--- gnunet/src/testbed/Makefile.am      2013-06-07 14:51:00 UTC (rev 27399)
+++ gnunet/src/testbed/Makefile.am      2013-06-09 04:46:52 UTC (rev 27400)
@@ -48,7 +48,7 @@
  $(top_builddir)/src/testing/libgnunettesting.la \
  $(top_builddir)/src/testbed/libgnunettestbed.la \
  $(top_builddir)/src/arm/libgnunetarm.la \
- $(LTLIBINTL) -lz
+ $(LTLIBINTL) $(Z_LIBS)
 gnunet_service_testbed_DEPENDENCIES = \
  libgnunettestbed.la
 
@@ -71,7 +71,7 @@
  $(top_builddir)/src/util/libgnunetutil.la \
  $(top_builddir)/src/testing/libgnunettesting.la \
  libgnunettestbed.la \
- $(LTLIBINTL) -lz
+ $(LTLIBINTL) $(Z_LIBS)
 gnunet_helper_testbed_DEPENDENCIES = \
   gnunet-service-testbed.$(OBJEXT) \
   libgnunettestbed.la
@@ -268,7 +268,7 @@
 test_gnunet_helper_testbed_LDADD = \
  $(top_builddir)/src/util/libgnunetutil.la \
  libgnunettestbed.la \
- -lz
+ $(Z_LIBZ)
 
 test_testbed_api_testbed_run_topologyrandom_SOURCES = \
  test_testbed_api_testbed_run.c

Modified: gnunet/src/util/Makefile.am
===================================================================
--- gnunet/src/util/Makefile.am 2013-06-07 14:51:00 UTC (rev 27399)
+++ gnunet/src/util/Makefile.am 2013-06-09 04:46:52 UTC (rev 27400)
@@ -116,7 +116,7 @@
   $(LIBGCRYPT_LIBS) \
   $(LTLIBICONV) \
   $(LTLIBINTL) \
-  -lltdl -lz -lunistring $(XLIB) 
+  -lltdl $(Z_LIBS) -lunistring $(XLIB) 
 
 libgnunetutil_la_LDFLAGS = \
   $(GN_LIB_LDFLAGS) \




reply via email to

[Prev in Thread] Current Thread [Next in Thread]