[glib: 1/2] Check for 'z' library before fallbacking to subproject
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 1/2] Check for 'z' library before fallbacking to subproject
- Date: Mon, 19 Nov 2018 22:39:17 +0000 (UTC)
commit 2ded434b40b9bdead69f4a7c058e6291c57d2fc2
Author: Xavier Claessens <xavier claessens collabora com>
Date: Tue Oct 9 10:59:21 2018 -0400
Check for 'z' library before fallbacking to subproject
meson.build | 23 +++++++++++------------
1 file changed, 11 insertions(+), 12 deletions(-)
---
diff --git a/meson.build b/meson.build
index 70977069a..ce71ca053 100644
--- a/meson.build
+++ b/meson.build
@@ -1752,26 +1752,25 @@ endif
libm = cc.find_library('m', required : false)
libffi_dep = dependency('libffi', version : '>= 3.0.0', fallback : ['libffi', 'ffi_dep'])
-if cc.get_id() != 'msvc'
- libz_dep = dependency('zlib', fallback : ['zlib', 'zlib_dep'])
-else
- # MSVC: Don't use the bundled ZLib sources until we are sure that we can't
- # find the ZLib .lib
- libz_dep = dependency('zlib', required : false)
- # MSVC: Search for the ZLib .lib, which corresponds to the results of
- # of using ZLib's win32/makefile.msc.
- if not libz_dep.found()
+# Don't use the bundled ZLib sources until we are sure that we can't find it on
+# the system
+libz_dep = dependency('zlib', required : false)
+if not libz_dep.found()
+ if cc.get_id() != 'msvc'
+ libz_dep = cc.find_library('z', required : false)
+ else
libz_dep = cc.find_library('zlib1', required : false)
if not libz_dep.found()
libz_dep = cc.find_library('zlib', required : false)
- if not libz_dep.found()
- libz_dep = subproject('zlib').get_variable('zlib_dep')
- endif
endif
endif
endif
+if not libz_dep.found()
+ libz_dep = subproject('zlib').get_variable('zlib_dep')
+endif
+
# First check in libc, fallback to libintl, and as last chance build
# proxy-libintl subproject.
# FIXME: glib-gettext.m4 has much more checks to detect broken/uncompatible
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]