configure: win32: error only once about 'ln failed'

Don't try ln again if it failed, it won't have better luck next time.
This commit is contained in:
Avi Halachmi (:avih) 2024-12-04 11:20:53 +02:00
parent c45559e124
commit 126b1ffd10

5
configure vendored
View file

@ -710,6 +710,7 @@ rm -f $TMPN* $CONFTEST
# ---------------------------------------------------------------------------
# build tree in object directory if source path is different from current one
use_cp=
fn_makelink()
{
tgt=$1/$2
@ -726,7 +727,9 @@ fn_makelink()
;;
esac
ln -sfn "$tgt" $2 || ( echo "ln failed. Using cp instead."; cp -f "$1/$2" $2 )
test -n "$use_cp" || ln -sfn "$tgt" $2 ||
{ use_cp=yes; echo "ln failed. Using cp instead."; }
test -z "$use_cp" || cp -f "$1/$2" $2
}
if test "$source_path_used" = "yes" ; then