With MSVC/clang, I'm seeing this configure output: checking whether realpath works... mkdir: cannot create directory 'conftest.d': File exists no
The .d files contain dependency information, apparently generated by clang. So, we need to clean up before starting the test. 2020-08-15 Bruno Haible <br...@clisp.org> canonicalize: Fix a problem of the autoconf test on MSVC/clang. * m4/canonicalize.m4 (gl_FUNC_REALPATH_WORKS): Remove undesired file from dependency analysis first. diff --git a/m4/canonicalize.m4 b/m4/canonicalize.m4 index de64cf7..14ea3e1 100644 --- a/m4/canonicalize.m4 +++ b/m4/canonicalize.m4 @@ -1,4 +1,4 @@ -# canonicalize.m4 serial 32 +# canonicalize.m4 serial 33 dnl Copyright (C) 2003-2007, 2009-2020 Free Software Foundation, Inc. @@ -79,6 +79,7 @@ AC_DEFUN([gl_FUNC_REALPATH_WORKS], AC_CHECK_FUNCS_ONCE([realpath]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether realpath works], [gl_cv_func_realpath_works], [ + rm -rf conftest.a conftest.d touch conftest.a mkdir conftest.d AC_RUN_IFELSE([