xref: /PHP-8.1/ext/phar/config.w32 (revision 033cafac)
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', 'spl', true);
38
39	ADD_MAKEFILE_FRAGMENT();
40}
41