On Sunday 26 November 2006 10:53, Jim Meyering wrote:
> Sounds ok.

patch attached ... it's pretty much all just whitespace changes to indent the 
ACL logic into the new if statement

> The default would be unchanged, of course.

yeah, i meant to say that in my original e-mail
-mike

Attachment: pgpkh3Wyo4yEW.pgp
Description: PGP signature

2006-11-26  Mike Frysinger  <[EMAIL PROTECTED]>

	* m4/acl.m4 (AC_FUNC_ACL): Wrap all ACL logic in a call to
	AC_ARG_ENABLE(acl).

--- m4/acl.m4
+++ m4/acl.m4
@@ -11,28 +11,37 @@ AC_DEFUN([AC_FUNC_ACL],
 [
   AC_LIBOBJ([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_to_text \
-		   acl_delete_def_file acl_entries 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,
+	[  --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_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_to_text \
+		     acl_delete_def_file acl_entries 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
-  LIBS="$ac_save_LIBS"
+    LIBS="$ac_save_LIBS"
+  else
+    use_acl=0
+  fi
+
+  AC_SUBST(LIB_ACL)
   AC_DEFINE_UNQUOTED(USE_ACL, $use_acl,
 		     [Define if you want access control list support.])
 ])
_______________________________________________
Bug-coreutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to