immutable: Add tests.
[gnulib.git] / m4 / lchmod.m4
blob3d181be051e0a789d3e217c4ab76423cb52c9abd
1 #serial 8
3 dnl Copyright (C) 2005-2006, 2008-2021 Free Software Foundation, Inc.
4 dnl This file is free software; the Free Software Foundation
5 dnl gives unlimited permission to copy and/or distribute it,
6 dnl with or without modifications, as long as this notice is preserved.
8 dnl From Paul Eggert.
9 dnl Provide a replacement for lchmod on hosts that lack a working version.
11 AC_DEFUN([gl_FUNC_LCHMOD],
13   AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
15   dnl Persuade glibc <sys/stat.h> to declare lchmod().
16   AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
18   AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
20   AC_CHECK_FUNCS_ONCE([lchmod lstat])
21   if test "$ac_cv_func_lchmod" = no; then
22     HAVE_LCHMOD=0
23   fi
26 # Prerequisites of lib/lchmod.c.
27 AC_DEFUN([gl_PREREQ_LCHMOD],
29   :