[vlc-commits] [Git][videolan/vlc][master] meson: check zlib.h using z_dep
Felix Paul Kühne (@fkuehne)
gitlab at videolan.org
Sat Apr 25 13:12:06 UTC 2026
Felix Paul Kühne pushed to branch master at VideoLAN / VLC
Commits:
e35e0b67 by Alexandre Janniaux at 2026-04-25T14:57:56+02:00
meson: check zlib.h using z_dep
The generic check_header loop only passed contrib_inc_args, missing
zlib's include directory (from pkg-config or in my case, nix store).
Move the zlib.h check right after the z_dep detection and pass the
dependency so the header is reliably found whenever the library is
available.
Without this, HAVE_ZLIB was defined and code in libmp4 demux was using
zlib but the header was never included because HAVE_ZLIB_H was not
defined, so it led to compilation failure.
- - - - -
1 changed file:
- meson.build
Changes:
=====================================
meson.build
=====================================
@@ -160,10 +160,12 @@ subdir('buildsystem/simd_checks')
# named `name_dep`
#
-# zlib library
+# zlib library: meson has specific handling for the library and would
+# fallback to pkgconfig for the contrib
z_dep = dependency('zlib', required: false)
if z_dep.found()
cdata.set('HAVE_ZLIB', 1)
+ cdata.set('HAVE_ZLIB_H', 1)
endif
# Math library
@@ -271,7 +273,6 @@ check_c_headers = [
['valgrind/valgrind.h'],
['X11/Xlib.h'],
['xlocale.h'],
- ['zlib.h', { 'args' : [contrib_inc_args] }],
['wordexp.h'],
['dxgidebug.h'],
['d3dx9effect.h'],
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/e35e0b67f3b154bd8ece2a8a0c47333dacfdc19f
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/e35e0b67f3b154bd8ece2a8a0c47333dacfdc19f
You're receiving this email because of your account on code.videolan.org.
More information about the vlc-commits
mailing list