1 2007-07-25 Mike Frysinger <vapier@gentoo.org>
3 * m4/acl.m4 (AC_FUNC_ACL): Wrap all ACL logic in a call to
6 diff --git a/m4/acl.m4 b/m4/acl.m4
7 index 6e6bd08..472d257 100644
10 @@ -12,27 +12,35 @@ AC_DEFUN([AC_FUNC_ACL],
12 AC_LIBOBJ([file-has-acl])
14 - dnl Prerequisites of lib/acl.c.
15 - AC_CHECK_HEADERS(sys/acl.h)
17 - ac_save_LIBS="$LIBS"
18 - AC_SEARCH_LIBS(acl_get_file, acl,
19 - [test "$ac_cv_search_acl_get_file" = "none required" ||
20 - LIB_ACL=$ac_cv_search_acl_get_file])
22 - AC_CHECK_HEADERS(acl/libacl.h)
23 - AC_CHECK_FUNCS(acl_get_file acl_get_fd acl_set_file acl_set_fd \
24 - acl_free acl_from_mode acl_from_text \
25 - acl_delete_def_file acl_extended_file)
26 - if test $ac_cv_header_sys_acl_h = yes; then
28 - if test $ac_cv_func_acl_get_file = yes; then
29 - # If we detect the acl_get_file bug, disable ACL support altogether.
30 - gl_ACL_GET_FILE( , [use_acl=0])
32 + AC_HELP_STRING([--disable-acl], [turn off support for ACLs],
33 + [use_acl=$enableval], [use_acl=yes])
35 + if test "$use_acl" = "yes"; then
36 + dnl Prerequisites of lib/acl.c.
37 + AC_CHECK_HEADERS(sys/acl.h)
39 + ac_save_LIBS="$LIBS"
40 + AC_SEARCH_LIBS(acl_get_file, acl,
41 + [test "$ac_cv_search_acl_get_file" = "none required" ||
42 + LIB_ACL=$ac_cv_search_acl_get_file])
44 + AC_CHECK_HEADERS(acl/libacl.h)
45 + AC_CHECK_FUNCS(acl_get_file acl_get_fd acl_set_file acl_set_fd \
46 + acl_free acl_from_mode acl_from_text \
47 + acl_delete_def_file acl_extended_file)
48 + if test $ac_cv_header_sys_acl_h = yes; then
50 + if test $ac_cv_func_acl_get_file = yes; then
51 + # If we detect the acl_get_file bug, disable ACL support altogether.
52 + gl_ACL_GET_FILE( , [use_acl=0])
63 if test $use_acl = 1 &&
64 test $ac_cv_func_acl_get_file = yes &&
65 test $ac_cv_func_acl_free = yes; then