mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-07 08:45:40 +08:00
need static libs because of lib.json
This commit is contained in:
@@ -63,7 +63,7 @@ class PkgConfigUtil
|
||||
{
|
||||
$static = getenv('SPC_STATIC_LIBS') ? '--static' : '';
|
||||
// get other things
|
||||
$result = self::execWithResult("pkg-config $static --cflags-only-other {$pkg_config_str}");
|
||||
$result = self::execWithResult("pkg-config {$static} --cflags-only-other {$pkg_config_str}");
|
||||
return trim($result);
|
||||
}
|
||||
|
||||
@@ -80,11 +80,11 @@ class PkgConfigUtil
|
||||
{
|
||||
// Use this instead of shell() to avoid unnecessary outputs
|
||||
$static = getenv('SPC_STATIC_LIBS') ? '--static' : '';
|
||||
$result = self::execWithResult("pkg-config $static --libs-only-l {$pkg_config_str}");
|
||||
$result = self::execWithResult("pkg-config {$static} --libs-only-l {$pkg_config_str}");
|
||||
$libs = explode(' ', trim($result));
|
||||
|
||||
// get other things
|
||||
$result = self::execWithResult("pkg-config $static --libs-only-other {$pkg_config_str}");
|
||||
$result = self::execWithResult("pkg-config {$static} --libs-only-other {$pkg_config_str}");
|
||||
// convert libxxx.a to -L{path} -lxxx
|
||||
$exp = explode(' ', trim($result));
|
||||
foreach ($exp as $item) {
|
||||
|
||||
@@ -134,7 +134,7 @@ class UnixAutoconfExecutor extends Executor
|
||||
{
|
||||
return [
|
||||
getenv('SPC_STATIC_LIBS') ? '--disable-shared' : '--enable-shared',
|
||||
getenv('SPC_STATIC_LIBS') ? '--enable-static' : '--disable-static',
|
||||
getenv('SPC_STATIC_LIBS') ? '--enable-static' : '--enable-static', // TODO: not always static
|
||||
"--prefix={$this->library->getBuildRootPath()}",
|
||||
'--with-pic',
|
||||
'--enable-pic',
|
||||
|
||||
Reference in New Issue
Block a user