Added check for ln.
diff --git a/Make.rules.in b/Make.rules.in
index cfd3341..a871b18 100644
--- a/Make.rules.in
+++ b/Make.rules.in
@@ -48,6 +48,7 @@
RANLIB = @RANLIB@
STRIP = @STRIP@
WINDRES = @WINDRES@
+LN = @LN@
LN_S = @LN_S@
TOOLSDIR = @TOOLSDIR@
DIVINCL = -I$(SRCDIR) -I. -I$(TOPSRCDIR)/include -I$(TOPOBJDIR)/include $(EXTRAINCL)
diff --git a/aclocal.m4 b/aclocal.m4
index fb7579e..9a51ad8 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -96,6 +96,23 @@
AC_TRY_LINK([],[],[$2],[$3])
CFLAGS=$ac_wine_try_cflags_saved])
+dnl **** Check for ln ****
+dnl
+dnl Usage: WINE_PROG_LN
+dnl
+AC_DEFUN([WINE_PROG_LN],
+[AC_MSG_CHECKING([whether ln works])
+rm -f conf$$ conf$$.file
+echo >conf$$.file
+if ln conf$$.file conf$$ 2>/dev/null; then
+ AC_SUBST(LN,ln)
+ AC_MSG_RESULT([yes])
+else
+ AC_SUBST(LN,["cp -p"])
+ AC_MSG_RESULT([no, using $LN])
+fi
+rm -f conf$$ conf$$.file])
+
dnl **** Create non-existent directories from config.status ****
dnl
dnl Usage: WINE_CONFIG_EXTRA_DIR(dirname)
diff --git a/configure b/configure
index bc77cc9..8858ad2 100755
--- a/configure
+++ b/configure
@@ -4323,6 +4323,22 @@
echo "${ECHO_T}no, using $LN_S" >&6
fi
+echo "$as_me:$LINENO: checking whether ln works" >&5
+echo $ECHO_N "checking whether ln works... $ECHO_C" >&6
+rm -f conf$$ conf$$.file
+echo >conf$$.file
+if ln conf$$.file conf$$ 2>/dev/null; then
+ LN=ln
+
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+ LN="cp -p"
+
+ echo "$as_me:$LINENO: result: no, using $LN" >&5
+echo "${ECHO_T}no, using $LN" >&6
+fi
+rm -f conf$$ conf$$.file
# Extract the first word of "c2man", so it can be a program name with args.
set dummy c2man; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
@@ -13966,6 +13982,7 @@
s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
s,@INSTALL_DATA@,$INSTALL_DATA,;t t
s,@LN_S@,$LN_S,;t t
+s,@LN@,$LN,;t t
s,@C2MAN@,$C2MAN,;t t
s,@LDCONFIG@,$LDCONFIG,;t t
s,@LDCOMBINE@,$LDCOMBINE,;t t
diff --git a/configure.ac b/configure.ac
index 803bd92..70b9408 100644
--- a/configure.ac
+++ b/configure.ac
@@ -78,6 +78,7 @@
AC_CHECK_TOOL(WINDRES,windres,false)
AC_PROG_INSTALL
AC_PROG_LN_S
+WINE_PROG_LN
AC_CHECK_PROG(C2MAN,c2man,c2man,\$(TOPSRCDIR)/tools/c2man.pl)
AC_PATH_PROG(LDCONFIG, ldconfig, true, [/sbin /usr/sbin $PATH])