summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2018-03-02 16:19:34 +0100
committerJakub Zelenka <bukka@php.net>2018-04-13 19:48:13 +0100
commit4ea7f3467d0f0023d565c88323bdae587144d1f8 (patch)
treedb79667ee84993db19f5756c3f5c35ac552e3950
parentbb79e5764b2dd0671016a53ff567c8303dd184f1 (diff)
downloadphp-git-4ea7f3467d0f0023d565c88323bdae587144d1f8.tar.gz
Support using acl_* functions on *BSD
The *BSD systems have ACL routines built-in in libc rather than in separate libacl. Update the configure check to detect that and enable ACL support without adding 'acl' library.
-rw-r--r--sapi/fpm/config.m411
1 files changed, 8 insertions, 3 deletions
diff --git a/sapi/fpm/config.m4 b/sapi/fpm/config.m4
index e6a1a49857..8a9c60a4f9 100644
--- a/sapi/fpm/config.m4
+++ b/sapi/fpm/config.m4
@@ -630,11 +630,16 @@ if test "$PHP_FPM" != "no"; then
if test "$PHP_FPM_ACL" != "no" ; then
AC_CHECK_HEADERS([sys/acl.h])
- AC_CHECK_LIB(acl, acl_free, [
- PHP_ADD_LIBRARY(acl)
+ dnl *BSD has acl_* built into libc
+ AC_CHECK_FUNC(acl_free, [
AC_DEFINE(HAVE_FPM_ACL, 1, [ POSIX Access Control List ])
],[
- AC_MSG_ERROR(libacl required not found)
+ AC_CHECK_LIB(acl, acl_free, [
+ PHP_ADD_LIBRARY(acl)
+ AC_DEFINE(HAVE_FPM_ACL, 1, [ POSIX Access Control List ])
+ ],[
+ AC_MSG_ERROR(libacl required not found)
+ ])
])
fi