ext-uv/config.w32

37 lines
1.3 KiB
Plaintext
Raw Normal View History

2012-11-18 23:04:30 +01:00
// vim:ft=javascript
2012-06-18 15:32:15 +02:00
ARG_ENABLE("uv", "for uv support", "no");
ARG_ENABLE("uv-httpparser", "for httpparser support in the uv extension", "yes");
2012-06-18 15:32:15 +02:00
if (PHP_UV != "no") {
2012-06-19 16:03:13 +02:00
var libuv_target_dir = ".\\libuv\\Release";
if (PHP_DEBUG == "yes") {
libuv_target_dir = ".\\libuv\\Debug"
}
if (CHECK_HEADER_ADD_INCLUDE("uv.h", "CFLAGS_UV", PHP_EXTRA_INCLUDES + ';' + configure_module_dirname + "\\libuv\\include") &&
CHECK_LIB("uv.lib;libuv.lib", "uv", PHP_EXTRA_LIBS + ';' + libuv_target_dir)
2012-06-19 16:03:13 +02:00
) {
if (PHP_UV_HTTPPARSER == "yes") {
CHECK_HEADER_ADD_INCLUDE("http_parser.h", "CFLAGS_UV", configure_module_dirname + "\\http-parser")
2012-07-01 06:47:26 +02:00
ADD_SOURCES(configure_module_dirname + ".\\http-parser", "http_parser.c", "uv")
EXTENSION('uv', 'php_uv.c uv.c');
} else {
EXTENSION('uv', 'php_uv.c uv.c');
}
2012-06-18 15:32:15 +02:00
} else {
2012-06-19 16:03:13 +02:00
WARNING("uv not enabled; libraries and/or headers not found. You have to execute vcbuild.bat first");
2012-06-18 15:32:15 +02:00
}
2012-07-01 06:47:26 +02:00
2012-06-19 16:03:13 +02:00
CHECK_LIB("Iphlpapi.lib","uv", PHP_UV);
CHECK_LIB("psapi.lib","uv", PHP_UV);
2012-06-25 16:59:49 +02:00
CHECK_LIB("Ws2_32.lib","uv", PHP_UV);
2012-11-18 23:04:30 +01:00
if (PHP_SOCKETS != "no") {
ADD_EXTENSION_DEP('uv', 'sockets', false);
} else {
ERROR('uv depends on the sockets extension');
}
}