@@ -16,26 +16,27 @@ protected function build(): void
1616 $ libs = array_map (fn ($ x ) => $ x ->getName (), $ this ->getDependencies (true ));
1717 $ spc = new SPCConfigUtil ($ this ->builder , ['no_php ' => true , 'libs_only_deps ' => true ]);
1818 $ config = $ spc ->config (libraries: $ libs , include_suggest_lib: $ this ->builder ->getOption ('with-suggested-libs ' , false ));
19- $ make = UnixAutoconfExecutor::create ($ this )
20- ->appendEnv ([
21- 'CFLAGS ' => '-fcommon ' ,
22- 'LIBS ' => $ config ['libs ' ],
23- ]);
19+ $ extraEnv = [
20+ 'CFLAGS ' => '-fcommon ' ,
21+ 'LIBS ' => $ config ['libs ' ],
22+ ];
2423 if (getenv ('SPC_LD_LIBRARY_PATH ' ) && getenv ('SPC_LIBRARY_PATH ' )) {
25- $ make -> appendEnv ( [
24+ $ extraEnv = [... $ extraEnv , ... [
2625 'LD_LIBRARY_PATH ' => getenv ('SPC_LD_LIBRARY_PATH ' ),
2726 'LIBRARY_PATH ' => getenv ('SPC_LIBRARY_PATH ' ),
28- ]) ;
27+ ]] ;
2928 }
3029 $ args = [
3130 '--disable-nls ' ,
3231 '--disable-rpath ' ,
3332 '--without-system-verto ' ,
3433 ];
3534 if (PHP_OS_FAMILY === 'Darwin ' ) {
35+ $ extraEnv ['LDFLAGS ' ] = '-framework Kerberos ' ;
3636 $ args [] = 'ac_cv_func_secure_getenv=no ' ;
3737 }
38- $ make
38+ UnixAutoconfExecutor::create ($ this )
39+ ->appendEnv ($ extraEnv )
3940 ->optionalLib ('ldap ' , '--with-ldap ' , '--without-ldap ' )
4041 ->optionalLib ('libedit ' , '--with-libedit ' , '--without-libedit ' )
4142 ->configure (...$ args )
0 commit comments