xref: /PHP-7.3/ext/hash/config.w32 (revision 1c850bfc)
1// vim:ft=javascript
2
3ARG_ENABLE("hash", "enable hash support", "yes");
4ARG_WITH("mhash", "mhash support", "no");
5
6if (PHP_MHASH != "no") {
7	if (PHP_HASH == "no") {
8		PHP_HASH = "yes";
9	}
10	AC_DEFINE('PHP_MHASH_BC', 1);
11}
12
13if (PHP_HASH != "no") {
14	var sha3_arch_dir = "sha3/" + (X64 ? "generic64lc" : "generic32lc");
15	var sha3_dir = "ext/hash/" + sha3_arch_dir;
16	if (CHECK_HEADER_ADD_INCLUDE("KeccakHash.h", "CFLAGS_HASH", PHP_HASH + ";" + sha3_dir)) {
17		AC_DEFINE('HAVE_HASH_EXT', 1);
18		EXTENSION("hash", "hash.c hash_md.c hash_sha.c hash_ripemd.c hash_haval.c "
19			+ "hash_tiger.c hash_gost.c hash_snefru.c hash_whirlpool.c "
20			+ "hash_adler32.c hash_crc32.c hash_joaat.c hash_fnv.c hash_sha3.c");
21
22		ADD_SOURCES(sha3_dir, "KeccakHash.c KeccakSponge.c " + (X64 ? "KeccakP-1600-opt64.c" : "KeccakP-1600-inplace32BI.c"),
23			"hash");
24		ADD_FLAG("CFLAGS_HASH", "/DKeccakP200_excluded /DKeccakP400_excluded /DKeccakP800_excluded");
25
26
27		PHP_INSTALL_HEADERS("ext/hash/", "php_hash.h php_hash_md.h php_hash_sha.h php_hash_ripemd.h " +
28		"php_hash_haval.h php_hash_tiger.h php_hash_gost.h php_hash_snefru.h " +
29		"php_hash_whirlpool.h php_hash_adler32.h php_hash_crc32.h php_hash_sha3.h ");
30	} else {
31		WARNING("hash not enabled; libraries and headers not found");
32	}
33}
34