Skip to content

Commit e1180a0

Browse files
committed
* fix config.m4
+ add to README.md unix build
1 parent 97d1edf commit e1180a0

File tree

2 files changed

+31
-11
lines changed

2 files changed

+31
-11
lines changed

README.md

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,30 +34,50 @@ PHP TRUE ASYNC is supported for PHP 8.5.0 and later.
3434

3535
### Unix / macOS
3636

37-
1. **Clone the repository:**
37+
1. **Clone the PHP repository:**
38+
39+
for example, basic directory name is `php-src`:
3840

3941
```
40-
git clone https://github.com/true-async/php-src -b true-async-api
41-
cd php-src/ext/async
42+
git clone https://github.com/true-async/php-src -b true-async-api ./php-src
4243
```
4344

44-
2. **Prepare the build environment:**
45+
2. **Clone the `True Async` extension repository:**
4546

46-
```
47-
phpize
48-
```
47+
to the `ext` directory of your PHP source:
48+
49+
```
50+
git clone https://github.com/true-async/php-async ./php-src/ext/async
51+
```
4952
50-
3. **Install LibUV:**:
53+
3. **Install PHP development tools:**
54+
55+
Make sure you have the necessary development tools installed. On Debian/Ubuntu, you can run:
56+
57+
```
58+
sudo apt-get install php-dev build-essential autoconf libtool pkg-config
59+
```
60+
61+
For macOS, you can use Homebrew:
62+
63+
```
64+
brew install autoconf automake libtool pkg-config
65+
```
66+
67+
4. **Install LibUV:**:
5168
5269
Please see the [LibUV installation guide](https://github.com/libuv/libuv)
5370
54-
4. **Configure and build:**
71+
5. **Configure and build:**
5572
5673
```
74+
./buildconf
5775
./configure --enable-experimental-async-api --enable-async
5876
make && sudo make install
5977
```
6078
79+
We can use `--enable-debug` to enable debug mode, which is useful for development.
80+
6181
---
6282
6383
### Windows
@@ -79,7 +99,7 @@ Please see the [LibUV installation guide](https://github.com/libuv/libuv)
7999
4. **Configure and build the extension with PHP:**
80100
81101
```
82-
cd \path\to\php-src\ext\async
102+
cd \path\to\php-src
83103
buildconf
84104
configure --enable-experimental-async-api --enable-async
85105
nmake

config.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ PHP_ARG_WITH([async_libuv],
1010

1111
if test "$PHP_ASYNC" = "yes"; then
1212

13-
if test "$PHP_ASYNC_API" != "yes"; then
13+
if test "$PHP_ASYNC_API" != "yes" && test "$PHP_EXPERIMENTAL_ASYNC_API" != "yes"; then
1414
AC_MSG_ERROR([PHP TRUE ASYNC API is required. Please configure PHP with --enable-experimental-async-api])
1515
fi
1616

0 commit comments

Comments
 (0)