xref: /PHP-8.3/ext/hash/config.w32 (revision 23590f7c)
1// vim:ft=javascript
2
3ARG_WITH('mhash', 'mhash support (BC via hash)', 'no');
4
5if (PHP_MHASH != 'no') {
6	AC_DEFINE('PHP_MHASH_BC', 1);
7}
8
9PHP_HASH = 'yes';
10
11EXTENSION('hash',	'hash.c hash_md.c hash_sha.c hash_ripemd.c hash_haval.c ' +
12					'hash_tiger.c hash_gost.c hash_snefru.c hash_whirlpool.c ' +
13					'hash_adler32.c hash_crc32.c hash_joaat.c hash_fnv.c ' +
14					'hash_sha3.c hash_murmur.c hash_xxhash.c', false);
15
16var hash_sha3_dir = 'ext/hash/sha3/generic' + (X64 ? '64' : '32') + 'lc';
17
18if(X64) {
19	ADD_SOURCES(hash_sha3_dir, 'KeccakHash.c KeccakSponge.c KeccakP-1600-opt64.c', 'hash');
20} else {
21	ADD_SOURCES(hash_sha3_dir, 'KeccakHash.c KeccakSponge.c KeccakP-1600-inplace32BI.c', 'hash');
22}
23
24if (!CHECK_HEADER_ADD_INCLUDE('KeccakHash.h', 'CFLAGS_HASH', hash_sha3_dir)) {
25	// Should NEVER happen
26	ERROR('Unable to locate SHA3 headers');
27}
28
29ADD_FLAG('CFLAGS_HASH', '/DKeccakP200_excluded /DKeccakP400_excluded /DKeccakP800_excluded /DZEND_ENABLE_STATIC_TSRMLS_CACHE=1');
30
31var hash_murmur_dir = 'ext/hash/murmur';
32if (!CHECK_HEADER_ADD_INCLUDE('PMurHash.h', 'CFLAGS_HASH', hash_murmur_dir)) {
33	ERROR('Unable to locate murmur headers');
34}
35ADD_SOURCES(hash_murmur_dir, 'PMurHash.c PMurHash128.c', 'hash');
36
37var hash_xxhash_dir = 'ext/hash/xxhash';
38if (!CHECK_HEADER_ADD_INCLUDE('xxhash.h', 'CFLAGS_HASH', hash_xxhash_dir)) {
39	ERROR('Unable to locate xxhash headers');
40}
41
42PHP_INSTALL_HEADERS('ext/hash/',	'php_hash.h php_hash_md.h php_hash_sha.h ' +
43									'php_hash_ripemd.h php_hash_haval.h php_hash_tiger.h ' +
44									'php_hash_gost.h php_hash_snefru.h php_hash_whirlpool.h ' +
45									'php_hash_adler32.h php_hash_crc32.h php_hash_sha3.h ' +
46									'php_hash_murmur.h php_hash_xxhash.h');
47