11// vim:ft=javascript
22
33ARG_ENABLE ( 'async' , 'Enable True Async' , 'no' ) ;
4- ARG_WITH ( 'async_libuv' , 'Build True Async with libuv support' , 'yes' ) ;
54
65if ( 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