]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
(_AC_OUTPUT_LINKS): Fall back on cp if ln doesn't work.
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 6 Jun 2002 17:55:47 +0000 (17:55 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 6 Jun 2002 17:55:47 +0000 (17:55 +0000)
lib/autoconf/status.m4

index 3749885b09a19a6041f5a0fad82e80e4d0de1d30..18bbf37562f701272c0f1cef00bb257bc9187364 100644 (file)
@@ -777,10 +777,11 @@ for ac_file in : $CONFIG_LINKS; do test "x$ac_file" = x: && continue
       *) ac_rel_source=$ac_top_builddir$srcdir/$ac_source ;;
   esac
 
-  # Make a symlink if possible; otherwise try a hard link.
+  # Try a symlink, then a hard link, then a copy.
   ln -s $ac_rel_source $ac_dest 2>/dev/null ||
-    ln $srcdir/$ac_source $ac_dest ||
-    AC_MSG_ERROR([cannot link $ac_dest to $srcdir/$ac_source])
+    ln $srcdir/$ac_source $ac_dest 2>/dev/null ||
+    cp -p $srcdir/$ac_source $ac_dest ||
+    AC_MSG_ERROR([cannot link or copy $srcdir/$ac_source to $ac_dest])
 m4_ifset([AC_LIST_LINKS_COMMANDS],
 [  # Run the commands associated with the file.
   case $ac_file in