xref: /PHP-8.0/ext/zip/config.w32 (revision 4f478af1)
1// vim:ft=javascript
2
3ARG_ENABLE("zip", "ZIP support", "yes");
4
5if (PHP_ZIP != "no") {
6	if (CHECK_HEADER_ADD_INCLUDE("zip.h", "CFLAGS_ZIP", PHP_PHP_BUILD + "\\include;" + PHP_EXTRA_INCLUDES) &&
7		CHECK_HEADER_ADD_INCLUDE("zipconf.h", "CFLAGS_ZIP", PHP_PHP_BUILD + "\\lib\\libzip\\include;" + PHP_EXTRA_LIBS + "\\libzip\\include;" + PHP_ZIP) &&
8		(PHP_ZIP_SHARED && CHECK_LIB("libzip.lib", "zip", PHP_ZIP) ||
9		 CHECK_LIB("libzip_a.lib", "zip", PHP_ZIP) && CHECK_LIB("libbz2_a.lib", "zip", PHP_ZIP) && CHECK_LIB("zlib_a.lib", "zip", PHP_ZIP) && CHECK_LIB("liblzma_a.lib", "zip", PHP_ZIP))
10	) {
11		EXTENSION('zip', 'php_zip.c zip_stream.c');
12
13		if (get_define("LIBS_ZIP").match("libzip_a(?:_debug)?\.lib")) {
14			/* Using static dependency lib. */
15			AC_DEFINE("ZIP_STATIC", 1);
16		}
17
18		AC_DEFINE('HAVE_ZIP', 1);
19		ADD_FLAG("CFLAGS_ZIP", "/D _WIN32 /D HAVE_SET_MTIME /D HAVE_ENCRYPTION /D HAVE_LIBZIP_VERSION /D HAVE_PROGRESS_CALLBACK /D HAVE_CANCEL_CALLBACK /D HAVE_METHOD_SUPPORTED /D LZMA_API_STATIC");
20	} else {
21		WARNING("zip not enabled; libraries and headers not found");
22	}
23}
24