@@ -2994,9 +2994,17 @@ function buildPhpWithSystemLibraries(config: BuildConfig, installPrefix: string)
2994
2994
]
2995
2995
2996
2996
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
+
2997
3005
try {
2998
3006
log ( 'Attempting full configure with all extensions...' )
2999
- execSync ( `./configure ${ fullConfigureArgs . join ( ' ' ) } ` , {
3007
+ execSync ( `${ configScript } ${ fullConfigureArgs . join ( ' ' ) } ` , {
3000
3008
cwd : phpSourceDir ,
3001
3009
env : buildEnv ,
3002
3010
stdio : 'inherit' ,
@@ -3021,7 +3029,7 @@ function buildPhpWithSystemLibraries(config: BuildConfig, installPrefix: string)
3021
3029
for ( const ext of extensionsToTest ) {
3022
3030
try {
3023
3031
const testArgs = [ ...baseConfigureArgs , ext . flag ]
3024
- execSync ( `./configure ${ testArgs . join ( ' ' ) } ` , {
3032
+ execSync ( `${ configScript } ${ testArgs . join ( ' ' ) } ` , {
3025
3033
cwd : phpSourceDir ,
3026
3034
env : buildEnv ,
3027
3035
stdio : 'pipe' ,
@@ -3035,7 +3043,7 @@ function buildPhpWithSystemLibraries(config: BuildConfig, installPrefix: string)
3035
3043
}
3036
3044
3037
3045
// Final configure with working extensions
3038
- execSync ( `./configure ${ workingArgs . join ( ' ' ) } ` , {
3046
+ execSync ( `${ configScript } ${ workingArgs . join ( ' ' ) } ` , {
3039
3047
cwd : phpSourceDir ,
3040
3048
env : buildEnv ,
3041
3049
stdio : 'inherit' ,
0 commit comments