conf.check_cfg(package='libzip', args='--cflags --libs', uselib_store='ZIP', mandatory=True)
conf.check_cxx(fragment="""
#include <zip.h>
- int main() { zip_source_t* foo; }
+ int main() { zip_source_t* foo; (void)foo; }
""",
mandatory=False,
msg="Checking for zip_source_t",
)
conf.check_cxx(fragment="""
#include <zip.h>
- int main() { struct zip* zip; zip_source_t* source; zip_file_add(zip, "foo", source, ZIP_FL_ENC_GUESS); }
+ int main() { struct zip* zip = nullptr; zip_source_t* source = nullptr; zip_file_add(zip, "foo", source, ZIP_FL_ENC_GUESS); }
""",
mandatory=False,
msg="Checking for zip_file_add",
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)