[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [patch] make acl support optional
From: |
Jim Meyering |
Subject: |
Re: [patch] make acl support optional |
Date: |
Tue, 08 Jan 2008 09:59:36 +0100 |
Mike Frysinger <address@hidden> wrote:
> 2008-01-08 Mike Frysinger <address@hidden>
>
> * 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])
> +
...
> + if test "x$use_acl" != "xno"; then
> + dnl Prerequisites of lib/acl.c.
> + use_acl=0
Thanks.
The above test of $use_acl should be $enable_acl.
I've also hoisted the use_acl=0 definition and eliminated
your 1-line "else" block.
Here's the "git diff -b" rendering of what I've just committed and pushed
(-b hides the distracting indentation changes):
Note that I also added a one-line summary to the ChangeLog entry.
http://git.sv.gnu.org/gitweb/?p=gnulib.git;a=summary
diff --git a/m4/acl.m4 b/m4/acl.m4
index 6a1951d..f67f6de 100644
--- a/m4/acl.m4
+++ b/m4/acl.m4
@@ -1,6 +1,6 @@
# acl.m4 - check for access control list (ACL) primitives
-# Copyright (C) 2002, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2004-2008 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -12,9 +12,14 @@ 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
+ if test "x$enable_acl" != "xno"; then
+ dnl Prerequisites of lib/acl.c.
AC_CHECK_HEADERS(sys/acl.h)
if test $ac_cv_header_sys_acl_h = yes; then
ac_save_LIBS=$LIBS
@@ -49,6 +54,10 @@ AC_DEFUN([gl_FUNC_ACL],
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
+ fi
AC_SUBST([LIB_ACL])
AC_DEFINE_UNQUOTED([USE_ACL], [$use_acl],
[Define to nonzero if you want access control list support.])