Hash :
f187e34f
Author :
Date :
2023-04-24T01:57:33
Improve quoting of AS_HELP_STRING's first argument. * m4/acl.m4 (gl_FUNC_ACL_ARG): Don't underquote AS_HELP_STRING's first argument. * m4/assert.m4 (gl_ASSERT): Likewise. * m4/gc.m4 (gl_GC): Likewise. * m4/gnulib-common.m4 (gl_COMMON_BODY): Likewise. * m4/ld-version-script.m4 (gl_LD_VERSION_SCRIPT): Likewise. * m4/lib-ld.m4 (AC_LIB_PROG_LD): Likewise. * m4/libgmp.m4 (gl_LIBGMP): Likewise. * m4/regex.m4 (gl_REGEX): Likewise. * m4/relocatable-lib.m4 (gl_RELOCATABLE_NOP): Likewise. * m4/selinux-selinux-h.m4 (gl_LIBSELINUX): Likewise. * m4/sigsegv.m4 (gl_SIGSEGV): Likewise. * m4/threadlib.m4 (gl_THREADLIB_EARLY_BODY): Likewise. * m4/valgrind-tests.m4 (gl_VALGRIND_TESTS): Likewise. * m4/version-etc.m4 (gl_VERSION_ETC_FLAG): Likewise. * m4/xattr.m4 (gl_FUNC_XATTR): Likewise. * doc/manywarnings.texi (manywarnings): Likewise. This avoids the use of quadrigraphs.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
# xattr.m4 - check for Extended Attributes (Linux)
# serial 7
# Copyright (C) 2003-2023 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.
AC_DEFUN([gl_FUNC_XATTR],
[
AC_ARG_ENABLE([xattr],
AS_HELP_STRING([[--disable-xattr]],
[do not support extended attributes]),
[use_xattr=$enableval], [use_xattr=yes])
LIB_XATTR=
AC_SUBST([LIB_XATTR])
if test "$use_xattr" = yes; then
AC_CACHE_CHECK([for xattr library with ATTR_ACTION_PERMISSIONS],
[gl_cv_xattr_lib],
[gl_cv_xattr_lib=no
AC_LANG_CONFTEST(
[AC_LANG_PROGRAM(
[[#include <attr/error_context.h>
#include <attr/libattr.h>
static int
is_attr_permissions (const char *name, struct error_context *ctx)
{
return attr_copy_action (name, ctx) == ATTR_ACTION_PERMISSIONS;
}
]],
[[return attr_copy_fd ("/", 0, "/", 0, is_attr_permissions, 0);
]])])
AC_LINK_IFELSE([],
[gl_cv_xattr_lib='none required'],
[xattr_saved_LIBS=$LIBS
LIBS="-lattr $LIBS"
AC_LINK_IFELSE([], [gl_cv_xattr_lib=-lattr])
LIBS=$xattr_saved_LIBS])])
if test "$gl_cv_xattr_lib" = no; then
AC_MSG_WARN([libattr development library was not found or not usable.])
AC_MSG_WARN([AC_PACKAGE_NAME will be built without xattr support.])
use_xattr=no
elif test "$gl_cv_xattr_lib" != 'none required'; then
LIB_XATTR=$gl_cv_xattr_lib
fi
fi
if test "$use_xattr" = yes; then
AC_DEFINE([USE_XATTR], [1],
[Define to 1 to use the Linux extended attributes library.])
fi
])