Fix memory leak in test.
[dcpomatic.git] / wscript
diff --git a/wscript b/wscript
index ed7f9cc328ba82ec4b4f8ba1026fc92182a1b28c..6dd7417cda41fefa7cd0b76389a0f829820f7523 100644 (file)
--- a/wscript
+++ b/wscript
@@ -290,6 +290,15 @@ def configure(conf):
                    uselib="ZIP",
                    define_name='DCPOMATIC_HAVE_ZIP_FILE_ADD'
                    )
+    conf.check_cxx(fragment="""
+                            #include <zip.h>
+                            int main() { int error; zip_open("foo", ZIP_RDONLY, &error); }
+                            """,
+                   mandatory=False,
+                   msg="Checking for ZIP_RDONLY",
+                   uselib="ZIP",
+                   define_name='DCPOMATIC_HAVE_ZIP_RDONLY'
+                   )
 
     # libbz2; must be explicitly linked on macOS for some reason
     conf.check_cxx(fragment="""