android,configure,meson: define HAVE_ZLIB
authorGrazvydas Ignotas <notasas@gmail.com>
Thu, 28 Dec 2017 23:29:10 +0000 (01:29 +0200)
committerGrazvydas Ignotas <notasas@gmail.com>
Sun, 14 Jan 2018 16:52:23 +0000 (18:52 +0200)
The next change wants to use some optional zlib functionality, however
not all platforms currently use zlib. Based on earlier Jordan Justen's
patches and their review feedback.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Android.common.mk
configure.ac
meson.build

index d9f871c08c76816f2c8cd6911f08ee13d5c43b66..52dc7bff3be5af1f97b673ad3f7308660d1d96ba 100644 (file)
@@ -70,6 +70,7 @@ LOCAL_CFLAGS += \
        -DHAVE_DLADDR \
        -DHAVE_DL_ITERATE_PHDR \
        -DHAVE_LINUX_FUTEX_H \
+       -DHAVE_ZLIB \
        -DMAJOR_IN_SYSMACROS \
        -fvisibility=hidden \
        -Wno-sign-compare
index 79f275d3914984385137b35319c1a79fb9498d53..e236a3c54f6f5afd925499f92354664ac3384dba 100644 (file)
@@ -906,6 +906,7 @@ AC_CHECK_FUNC([posix_memalign], [DEFINES="$DEFINES -DHAVE_POSIX_MEMALIGN"])
 
 dnl Check for zlib
 PKG_CHECK_MODULES([ZLIB], [zlib >= $ZLIB_REQUIRED])
+DEFINES="$DEFINES -DHAVE_ZLIB"
 
 dnl Check for pthreads
 AX_PTHREAD
index 77e4e894b230659686a4b231a0fc00d4302c8834..ae31cdd6571d71b49216bf548c583d0975cf222e 100644 (file)
@@ -943,6 +943,7 @@ endif
 
 # TODO: some of these may be conditional
 dep_zlib = dependency('zlib', version : '>= 1.2.3')
+pre_args += '-DHAVE_ZLIB'
 dep_thread = dependency('threads')
 if dep_thread.found() and host_machine.system() != 'windows'
   pre_args += '-DHAVE_PTHREAD'