From f442c1e89e99ae5a0068a2d32e7284c2623f09fd Mon Sep 17 00:00:00 2001 From: Mark Adler Date: Fri, 7 Oct 2011 01:57:07 -0700 Subject: Add a ./config --solo option to make zlib subset with no libary use A common request has been the ability to compile zlib to require no other libraries. This --solo option provides that ability. The price is that the gz*, compress*, and uncompress functions are eliminated, and that the user must provide memory allocation and free routines to deflate and inflate when initializing. --- zutil.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'zutil.c') diff --git a/zutil.c b/zutil.c index 8f697cc..8a1d242 100644 --- a/zutil.c +++ b/zutil.c @@ -85,7 +85,11 @@ uLong ZEXPORT zlibCompileFlags() #ifdef FASTEST flags += 1L << 21; #endif +#ifdef Z_SOLO + return flags; +#else return flags + gzflags(); +#endif } #ifdef DEBUG @@ -157,6 +161,7 @@ void ZLIB_INTERNAL zmemzero(dest, len) } #endif +#ifndef Z_SOLO #ifdef SYS16BIT @@ -292,3 +297,5 @@ void ZLIB_INTERNAL zcfree (opaque, ptr) } #endif /* MY_ZCALLOC */ + +#endif /* !Z_SOLO */ -- cgit v1.2.3-55-g6feb