Skip to content

Commit d249391

Browse files
committed
don't add configure command to phpinfo when -release is set
1 parent 0a24a6a commit d249391

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/SPC/builder/LibraryBase.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,19 @@ public function tryInstall(string $install_file, bool $force_install = false): i
214214
*/
215215
public function tryBuild(bool $force_build = false): int
216216
{
217+
if (str_contains((string) getenv('SPC_CMD_VAR_PHP_MAKE_EXTRA_LDFLAGS'), '-release')) {
218+
FileSystem::replaceFileLineContainsString(
219+
SOURCE_PATH . '/php-src/ext/standard/info.c',
220+
'#ifdef CONFIGURE_COMMAND',
221+
'#ifdef NO_CONFIGURE_COMMAND',
222+
);
223+
} else {
224+
FileSystem::replaceFileLineContainsString(
225+
SOURCE_PATH . '/php-src/ext/standard/info.c',
226+
'#ifdef NO_CONFIGURE_COMMAND',
227+
'#ifdef CONFIGURE_COMMAND',
228+
);
229+
}
217230
if (file_exists($this->source_dir . '/.spc.patched')) {
218231
$this->patched = true;
219232
}

0 commit comments

Comments
 (0)