meson: use better zlib dependency fallback
authorEli Schwartz <eschwartz@archlinux.org>
Tue, 24 May 2022 01:24:40 +0000 (21:24 -0400)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 24 May 2022 19:39:29 +0000 (19:39 +0000)
commit79c3bbc2ed3be3c441ba8e7b900e51d02b067328
treee1fd3804058e8b8ee9f51e9823ad969ebdf807a6
parent8433bab0b549cd37cf6f46bd24f472c36713c02d
meson: use better zlib dependency fallback

zlib is required, and if it isn't found it is checked several ways and
then forced via subproject(). This code was added in commit
b93e37592a3ccc0eaece1c8fef2d362b1e5fe685, to account for systems where
zlib doesn't have pkg-config files installed.

But Meson already does dependency fallback, and also, since 0.54.0, does
the in-between checks for find_library('z') and has_header('zlib.h') via
the "system" type dependency. Simplify dependency lookup by marking it
as required, which also makes sure that the console log doesn't
confusingly list "not found".

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2484>
subprojects/gst-plugins-base/gst-libs/gst/tag/meson.build
subprojects/gst-plugins-good/meson.build