xref: /PHP-8.4/ext/phar/config.w32 (revision 499ea906)
1// vim:ft=javascript
2
3ARG_ENABLE("phar", "disable phar support", "yes");
4ARG_ENABLE("phar-native-ssl", "enable phar with native OpenSSL support", "no");
5
6if (PHP_PHAR_NATIVE_SSL != "no") {
7	PHP_PHAR = PHP_PHAR_NATIVE_SSL;
8}
9
10if (PHP_PHAR != "no") {
11	EXTENSION("phar", "dirstream.c func_interceptors.c phar.c phar_object.c phar_path_check.c stream.c tar.c util.c zip.c", PHP_PHAR_SHARED, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
12	if (PHP_PHAR_SHARED || (PHP_PHAR_NATIVE_SSL_SHARED && PHP_SNAPSHOT_BUILD == "no")) {
13		ADD_FLAG("CFLAGS_PHAR", "/D COMPILE_DL_PHAR ");
14	}
15	if (PHP_PHAR_NATIVE_SSL != "no") {
16		if (CHECK_LIB("libeay32st.lib", "phar")) {
17			/* We don't really need GDI for this, but there's no
18			way to avoid linking it in the static openssl build */
19			ADD_FLAG("LIBS_PHAR", "libeay32st.lib gdi32.lib");
20			if (PHP_DEBUG == "no") {
21				/* Silence irrelevant-to-us warning in release builds */
22				ADD_FLAG("LDFLAGS_PHAR", "/IGNORE:4089 ");
23			}
24			AC_DEFINE('PHAR_HAVE_OPENSSL', 1);
25			STDOUT.WriteLine('        Native OpenSSL support in Phar enabled');
26		} else {
27			WARNING('Could not enable native OpenSSL support in Phar');
28		}
29	} else {
30		if (PHP_OPENSSL != "no" && !PHP_OPENSSL_SHARED && !PHP_PHAR_SHARED) {
31			AC_DEFINE('PHAR_HAVE_OPENSSL', 1);
32			STDOUT.WriteLine('        Native OpenSSL support in Phar enabled');
33		} else {
34			STDOUT.WriteLine('        Native OpenSSL support in Phar disabled');
35		}
36	}
37	ADD_EXTENSION_DEP('phar', 'hash');
38	ADD_EXTENSION_DEP('phar', 'spl');
39	PHP_INSTALL_HEADERS("ext/phar", "php_phar.h");
40
41	ADD_MAKEFILE_FRAGMENT();
42}
43