Skip to content

Commit 37402aa

Browse files
committed
* remove libuv option
1 parent 976ae98 commit 37402aa

File tree

2 files changed

+13
-29
lines changed

2 files changed

+13
-29
lines changed

config.m4

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@ PHP_ARG_ENABLE([async],
33
[AS_HELP_STRING([--enable-async],
44
[Enable True Async])])
55

6-
PHP_ARG_WITH([async_libuv],
7-
[for True Async LibUV support],
8-
[AS_HELP_STRING([--with-async-libuv],
9-
[Build True Async with LibUv support])], yes)
106

117
if test "$PHP_ASYNC" = "yes"; then
128
dnl Define a symbol for C code.
@@ -24,10 +20,6 @@ if test "$PHP_ASYNC" = "yes"; then
2420
PHP_INSTALL_HEADERS([ext/async],
2521
[php_async.h coroutine.h scope.h scheduler.h exceptions.h iterator.h async_API.h context.h])
2622

27-
if test "$PHP_ASYNC_LIBUV" = "yes"; then
28-
if test "$PHP_ASYNC" != "yes"; then
29-
AC_MSG_ERROR([libuv requires True Async API. Use --enable-async.])
30-
fi
3123

3224
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
3325

@@ -85,5 +77,4 @@ if test "$PHP_ASYNC" = "yes"; then
8577
dnl Add libuv-specific reactor code.
8678
PHP_ADD_SOURCES([ext/async], [libuv_reactor.c])
8779
PHP_INSTALL_HEADERS([ext/async], [libuv_reactor.h])
88-
fi
8980
fi

config.w32

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// vim:ft=javascript
22

33
ARG_ENABLE('async', 'Enable True Async', 'no');
4-
ARG_WITH('async_libuv', 'Build True Async with libuv support', 'yes');
54

65
if (PHP_ASYNC == "yes") {
76

@@ -10,7 +9,7 @@ if (PHP_ASYNC == "yes") {
109
}
1110

1211
if (!PHP_ASYNC_API || PHP_ASYNC_API != "yes") {
13-
ERROR("PHP TRUE ASYNC API is required. Please configure PHP with --enable-experimental-async-api.");
12+
ERROR("PHP TRUE ASYNC API is required. Please configure PHP with --with-async-api.");
1413
}
1514

1615
EXTENSION("async", "async.c coroutine.c scope.c scheduler.c exceptions.c iterator.c async_API.c");
@@ -27,25 +26,19 @@ if (PHP_ASYNC == "yes") {
2726
PHP_INSTALL_HEADERS("ext/async", "iterator.h");
2827
PHP_INSTALL_HEADERS("ext/async", "async_API.h");
2928
PHP_INSTALL_HEADERS("ext/async", "context.h");
30-
}
3129

32-
if (PHP_ASYNC_LIBUV == "yes") {
33-
if (PHP_ASYNC != "yes") {
34-
ERROR("libuv requires True Async API to be enabled. Use --enable-async");
30+
if (CHECK_HEADER_ADD_INCLUDE("libuv/uv.h", "CFLAGS_UV", PHP_PHP_BUILD + "\\include")
31+
&& CHECK_LIB("libuv.lib", "libuv")) {
32+
33+
PHP_INSTALL_HEADERS("ext/async", "libuv_reactor.h");
34+
35+
ADD_SOURCES("ext/async", "libuv_reactor.c");
36+
ADD_FLAG("CFLAGS", "/D PHP_ASYNC_LIBUV");
37+
ADD_FLAG("LIBS", "libuv.lib Dbghelp.lib Userenv.lib");
3538
} else {
36-
if (CHECK_HEADER_ADD_INCLUDE("libuv/uv.h", "CFLAGS_UV", PHP_PHP_BUILD + "\\include")
37-
&& CHECK_LIB("libuv.lib", "libuv")) {
38-
39-
PHP_INSTALL_HEADERS("ext/async", "libuv_reactor.h");
40-
41-
ADD_SOURCES("ext/async", "libuv_reactor.c");
42-
ADD_FLAG("CFLAGS", "/D PHP_ASYNC_LIBUV");
43-
ADD_FLAG("LIBS", "libuv.lib Dbghelp.lib Userenv.lib");
44-
} else {
45-
ERROR("Libuv components are not found. The search was performed in the directory: '" + PHP_PHP_BUILD +
46-
"'.\nTo compile PHP TRUE ASYNC with LibUV:\n" +
47-
"1. Copy files from 'libuv\\include' to '" + PHP_PHP_BUILD + "\\include\\libuv\\'\n" +
48-
"2. Build libuv.lib and copy it to '" + PHP_PHP_BUILD + "\\lib\\'");
49-
}
39+
ERROR("Libuv components are not found. The search was performed in the directory: '" + PHP_PHP_BUILD +
40+
"'.\nTo compile PHP TRUE ASYNC with LibUV:\n" +
41+
"1. Copy files from 'libuv\\include' to '" + PHP_PHP_BUILD + "\\include\\libuv\\'\n" +
42+
"2. Build libuv.lib and copy it to '" + PHP_PHP_BUILD + "\\lib\\'");
5043
}
5144
}

0 commit comments

Comments
 (0)