-
-
Notifications
You must be signed in to change notification settings - Fork 96
/
config.w32
60 lines (54 loc) · 1.54 KB
/
config.w32
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
ARG_WITH('parallel', 'parallel support', 'no');
if (PHP_PARALLEL != 'no') {
(function () {
// check if zts enabled
if (PHP_ZTS == "no") {
WARNING("Parallel extension requires ZTS build of PHP on windows");
return;
}
// check if PHP 8+
if (PHP_VERSION < 8) {
WARNING("Parallel requires PHP8.0+");
return;
}
// check headers
if (
!CHECK_HEADER_ADD_INCLUDE("pthread.h", "CFLAGS_PARALLEL", PHP_PARALLEL + ";" + configure_module_dirname) ||
!CHECK_HEADER_ADD_INCLUDE("sched.h", "CFLAGS_PARALLEL", PHP_PARALLEL + ";" + configure_module_dirname)
) {
WARNING("parallel not enabled; pthread headers not found");
return;
}
// check libraries
var libNames = [
'libpthreadVC',
'libpthreadGC',
'pthreadVC'
];
var libName = null;
for (var i in libNames) {
var l = libNames[i] + '3.lib';
if (CHECK_LIB(l)) {
libName = l;
break;
}
l = libNames[i] + '2.lib';
if (CHECK_LIB(l)) {
libName = l;
break;
}
}
if (libName == null) {
WARNING("parallel not enabled; pthread libraries not found");
return;
}
// register extension
AC_DEFINE('HAVE_PARALLEL', 1, 'parallel support enabled');
EXTENSION("parallel", "php_parallel.c", PHP_PARALLEL_SHARED, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 /I" + configure_module_dirname);
ADD_SOURCES(
configure_module_dirname + "/src",
"exceptions.c copy.c check.c dependencies.c cache.c monitor.c parallel.c runtime.c scheduler.c future.c channel.c link.c handlers.c events.c poll.c loop.c event.c input.c sync.c",
"parallel"
);
})();
}