[glib: 1/2] Check for zlib header



commit c49ed610ed1745742fbed637e7c6c04d6a64f4d6
Author: Xavier Claessens <xavier claessens collabora com>
Date:   Wed Nov 21 15:11:57 2018 -0500

    Check for zlib header
    
    It is not enough to check for the library, we also need zlib.h installed
    to be able to use it. Autotools were also checking for the header.

 meson.build | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/meson.build b/meson.build
index 02d7a11c2..1b7b2f87b 100644
--- a/meson.build
+++ b/meson.build
@@ -1765,10 +1765,9 @@ if not libz_dep.found()
       libz_dep = cc.find_library('zlib', required : false)
     endif
   endif
-endif
-
-if not libz_dep.found()
-  libz_dep = subproject('zlib').get_variable('zlib_dep')
+  if not libz_dep.found() or not cc.has_header('zlib.h')
+    libz_dep = subproject('zlib').get_variable('zlib_dep')
+  endif
 endif
 
 # First check in libc, fallback to libintl, and as last chance build


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]