diff --git a/Make.rules.in b/Make.rules.in index cfd3341d4d3..a871b184ed7 100644 --- a/Make.rules.in +++ b/Make.rules.in @@ -48,6 +48,7 @@ AR = @AR@ rc 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 fb7579e46b4..9a51ad84990 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -96,6 +96,23 @@ CFLAGS="$CFLAGS $1" 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 bc77cc99c8b..8858ad242dd 100755 --- a/configure +++ b/configure @@ -4323,6 +4323,22 @@ else 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_PROGRAM@,$INSTALL_PROGRAM,;t t 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 803bd92dd08..70b94085546 100644 --- a/configure.ac +++ b/configure.ac @@ -78,6 +78,7 @@ AC_CHECK_TOOL(STRIP,strip,strip) 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])