Explicitly link zlib to keep new macOS environment happy.
authorCarl Hetherington <cth@carlh.net>
Sat, 20 Jan 2024 15:50:38 +0000 (16:50 +0100)
committerCarl Hetherington <cth@carlh.net>
Sat, 20 Jan 2024 15:50:38 +0000 (16:50 +0100)
src/lib/wscript
wscript

index ce36832bebe13174f833c7b52b6f183a0df7c8d3..d71f2a368c7efb827e2932204ad0302f1353ad6f 100644 (file)
@@ -229,6 +229,7 @@ def build(bld):
                  BOOST_FILESYSTEM BOOST_THREAD BOOST_DATETIME BOOST_SIGNALS2 BOOST_REGEX
                  SAMPLERATE POSTPROC TIFF SSH DCP CXML GLIB LZMA XML++
                  CURL ZIP BZ2 FONTCONFIG PANGOMM CAIROMM XMLSEC SUB ICU NETTLE PNG JPEG LEQM_NRT
+                 LIBZ
                  """
 
     if bld.env.TARGET_OSX:
diff --git a/wscript b/wscript
index 8ff3a621784b52c574f32a87b344bcd18dcbebe6..7395679fb93853733b5baeb4d357edd7e13c2cb9 100644 (file)
--- a/wscript
+++ b/wscript
@@ -278,6 +278,18 @@ def configure(conf):
                    uselib_store="BZ2"
                    )
 
+    # libz; must be explicitly linked on macOS for some reason
+    conf.check_cxx(fragment="""
+                            #include <zlib.h>
+                            int main() { zlibVersion(); }
+                            """,
+                   mandatory=True,
+                   msg="Checking for libz",
+                   okmsg='yes',
+                   lib='z',
+                   uselib_store="LIBZ"
+                   )
+
     # fontconfig
     conf.check_cfg(package='fontconfig', args='--cflags --libs', uselib_store='FONTCONFIG', mandatory=True)