-
Notifications
You must be signed in to change notification settings - Fork 18
/
config.w32
44 lines (41 loc) · 2.18 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
var PMMPTHREAD_EXT_NAME="pmmpthread";
var PMMPTHREAD_EXT_DIR=configure_module_dirname;
var PMMPTHREAD_EXT_API="php_pmmpthread.c";
var PMMPTHREAD_EXT_FLAGS="/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 /permissive- /I" + configure_module_dirname;
/* --------------------------------------------------------------------- */
ARG_WITH("pmmpthread", "for pmmpthread support", "no");
ARG_WITH("pmmpthread-sockets", "Whether to enable support for passing Socket objects between threads", "yes");
if (PHP_PMMPTHREAD != "no") {
if(CHECK_HEADER_ADD_INCLUDE("pthread.h", "CFLAGS_PMMPTHREAD", PHP_PMMPTHREAD + ";" + configure_module_dirname) &&
CHECK_HEADER_ADD_INCLUDE("sched.h", "CFLAGS_PMMPTHREAD", PHP_PMMPTHREAD + ";" + configure_module_dirname) &&
(
CHECK_LIB("pthreadVC2.lib", PMMPTHREAD_EXT_NAME, PHP_PMMPTHREAD) ||
(
CHECK_LIB("pthreadVC3.lib", PMMPTHREAD_EXT_NAME, PHP_PMMPTHREAD) &&
CHECK_HEADER_ADD_INCLUDE("_ptw32.h", "CFLAGS_PMMPTHREAD", PHP_PMMPTHREAD + ";" + configure_module_dirname) //extra header needed for v3
)
)) {
EXTENSION(PMMPTHREAD_EXT_NAME, PMMPTHREAD_EXT_API, PHP_PMMPTHREAD_SHARED, PMMPTHREAD_EXT_FLAGS);
if (PHP_PMMPTHREAD_SOCKETS != "no") {
MESSAGE("Support for passing Socket objects between threads enabled. The sockets extension must be loaded at runtime. You can disable support using --without-pmmpthread-sockets.");
ADD_EXTENSION_DEP("pmmpthread", "sockets");
AC_DEFINE("HAVE_PMMPTHREAD_EXT_SOCKETS_SUPPORT", 1, "Whether pmmpthread supports passing Socket objects between threads");
} else {
MESSAGE("Support for passing Socket objects between threads disabled. You can enable support using --with-pmmpthread-sockets.");
}
ADD_SOURCES(
PMMPTHREAD_EXT_DIR + "/src",
"copy.c monitor.c worker.c globals.c prepare.c store.c handlers.c object.c routine.c queue.c ext_sockets_hacks.c",
PMMPTHREAD_EXT_NAME,
MODE_PHPIZE ? "src" : null
);
ADD_SOURCES(
PMMPTHREAD_EXT_DIR + "/classes",
"pool.c thread.c thread_safe_array.c thread_safe.c runnable.c worker.c",
PMMPTHREAD_EXT_NAME,
MODE_PHPIZE ? "classes" : null
);
} else {
WARNING("pmmpthread not enabled; libraries and headers not found");
}
}