meson, util: Make zlib optional again

This adds a HAVE_COMPRESSION macro, which is undefined if neither zlib
nor zstd are present, and is used to no-op compress.h/c. This also has
a side effect of fixing SCons, since it won't define this macro.

Fixes: d7ecbd5bf8 ("util: create some standalone compression helpers")
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9689>
This commit is contained in:
Jesse Natalie
2021-03-18 09:12:46 -07:00
committed by Marge Bot
parent 28bf06f350
commit 012bc2fc77
4 changed files with 29 additions and 4 deletions
+1
View File
@@ -73,6 +73,7 @@ LOCAL_CFLAGS += \
-DHAVE_LINUX_FUTEX_H \
-DHAVE_ENDIAN_H \
-DHAVE_ZLIB \
-DHAVE_COMPRESSION \
-DMAJOR_IN_SYSMACROS \
-DVK_USE_PLATFORM_ANDROID_KHR \
-fvisibility=hidden \