1
1
// vim:ft=javascript
2
2
3
3
ARG_ENABLE ( 'async' , 'Enable True Async' , 'no' ) ;
4
- ARG_WITH ( 'async_libuv' , 'Build True Async with libuv support' , 'yes' ) ;
5
4
6
5
if ( PHP_ASYNC == "yes" ) {
7
6
@@ -10,7 +9,7 @@ if (PHP_ASYNC == "yes") {
10
9
}
11
10
12
11
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." ) ;
14
13
}
15
14
16
15
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") {
27
26
PHP_INSTALL_HEADERS ( "ext/async" , "iterator.h" ) ;
28
27
PHP_INSTALL_HEADERS ( "ext/async" , "async_API.h" ) ;
29
28
PHP_INSTALL_HEADERS ( "ext/async" , "context.h" ) ;
30
- }
31
29
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" ) ;
35
38
} 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\\'" ) ;
50
43
}
51
44
}
0 commit comments