]> granicus.if.org Git - php/commitdiff
Support using acl_* functions on *BSD
authorMichał Górny <mgorny@gentoo.org>
Fri, 2 Mar 2018 15:19:34 +0000 (16:19 +0100)
committerJakub Zelenka <bukka@php.net>
Fri, 13 Apr 2018 18:48:13 +0000 (19:48 +0100)
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.

sapi/fpm/config.m4

index e6a1a4985734a891f912fdd5d983e7e2cb67d06d..8a9c60a4f9705481166d199afc577ec428f4fe51 100644 (file)
@@ -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