mirror of
https://github.com/samba-team/samba.git
synced 2024-12-29 11:21:54 +03:00
r19239: make the acl configure check more readable...
metze
This commit is contained in:
parent
e00a83a0b6
commit
0882f0c9d6
@ -4976,54 +4976,84 @@ AC_ARG_WITH(acl-support,
|
||||
AC_CHECK_LIB(attr,getxattr,[ACL_LIBS="$ACL_LIBS -lattr"])
|
||||
AC_CHECK_LIB(acl,acl_get_file,[ACL_LIBS="$ACL_LIBS -lacl"])
|
||||
AC_CACHE_CHECK([for ACL support],samba_cv_HAVE_POSIX_ACLS,[
|
||||
acl_LIBS=$LIBS
|
||||
LIBS="$LIBS -lacl"
|
||||
AC_TRY_LINK([#include <sys/types.h>
|
||||
#include <sys/acl.h>],
|
||||
[ acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p);],
|
||||
samba_cv_HAVE_POSIX_ACLS=yes,samba_cv_HAVE_POSIX_ACLS=no)
|
||||
LIBS=$acl_LIBS])
|
||||
if test x"$samba_cv_HAVE_POSIX_ACLS" = x"yes"; then
|
||||
AC_MSG_RESULT(Using posix ACLs)
|
||||
AC_DEFINE(HAVE_POSIX_ACLS,1,[Whether POSIX ACLs are available])
|
||||
AC_CACHE_CHECK([for acl_get_perm_np],samba_cv_HAVE_ACL_GET_PERM_NP,[
|
||||
acl_LIBS=$LIBS
|
||||
LIBS="$LIBS -lacl"
|
||||
AC_TRY_LINK([
|
||||
#include <sys/types.h>
|
||||
#include <sys/acl.h>
|
||||
],[
|
||||
acl_t acl;
|
||||
int entry_id;
|
||||
acl_entry_t *entry_p;
|
||||
return acl_get_entry(acl, entry_id, entry_p);
|
||||
],
|
||||
[samba_cv_HAVE_POSIX_ACLS=yes],
|
||||
[samba_cv_HAVE_POSIX_ACLS=no])
|
||||
LIBS=$acl_LIBS
|
||||
])
|
||||
if test x"$samba_cv_HAVE_POSIX_ACLS" = x"yes"; then
|
||||
AC_MSG_RESULT(Using posix ACLs)
|
||||
AC_DEFINE(HAVE_POSIX_ACLS,1,[Whether POSIX ACLs are available])
|
||||
AC_CACHE_CHECK([for acl_get_perm_np],samba_cv_HAVE_ACL_GET_PERM_NP,[
|
||||
acl_LIBS=$LIBS
|
||||
LIBS="$LIBS -lacl"
|
||||
AC_TRY_LINK([#include <sys/types.h>
|
||||
#include <sys/acl.h>],
|
||||
[ acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm);],
|
||||
samba_cv_HAVE_ACL_GET_PERM_NP=yes,samba_cv_HAVE_ACL_GET_PERM_NP=no)
|
||||
LIBS=$acl_LIBS])
|
||||
if test x"$samba_cv_HAVE_ACL_GET_PERM_NP" = x"yes"; then
|
||||
AC_DEFINE(HAVE_ACL_GET_PERM_NP,1,[Whether acl_get_perm_np() is available])
|
||||
fi
|
||||
AC_TRY_LINK([
|
||||
#include <sys/types.h>
|
||||
#include <sys/acl.h>
|
||||
],[
|
||||
acl_permset_t permset_d;
|
||||
acl_perm_t perm;
|
||||
return acl_get_perm_np(permset_d, perm);
|
||||
],
|
||||
[samba_cv_HAVE_ACL_GET_PERM_NP=yes],
|
||||
[samba_cv_HAVE_ACL_GET_PERM_NP=no])
|
||||
LIBS=$acl_LIBS
|
||||
])
|
||||
if test x"$samba_cv_HAVE_ACL_GET_PERM_NP" = x"yes"; then
|
||||
AC_DEFINE(HAVE_ACL_GET_PERM_NP,1,[Whether acl_get_perm_np() is available])
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
AC_CHECK_LIB(acl,acl_get_file,[ACL_LIBS="$ACL_LIBS -lacl"])
|
||||
AC_CACHE_CHECK([for ACL support],samba_cv_HAVE_POSIX_ACLS,[
|
||||
acl_LIBS=$LIBS
|
||||
LIBS="$LIBS -lacl"
|
||||
AC_TRY_LINK([#include <sys/types.h>
|
||||
#include <sys/acl.h>],
|
||||
[ acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p);],
|
||||
samba_cv_HAVE_POSIX_ACLS=yes,samba_cv_HAVE_POSIX_ACLS=no)
|
||||
LIBS=$acl_LIBS])
|
||||
if test x"$samba_cv_HAVE_POSIX_ACLS" = x"yes"; then
|
||||
AC_MSG_RESULT(Using posix ACLs)
|
||||
AC_DEFINE(HAVE_POSIX_ACLS,1,[Whether POSIX ACLs are available])
|
||||
AC_CACHE_CHECK([for acl_get_perm_np],samba_cv_HAVE_ACL_GET_PERM_NP,[
|
||||
acl_LIBS=$LIBS
|
||||
LIBS="$LIBS -lacl"
|
||||
AC_TRY_LINK([
|
||||
#include <sys/types.h>
|
||||
#include <sys/acl.h>
|
||||
],[
|
||||
acl_t acl;
|
||||
int entry_id;
|
||||
acl_entry_t *entry_p;
|
||||
return acl_get_entry( acl, entry_id, entry_p);
|
||||
],
|
||||
[samba_cv_HAVE_POSIX_ACLS=yes],
|
||||
[samba_cv_HAVE_POSIX_ACLS=no])
|
||||
LIBS=$acl_LIBS
|
||||
])
|
||||
if test x"$samba_cv_HAVE_POSIX_ACLS" = x"yes"; then
|
||||
AC_MSG_RESULT(Using posix ACLs)
|
||||
AC_DEFINE(HAVE_POSIX_ACLS,1,[Whether POSIX ACLs are available])
|
||||
AC_CACHE_CHECK([for acl_get_perm_np],samba_cv_HAVE_ACL_GET_PERM_NP,[
|
||||
acl_LIBS=$LIBS
|
||||
LIBS="$LIBS -lacl"
|
||||
AC_TRY_LINK([#include <sys/types.h>
|
||||
#include <sys/acl.h>],
|
||||
[ acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm);],
|
||||
samba_cv_HAVE_ACL_GET_PERM_NP=yes,samba_cv_HAVE_ACL_GET_PERM_NP=no)
|
||||
LIBS=$acl_LIBS])
|
||||
if test x"$samba_cv_HAVE_ACL_GET_PERM_NP" = x"yes"; then
|
||||
AC_DEFINE(HAVE_ACL_GET_PERM_NP,1,[Whether acl_get_perm_np() is available])
|
||||
fi
|
||||
AC_TRY_LINK([
|
||||
#include <sys/types.h>
|
||||
#include <sys/acl.h>
|
||||
],[
|
||||
acl_permset_t permset_d;
|
||||
acl_perm_t perm;
|
||||
return acl_get_perm_np( permset_d, perm);
|
||||
],
|
||||
[samba_cv_HAVE_ACL_GET_PERM_NP=yes],
|
||||
[samba_cv_HAVE_ACL_GET_PERM_NP=no])
|
||||
LIBS=$acl_LIBS
|
||||
])
|
||||
if test x"$samba_cv_HAVE_ACL_GET_PERM_NP" = x"yes"; then
|
||||
AC_DEFINE(HAVE_ACL_GET_PERM_NP,1,[Whether acl_get_perm_np() is available])
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
Loading…
Reference in New Issue
Block a user