Hi all, I'm trying to improve AC_PROG_LN_S and/or _AS_LN_S_PREPARE on Windows. MSYS2 docs have a nice recap [1]: > Symlink support in Windows existed since Windows Vista, but creating > them was initially only possible with administrator > accounts. Starting with Windows 10 (~2016) it is possible to create > symlinks with your normal user account if you have the "Developer > Mode" enabled. Existing symlinks that were created by an > administrator account, or with the "Developer Mode" enabled, can be > used and deleted by normal users without the right to create > symlinks themselves. > Compared to Unix symlinks, the Windows symlinks come in a > "directory" and a "file" type. If you create a file symlink to a > directory, or vice versa, or if the target type changes after the > symlink is created, the symlink will be broken. [1]: https://www.msys2.org/docs/symlinks/ We want to use native Windows symlinks in Cygwin and MSYS2 environments. For this, the CYGWIN and MSYS env vars need to contain winsymlinks:nativestrict, which will make 'ln -s' fail if native symlinks are not enabled. _AS_LN_S_PREPARE has this comment: > # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail. but only 'MSYS=winsymlinks:nativestrict ln -s file dir' fails (I don't understand the behavior of the second one, and it seems irrelevant to test hardlinks in a test named LN_S…). Also, if I'm not mistaken, this creates a link to itself, and is not particularly useful. I think this test should be removed. 1. Could _AS_LN_S_PREPARE be changed to work with or recognize Cygwin and MSYS2? 2. If not, there was a thread in 2010 to allow overriding LN_S that got nowhere. Could this be revisited? https://lists.nongnu.org/archive/html/autoconf-patches/2010-10/msg00007.html A fix for AC_PROG_LN_S needs to work in the configure and in the config.status scripts. We currently have a work-around in the OCaml compiler: https://github.com/ocaml/ocaml/pull/13494 Cheers, -- Antonin