kjdev / php-ext-zstd

Zstd Extension for PHP
MIT License
201 stars 27 forks source link

Fix in-tree build on indows #52

Closed dixyes closed 1 year ago

dixyes commented 1 year ago

when do an in-tree build on win32, it will fail on configure:

 D:\a\lwmbs\lwmbs\build\src\php-src\configure.js(6896, 3) Microsoft JScript runtime error: 'PHP_DIR' is undefined

PHP_DIR value is not usable during in-tree configure

dixyes commented 1 year ago

however, this patch is fragile, if configure.js decides to put apcu config.w32 snippet after zstd, this may not work, so it's better to do workaround in minit (maybe dlsym/GetProcAddress or using some PHP stub?)

dixyes commented 1 year ago

or the most simple way: let user use a configure arg like --enable-zstd-apcu-compatible[=/path/to/apcu] to decide whether enable this.