[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[patch] make acl support optional
From: |
Mike Frysinger |
Subject: |
[patch] make acl support optional |
Date: |
Wed, 25 Jul 2007 08:04:53 -0400 |
User-agent: |
KMail/1.9.7 |
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.
-mike
signature.asc
Description: This is a digitally signed message part.
2007-07-25 Mike Frysinger <address@hidden>
* m4/acl.m4 (AC_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 6e6bd08..472d257 100644
--- a/m4/acl.m4
+++ b/m4/acl.m4
@@ -12,27 +12,35 @@ AC_DEFUN([AC_FUNC_ACL],
AC_LIBOBJ([acl])
AC_LIBOBJ([file-has-acl])
- dnl Prerequisites of lib/acl.c.
- AC_CHECK_HEADERS(sys/acl.h)
- AC_CHECK_FUNCS(acl)
- ac_save_LIBS="$LIBS"
- 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_SUBST(LIB_ACL)
- AC_CHECK_HEADERS(acl/libacl.h)
- 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_header_sys_acl_h = yes; then
- use_acl=1
- if test $ac_cv_func_acl_get_file = yes; then
- # If we detect the acl_get_file bug, disable ACL support altogether.
- gl_ACL_GET_FILE( , [use_acl=0])
+ AC_ARG_ENABLE(acl,
+ AC_HELP_STRING([--disable-acl], [turn off support for ACLs],
+ [use_acl=$enableval], [use_acl=yes])
+
+ if test "$use_acl" = "yes"; then
+ dnl Prerequisites of lib/acl.c.
+ AC_CHECK_HEADERS(sys/acl.h)
+ AC_CHECK_FUNCS(acl)
+ ac_save_LIBS="$LIBS"
+ 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_SUBST(LIB_ACL)
+ AC_CHECK_HEADERS(acl/libacl.h)
+ 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_header_sys_acl_h = yes; then
+ use_acl=1
+ if test $ac_cv_func_acl_get_file = yes; then
+ # If we detect the acl_get_file bug, disable ACL support altogether.
+ gl_ACL_GET_FILE( , [use_acl=0])
+ fi
+ else
+ use_acl=0
fi
- else
- use_acl=0
- fi
+ else
+ use_acl=0
+ fi
if test $use_acl = 1 &&
test $ac_cv_func_acl_get_file = yes &&
test $ac_cv_func_acl_free = yes; then
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [patch] make acl support optional,
Mike Frysinger <=