svn commit: samba r23387 - in branches/SAMBA_3_0/source: .
obnox at samba.org
obnox at samba.org
Fri Jun 8 12:32:14 GMT 2007
Author: obnox
Date: 2007-06-08 12:32:13 +0000 (Fri, 08 Jun 2007)
New Revision: 23387
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23387
Log:
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
Modified:
branches/SAMBA_3_0/source/configure.in
Changeset:
Modified: branches/SAMBA_3_0/source/configure.in
===================================================================
--- branches/SAMBA_3_0/source/configure.in 2007-06-08 10:56:46 UTC (rev 23386)
+++ branches/SAMBA_3_0/source/configure.in 2007-06-08 12:32:13 UTC (rev 23387)
@@ -5368,55 +5368,67 @@
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,[
+ *)
+ AC_CHECK_LIB(acl,acl_get_file,[ACL_LIBS="$ACL_LIBS -lacl"])
+ 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>
@@ -5431,11 +5443,11 @@
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>
@@ -5451,64 +5463,17 @@
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
- ;;
- *)
- 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
- ;;
+ ;;
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
More information about the samba-cvs
mailing list