]> git.wh0rd.org - patches.git/blob - gnulib-acl-optional.patch
scummvm random work
[patches.git] / gnulib-acl-optional.patch
1 2007-07-25 Mike Frysinger <vapier@gentoo.org>
2
3 * m4/acl.m4 (AC_FUNC_ACL): Wrap all ACL logic in a call to
4 AC_ARG_ENABLE(acl).
5
6 diff --git a/m4/acl.m4 b/m4/acl.m4
7 index 6e6bd08..472d257 100644
8 --- a/m4/acl.m4
9 +++ b/m4/acl.m4
10 @@ -12,27 +12,35 @@ AC_DEFUN([AC_FUNC_ACL],
11 AC_LIBOBJ([acl])
12 AC_LIBOBJ([file-has-acl])
13
14 - dnl Prerequisites of lib/acl.c.
15 - AC_CHECK_HEADERS(sys/acl.h)
16 - AC_CHECK_FUNCS(acl)
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])
21 - AC_SUBST(LIB_ACL)
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
27 - use_acl=1
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])
31 + AC_ARG_ENABLE(acl,
32 + AC_HELP_STRING([--disable-acl], [turn off support for ACLs],
33 + [use_acl=$enableval], [use_acl=yes])
34 +
35 + if test "$use_acl" = "yes"; then
36 + dnl Prerequisites of lib/acl.c.
37 + AC_CHECK_HEADERS(sys/acl.h)
38 + AC_CHECK_FUNCS(acl)
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])
43 + AC_SUBST(LIB_ACL)
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
49 + use_acl=1
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])
53 + fi
54 + else
55 + use_acl=0
56 fi
57 - else
58 - use_acl=0
59 - fi
60 + else
61 + use_acl=0
62 + fi
63 if test $use_acl = 1 &&
64 test $ac_cv_func_acl_get_file = yes &&
65 test $ac_cv_func_acl_free = yes; then