[glib/glib-2-58] Check for 'z' library before fallbacking to subproject
- From: Xavier Claessens <xclaesse src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/glib-2-58] Check for 'z' library before fallbacking to subproject
- Date: Tue, 20 Nov 2018 15:40:50 +0000 (UTC)
commit 67a7a2fabd01b3e0a407813f2632f679100c101a
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 87df2b624..3a5b9cde5 100644
--- a/meson.build
+++ b/meson.build
@@ -1748,26 +1748,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]