summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2007-06-08 12:32:13 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:23:12 -0500
commite0cdcf065f7bc417c00ff7ba844186c6aa5cee2c (patch)
treed0655216627bb03cfd20b39ba24fa43bd53bd1a2 /source3
parent1ea5dfae043da76183191c10bcadbd77e14d1fff (diff)
downloadsamba-e0cdcf065f7bc417c00ff7ba844186c6aa5cee2c.tar.gz
samba-e0cdcf065f7bc417c00ff7ba844186c6aa5cee2c.tar.bz2
samba-e0cdcf065f7bc417c00ff7ba844186c6aa5cee2c.zip
r23387: 1. This unifies the POSIX ACL detection code:
Linux, FreeBSD and other (which?) ACL implementations are now checked in the same block instead of in three separate blocks. This was inspired by Timur Bakeyev in Bug #4543. Since bugzilla is currently unavailable this patch is probably slightly different from Timurs original patch. This should finally fix Bug #4543. 2. The default of the --with-acl-support configure option is changed to "auto" (which is actually the same as "yes"). So configure tries to detect acl support by default. This had been discussed with Metze and others. Michael (This used to be commit 234b32c7bc18b3e450329dbee496d9f600a642ee)
Diffstat (limited to 'source3')
-rw-r--r--source3/configure.in115
1 files changed, 40 insertions, 75 deletions
diff --git a/source3/configure.in b/source3/configure.in
index 4106551389..da024f7e45 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -5368,96 +5368,67 @@ fi
AC_MSG_CHECKING(whether to support ACLs)
AC_ARG_WITH(acl-support,
-[ --with-acl-support Include ACL support (default=no)],
+[ --with-acl-support Include ACL support (default=auto)],
[ case "$withval" in
- yes)
+ yes|no)
+ with_acl_support="$withval"
+ ;;
+ esac ])
+
+if test x"$with_acl_support" = x ; then
+ with_acl_support="auto"
+fi
+
+AC_MSG_RESULT($with_acl_support)
+if test x"$with_acl_support" = x"no"; then
+ AC_MSG_RESULT(Disabling ACL support)
+ AC_DEFINE(HAVE_NO_ACLS,1,[Whether no ACLs support should be built in])
+else
+ AC_MSG_NOTICE(checking whether ACL support is available:)
case "$host_os" in
*sysv5*)
- AC_MSG_RESULT(Using UnixWare ACLs)
+ AC_MSG_NOTICE(Using UnixWare ACLs)
AC_DEFINE(HAVE_UNIXWARE_ACLS,1,[Whether UnixWare ACLs are available])
default_static_modules="$default_static_modules vfs_solarisacl"
;;
*solaris*)
- AC_MSG_RESULT(Using solaris ACLs)
+ AC_MSG_NOTICE(Using solaris ACLs)
AC_DEFINE(HAVE_SOLARIS_ACLS,1,[Whether solaris ACLs are available])
ACL_LIBS="$ACL_LIBS -lsec"
default_static_modules="$default_static_modules vfs_solarisacl"
;;
*hpux*)
- AC_MSG_RESULT(Using HPUX ACLs)
+ AC_MSG_NOTICE(Using HPUX ACLs)
AC_DEFINE(HAVE_HPUX_ACLS,1,[Whether HPUX ACLs are available])
default_static_modules="$default_static_modules vfs_hpuxacl"
;;
*irix*)
- AC_MSG_RESULT(Using IRIX ACLs)
+ AC_MSG_NOTICE(Using IRIX ACLs)
AC_DEFINE(HAVE_IRIX_ACLS,1,[Whether IRIX ACLs are available])
default_static_modules="$default_static_modules vfs_irixacl"
;;
*aix*)
- AC_MSG_RESULT(Using AIX ACLs)
+ AC_MSG_NOTICE(Using AIX ACLs)
AC_DEFINE(HAVE_AIX_ACLS,1,[Whether AIX ACLs are available])
default_static_modules="$default_static_modules vfs_aixacl"
;;
*osf*)
- AC_MSG_RESULT(Using Tru64 ACLs)
+ AC_MSG_NOTICE(Using Tru64 ACLs)
AC_DEFINE(HAVE_TRU64_ACLS,1,[Whether Tru64 ACLs are available])
ACL_LIBS="$ACL_LIBS -lpacl"
default_static_modules="$default_static_modules vfs_tru64acl"
;;
- *freebsd[[5-9]]*)
- AC_MSG_RESULT(Using FreeBSD posix ACLs)
- AC_DEFINE(HAVE_POSIX_ACLS,1,[Whether FreeBSD POSIX ACLs are available])
- AC_DEFINE(HAVE_ACL_GET_PERM_NP,1,[Whether acl_get_perm_np() is available])
- default_static_modules="$default_static_modules vfs_posixacl"
- ;;
- *linux*)
- 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_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,[
+ case "$host_os" in
+ *linux*)
+ AC_CHECK_LIB(attr,getxattr,[ACL_LIBS="$ACL_LIBS -lattr"])
+ ;;
+ esac
+ AC_CACHE_CHECK([for POSIX ACL support],samba_cv_HAVE_POSIX_ACLS,[
acl_LIBS=$LIBS
- LIBS="$LIBS -lacl"
+ LIBS="$LIBS $ACL_LIBS"
AC_TRY_LINK([
#include <sys/types.h>
#include <sys/acl.h>
@@ -5465,25 +5436,25 @@ AC_ARG_WITH(acl-support,
acl_t acl;
int entry_id;
acl_entry_t *entry_p;
- return acl_get_entry( acl, entry_id, 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_MSG_NOTICE(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"
+ LIBS="$LIBS $ACL_LIBS"
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);
+ return acl_get_perm_np(permset_d, perm);
],
[samba_cv_HAVE_ACL_GET_PERM_NP=yes],
[samba_cv_HAVE_ACL_GET_PERM_NP=no])
@@ -5492,22 +5463,16 @@ AC_ARG_WITH(acl-support,
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
+ default_static_modules="$default_static_modules vfs_posixacl"
+ else
+ AC_MSG_NOTICE(ACL support is not avaliable)
+ AC_DEFINE(HAVE_NO_ACLS,1,[Whether no ACLs support is available])
fi
- ;;
+ ;;
esac
- ;;
- *)
- AC_MSG_RESULT(no)
- AC_DEFINE(HAVE_NO_ACLS,1,[Whether no ACLs support is available])
- ;;
- esac ],
- AC_DEFINE(HAVE_NO_ACLS,1,[Whether no ACLs support should be built in])
- AC_MSG_RESULT(no)
-)
+fi # with_acl_support
+
-if test x"$samba_cv_HAVE_POSIX_ACLS" = x"yes"; then
- default_static_modules="$default_static_modules vfs_posixacl"
-fi
#################################################
# check for AIO support