Update MacOSBuilder.php

This commit is contained in:
Jerry Ma 2023-05-04 11:29:55 +08:00 committed by GitHub
parent a1f34a7df9
commit 9abf696725
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -145,6 +145,12 @@ class MacOSBuilder extends BuilderBase
if ($this->getLib('libxml2') || $this->getExt('iconv')) { if ($this->getLib('libxml2') || $this->getExt('iconv')) {
$extra_libs .= ' -liconv'; $extra_libs .= ' -liconv';
} }
if ($this->getPHPVersionID() < 80000) {
$json_74 = '--enable-json ';
} else {
$json_74 = '';
}
shell()->cd(SOURCE_PATH . '/php-src') shell()->cd(SOURCE_PATH . '/php-src')
->exec( ->exec(
@ -159,6 +165,7 @@ class MacOSBuilder extends BuilderBase
'--disable-phpdbg ' . '--disable-phpdbg ' .
'--enable-cli ' . '--enable-cli ' .
'--enable-fpm ' . '--enable-fpm ' .
$json_74 .
'--enable-micro ' . '--enable-micro ' .
($this->zts ? '--enable-zts' : '') . ' ' . ($this->zts ? '--enable-zts' : '') . ' ' .
$this->makeExtensionArgs() . ' ' . $this->makeExtensionArgs() . ' ' .