@@ -430,7 +430,8 @@ if test "$PHP_FPM" != "no"; then
430
430
[ no] ,
431
431
[ no] )
432
432
433
- PHP_ARG_WITH([ fpm-acl] ,,
433
+ PHP_ARG_WITH([ fpm-acl] ,
434
+ [ whether to use Access Control Lists (ACL) in PHP-FPM] ,
434
435
[ AS_HELP_STRING ( [ --with-fpm-acl] ,
435
436
[ Use POSIX Access Control Lists] ) ] ,
436
437
[ no] ,
@@ -467,14 +468,15 @@ if test "$PHP_FPM" != "no"; then
467
468
php_fpm_systemd=simple
468
469
fi
469
470
470
- if test "$ PHP_FPM_ACL" != "no" ; then
471
+ AS_VAR_IF ( [ PHP_FPM_ACL] , [ no ] ,, [
471
472
AC_CHECK_HEADERS ( [ sys/acl.h] )
472
473
473
474
dnl *BSD has acl_* built into libc, macOS doesn't have user/group support.
474
- LIBS_save="$LIBS"
475
- AC_SEARCH_LIBS ( [ acl_free] , [ acl] , [
476
- AC_MSG_CHECKING ( [ for acl user/group permissions support] )
477
- AC_LINK_IFELSE ( [ AC_LANG_PROGRAM ( [ #include <sys/acl.h>] , [
475
+ LIBS_save=$LIBS
476
+ AC_SEARCH_LIBS ( [ acl_free] , [ acl] ,
477
+ [ AC_CACHE_CHECK ( [ for ACL user/group permissions support] ,
478
+ [ php_cv_lib_acl_user_group] ,
479
+ [ AC_LINK_IFELSE ( [ AC_LANG_PROGRAM ( [ #include <sys/acl.h>] , [
478
480
acl_t acl;
479
481
acl_entry_t user, group;
480
482
acl = acl_init(1);
@@ -483,15 +485,18 @@ if test "$PHP_FPM" != "no"; then
483
485
acl_create_entry(&acl, &group);
484
486
acl_set_tag_type(user, ACL_GROUP);
485
487
acl_free(acl);
486
- ] ) ] , [
487
- AC_MSG_RESULT ( [ yes] )
488
- AC_DEFINE ( [ HAVE_FPM_ACL] , [ 1] , [ Whether FPM has acl support] )
489
- ] , [
490
- AC_MSG_RESULT ( [ no] )
491
- LIBS="$LIBS_save"
488
+ ] ) ] ,
489
+ [ php_cv_lib_acl_user_group=yes] ,
490
+ [ php_cv_lib_acl_user_group=no] ) ] )
491
+ AS_VAR_IF ( [ php_cv_lib_acl_user_group] , [ yes] , [
492
+ AC_DEFINE ( [ HAVE_FPM_ACL] , [ 1] ,
493
+ [ Define to 1 if PHP-FPM has ACL support.] )
494
+ AS_VAR_IF ( [ ac_cv_search_acl_free] , [ "none required"] ,,
495
+ [ AS_VAR_APPEND ( [ FPM_EXTRA_LIBS] , [ " $ac_cv_search_acl_free"] ) ] )
492
496
] )
493
497
] )
494
- fi
498
+ LIBS=$LIBS_save
499
+ ] )
495
500
496
501
if test "x$PHP_FPM_APPARMOR" != "xno" ; then
497
502
PKG_CHECK_MODULES([ APPARMOR] , [ libapparmor] , [
@@ -611,4 +616,5 @@ if test "$PHP_FPM" != "no"; then
611
616
612
617
PHP_SUBST([ SAPI_FPM_PATH] )
613
618
PHP_SUBST([ BUILD_FPM] )
619
+ PHP_SUBST([ FPM_EXTRA_LIBS] )
614
620
fi
0 commit comments