diff --git a/sysconfig.h b/sysconfig.h index e68fa76a..fe2d199e 100644 --- a/sysconfig.h +++ b/sysconfig.h @@ -78,6 +78,10 @@ #define CAP_THREAD (!ISMOBILE && !ISWEB) #endif +#ifndef CAP_ZLIB +#define CAP_ZLIB (MAXMDIM >= 4) +#endif + #define CAP_FRAMELIMIT (!ISMOBWEB) #if ISMOBILE @@ -168,6 +172,10 @@ #define CAP_ODS 0 #endif +#ifndef MAXMDIM +#define MAXMDIM 4 +#endif + #ifndef CAP_TEXTURE #define CAP_TEXTURE (CAP_GL && (CAP_PNG || CAP_SDL_IMG) && !ISMINI) #endif @@ -426,7 +434,9 @@ extern "C" { #include #include +#if CAP_ZLIB #include +#endif #if CAP_THREAD #if WINDOWS @@ -494,10 +504,6 @@ union SDL_Event; #endif #endif -#ifndef MAXMDIM -#define MAXMDIM 4 -#endif - #ifndef CAP_GEOMETRY #define CAP_GEOMETRY (!(ISMINI)) #endif diff --git a/util.cpp b/util.cpp index 7983f16d..81491cbf 100644 --- a/util.cpp +++ b/util.cpp @@ -523,6 +523,7 @@ bignum::bignum(ld d) { while(n >= 0) { digits[n] = int(d); d -= digits[n]; d *= BASE; n--; } } +#if CAP_ZLIB /* compression/decompression */ EX string compress_string(string s) { @@ -563,5 +564,6 @@ EX string decompress_string(string s) { println(hlog, isize(s), " -> ", isize(out)); return out; } +#endif }