twister

HTTP fault injector for testing
Log | Files | Refs | README | LICENSE

commit 992bf9932c0e112f7c18ec613a7e7b877088b41f
parent cd970073d9f23ffd90766d500e10702414533f0d
Author: Marcello Stanisci <stanisci.m@gmail.com>
Date:   Thu, 20 Dec 2018 10:48:55 +0100

Autoconf zlib block.

Diffstat:
Mconfigure.ac | 31+++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+), 0 deletions(-)

diff --git a/configure.ac b/configure.ac @@ -292,6 +292,37 @@ AC_CHECK_HEADERS([gnunet/platform.h taler/taler_testing_lib.h], AM_CONDITIONAL(HAVE_TALERTESTING, test x$libtalertesting = x1) +# 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([Twister 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([Twister requires zlib])]) +AC_SUBST(Z_CFLAGS) +AC_SUBST(Z_LIBS) + + # should developer logic be compiled (not-for-production code)? AC_MSG_CHECKING(whether to compile developer logic) AC_ARG_ENABLE([developer-mode],