+2020-02-16 Bruno Haible <bruno@clisp.org>
+
+ lchmod: Improve cross-compilation guess.
+ * m4/lchmod.m4 (gl_FUNC_LCHMOD): Require AC_CANONICAL_HOST. When
+ cross-compiling, guess depending on the platform.
+
2020-02-16 Bruno Haible <bruno@clisp.org>
fstrcmp: Add API to clean up resources.
-#serial 4
+#serial 5
dnl Copyright (C) 2005-2006, 2008-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl Persuade glibc <sys/stat.h> to declare lchmod().
AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+
AC_CHECK_FUNCS_ONCE([fchmodat lchmod lstat])
if test "$ac_cv_func_lchmod" = no; then
HAVE_LCHMOD=0
]])],
[gl_cv_func_lchmod_works=yes],
[gl_cv_func_lchmod_works=no],
- [gl_cv_func_lchmod_works=$gl_cross_guess_normal])
+ [case "$host_os" in
+ dnl Guess no on Linux with glibc, yes otherwise.
+ linux-gnu*) gl_cv_func_lchmod_works="guessing no" ;;
+ *) gl_cv_func_lchmod_works="$gl_cross_guess_normal" ;;
+ esac
+ ])
rm -f conftest.lchmod])
case $gl_cv_func_lchmod_works in
*yes) ;;