On Monday 07 January 2008, Jim Meyering wrote: > Mike Frysinger <[EMAIL PROTECTED]> wrote: > > On Saturday 29 December 2007, Mike Frysinger wrote: > >> On Wednesday 25 July 2007, Mike Frysinger wrote: > >> > posted this to the coreutils a list sometime ago ... idea is to be > >> > able to disable automatic ACL detection via --disable-acl since this > >> > can often times take the form of an external library rather than part > >> > of the system libc. > >> > > >> > patch was originally written/tested against coreutils-6.9 and ive > >> > forward ported it to current gnulib git. > >> > >> ping again ? > > > > i noticed that more packages are integrating this ... it had just been a > > problem for coreutils, but as the current acl.m4 starts to make its > > rounds into more projects, it's going to be much more of a pain ... > > > > is there something wrong with the patch posted ? > > Sorry about the delay. > It's probably fine, but I can't find the patch in my archives > of the list, and the one I did find (from 2007-07-25) doesn't apply. > > I think this isn't the first time I've looked for the original. > When you ping about something like that, it's good to > include at least a pointer to the patch in question. > > So, please resend a patch that applies to the latest > and I'll handle it.
sorry about that ... patch against current git attached i think i got the indenting correct, but i dont use GNU style myself -mike --- 2008-01-08 Mike Frysinger <[EMAIL PROTECTED]> * m4/acl.m4 (gl_FUNC_ACL): Wrap all ACL logic in a call to AC_ARG_ENABLE(acl). diff --git a/m4/acl.m4 b/m4/acl.m4 index 6a1951d..2e3a0c5 100644 --- a/m4/acl.m4 +++ b/m4/acl.m4 @@ -12,42 +12,53 @@ AC_DEFUN([gl_FUNC_ACL], AC_LIBOBJ([acl]) AC_LIBOBJ([file-has-acl]) - dnl Prerequisites of lib/acl.c. + AC_ARG_ENABLE(acl, + AC_HELP_STRING([--disable-acl], [do not support ACLs]), + , [enable_acl=auto]) + LIB_ACL= - use_acl=0 - AC_CHECK_HEADERS(sys/acl.h) - if test $ac_cv_header_sys_acl_h = yes; then - ac_save_LIBS=$LIBS - AC_CHECK_FUNCS([acl]) - use_acl=1 - AC_SEARCH_LIBS([acl_trivial], [sec], - [test "$ac_cv_search_acl_trivial" = "none required" || - LIB_ACL=$ac_cv_search_acl_trivial - AC_CHECK_FUNCS([acl_trivial])], - [AC_CHECK_FUNCS([acl_trivial]) - if test $ac_cv_func_acl_trivial != yes; then - AC_SEARCH_LIBS([acl_get_file], [acl], - [test "$ac_cv_search_acl_get_file" = "none required" || - LIB_ACL=$ac_cv_search_acl_get_file - AC_CHECK_FUNCS( - [acl_get_file acl_get_fd acl_set_file acl_set_fd \ - acl_free acl_from_mode acl_from_text \ - acl_delete_def_file acl_extended_file]) - if test $ac_cv_func_acl_get_file = yes; then - # If the acl_get_file bug is detected, disable all ACL support. - gl_ACL_GET_FILE( , [use_acl=0]) - fi - if test $use_acl = 1; then - AC_CHECK_HEADERS([acl/libacl.h]) - if test $ac_cv_func_acl_get_file = yes && - test $ac_cv_func_acl_free = yes; then - AC_REPLACE_FUNCS([acl_entries]) + if test "x$use_acl" != "xno"; then + dnl Prerequisites of lib/acl.c. + use_acl=0 + AC_CHECK_HEADERS(sys/acl.h) + if test $ac_cv_header_sys_acl_h = yes; then + ac_save_LIBS=$LIBS + AC_CHECK_FUNCS([acl]) + use_acl=1 + AC_SEARCH_LIBS([acl_trivial], [sec], + [test "$ac_cv_search_acl_trivial" = "none required" || + LIB_ACL=$ac_cv_search_acl_trivial + AC_CHECK_FUNCS([acl_trivial])], + [AC_CHECK_FUNCS([acl_trivial]) + if test $ac_cv_func_acl_trivial != yes; then + AC_SEARCH_LIBS([acl_get_file], [acl], + [test "$ac_cv_search_acl_get_file" = "none required" || + LIB_ACL=$ac_cv_search_acl_get_file + AC_CHECK_FUNCS( + [acl_get_file acl_get_fd acl_set_file acl_set_fd \ + acl_free acl_from_mode acl_from_text \ + acl_delete_def_file acl_extended_file]) + if test $ac_cv_func_acl_get_file = yes; then + # If the acl_get_file bug is detected, disable all ACL support. + gl_ACL_GET_FILE( , [use_acl=0]) fi - else - LIB_ACL= - fi]) - fi]) - LIBS=$ac_save_LIBS + if test $use_acl = 1; then + AC_CHECK_HEADERS([acl/libacl.h]) + if test $ac_cv_func_acl_get_file = yes && + test $ac_cv_func_acl_free = yes; then + AC_REPLACE_FUNCS([acl_entries]) + fi + else + LIB_ACL= + fi]) + fi]) + LIBS=$ac_save_LIBS + fi + if test "x$enable_acl$use_acl" = "xyes0"; then + AC_MSG_ERROR([ACLs enabled but support not detected]) + fi + else + use_acl=0 fi AC_SUBST([LIB_ACL]) AC_DEFINE_UNQUOTED([USE_ACL], [$use_acl],
signature.asc
Description: This is a digitally signed message part.