Skip to content

Commit 60dc5ee

Browse files
committed
chore: wip
1 parent a10decf commit 60dc5ee

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

scripts/build-php.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2994,9 +2994,17 @@ function buildPhpWithSystemLibraries(config: BuildConfig, installPrefix: string)
29942994
]
29952995

29962996
let configureSuccess = false
2997+
2998+
// Determine which configure script to use (wrapper for macOS)
2999+
let configScript = './configure'
3000+
if (config.platform === 'darwin' && existsSync(join(phpSourceDir, 'configure-wrapper.sh'))) {
3001+
configScript = './configure-wrapper.sh'
3002+
log('🔧 Using configure wrapper for macOS compatibility')
3003+
}
3004+
29973005
try {
29983006
log('Attempting full configure with all extensions...')
2999-
execSync(`./configure ${fullConfigureArgs.join(' ')}`, {
3007+
execSync(`${configScript} ${fullConfigureArgs.join(' ')}`, {
30003008
cwd: phpSourceDir,
30013009
env: buildEnv,
30023010
stdio: 'inherit',
@@ -3021,7 +3029,7 @@ function buildPhpWithSystemLibraries(config: BuildConfig, installPrefix: string)
30213029
for (const ext of extensionsToTest) {
30223030
try {
30233031
const testArgs = [...baseConfigureArgs, ext.flag]
3024-
execSync(`./configure ${testArgs.join(' ')}`, {
3032+
execSync(`${configScript} ${testArgs.join(' ')}`, {
30253033
cwd: phpSourceDir,
30263034
env: buildEnv,
30273035
stdio: 'pipe',
@@ -3035,7 +3043,7 @@ function buildPhpWithSystemLibraries(config: BuildConfig, installPrefix: string)
30353043
}
30363044

30373045
// Final configure with working extensions
3038-
execSync(`./configure ${workingArgs.join(' ')}`, {
3046+
execSync(`${configScript} ${workingArgs.join(' ')}`, {
30393047
cwd: phpSourceDir,
30403048
env: buildEnv,
30413049
stdio: 'inherit',

0 commit comments

Comments
 (0)