diff options
author | Stefan Metzmacher <metze@samba.org> | 2006-10-11 10:57:33 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:15:24 -0500 |
commit | 960894349ffac47fabb33436bcefa979a01108fb (patch) | |
tree | f4c3d8ce80817a29009e73caac624c3663f6640d /source3 | |
parent | 6c1eaffd2e16d6a7041bb462c1d9b90177219ec0 (diff) | |
download | samba-960894349ffac47fabb33436bcefa979a01108fb.tar.gz samba-960894349ffac47fabb33436bcefa979a01108fb.tar.bz2 samba-960894349ffac47fabb33436bcefa979a01108fb.zip |
r19239: make the acl configure check more readable...
metze
(This used to be commit 0882f0c9d671cd466668f65433ee33a71f127a95)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/configure.in | 106 |
1 files changed, 68 insertions, 38 deletions
diff --git a/source3/configure.in b/source3/configure.in index d7c7ba7bed..86228a3e6c 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -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 ;; |