aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2013-04-17 22:03:53 -0700
committerGlenn Morris2013-04-17 22:03:53 -0700
commit4f8902cd02ff6c182dddf5217d2683cb6abdb728 (patch)
tree0167556a75b12444999772e0e8022332f6414981
parent29f47822781c138daa36a6acda85b09bccc52a95 (diff)
downloademacs-4f8902cd02ff6c182dddf5217d2683cb6abdb728.tar.gz
emacs-4f8902cd02ff6c182dddf5217d2683cb6abdb728.zip
Replace AC_PROG_LN_S by a less strict configure test
* configure.ac (AC_PROG_LN_S): Remove, too restrictive. (LN_S_FILEONLY): New output variable. * Makefile.in (LN_S): Remove. (LN_S_FILEONLY): New, set by configure. (install-arch-dep): Use LN_S_FILEONLY rather than LN_S.
-rw-r--r--ChangeLog8
-rw-r--r--Makefile.in5
-rw-r--r--configure.ac33
3 files changed, 43 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index f8a3a5e0cca..573a8021eeb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
12013-04-18 Glenn Morris <rgm@gnu.org>
2
3 * configure.ac (AC_PROG_LN_S): Remove, too restrictive.
4 (LN_S_FILEONLY): New output variable.
5 * Makefile.in (LN_S): Remove.
6 (LN_S_FILEONLY): New, set by configure.
7 (install-arch-dep): Use LN_S_FILEONLY rather than LN_S.
8
12013-04-12 Ken Brown <kbrown@cornell.edu> 92013-04-12 Ken Brown <kbrown@cornell.edu>
2 10
3 * configure.ac (canonical): Adapt to 64-bit Cygwin, for which 11 * configure.ac (canonical): Adapt to 64-bit Cygwin, for which
diff --git a/Makefile.in b/Makefile.in
index bd77fa6a70d..019460acf3c 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -253,7 +253,8 @@ INSTALL_INFO = @INSTALL_INFO@
253# By default, we uphold the dignity of our programs. 253# By default, we uphold the dignity of our programs.
254INSTALL_STRIP = 254INSTALL_STRIP =
255MKDIR_P = @MKDIR_P@ 255MKDIR_P = @MKDIR_P@
256LN_S = @LN_S@ 256# Create a link to a file in the same directory as the target.
257LN_S_FILEONLY = @LN_S_FILEONLY@
257 258
258# We use gzip to compress installed .el files. 259# We use gzip to compress installed .el files.
259GZIP_PROG = @GZIP_PROG@ 260GZIP_PROG = @GZIP_PROG@
@@ -455,7 +456,7 @@ install-arch-dep: src install-arch-indep install-doc
455 chmod 1755 $(DESTDIR)${bindir}/$(EMACSFULL) || true; \ 456 chmod 1755 $(DESTDIR)${bindir}/$(EMACSFULL) || true; \
456 if test "x${NO_BIN_LINK}" = x; then \ 457 if test "x${NO_BIN_LINK}" = x; then \
457 rm -f $(DESTDIR)${bindir}/$(EMACS) ; \ 458 rm -f $(DESTDIR)${bindir}/$(EMACS) ; \
458 cd $(DESTDIR)${bindir} && $(LN_S) $(EMACSFULL) $(EMACS); \ 459 cd $(DESTDIR)${bindir} && $(LN_S_FILEONLY) $(EMACSFULL) $(EMACS); \
459 fi; \ 460 fi; \
460 else \ 461 else \
461 subdir=${ns_appresdir}/site-lisp; \ 462 subdir=${ns_appresdir}/site-lisp; \
diff --git a/configure.ac b/configure.ac
index c95072423b5..39a0477a693 100644
--- a/configure.ac
+++ b/configure.ac
@@ -799,7 +799,38 @@ dnl AC_PROG_MKDIR_P
799dnl if test "x$RANLIB" = x; then 799dnl if test "x$RANLIB" = x; then
800dnl AC_PROG_RANLIB 800dnl AC_PROG_RANLIB
801dnl fi 801dnl fi
802AC_PROG_LN_S 802
803
804dnl Sadly, AC_PROG_LN_S is too restrictive. It also tests whether links
805dnl can be made to directories. This is not relevant for our usage, and
806dnl excludes some cases that work fine for us. Eg MS Windows or files
807dnl hosted on AFS, both examples where simple links work, but links to
808dnl directories fail. We use a cut-down version instead.
809dnl AC_PROG_LN_S
810
811AC_MSG_CHECKING([whether ln -s works for files in the same directory])
812rm -f conf$$ conf$$.file
813
814LN_S_FILEONLY='cp -p'
815
816if (echo >conf$$.file) 2>/dev/null; then
817 if ln -s conf$$.file conf$$ 2>/dev/null; then
818 LN_S_FILEONLY='ln -s'
819 elif ln conf$$.file conf$$ 2>/dev/null; then
820 LN_S_FILEONLY=ln
821 fi
822fi
823
824rm -f conf$$ conf$$.file
825
826if test "$LN_S_FILEONLY" = "ln -s"; then
827 AC_MSG_RESULT([yes])
828else
829 AC_MSG_RESULT([no, using $LN_S_FILEONLY])
830fi
831
832AC_SUBST(LN_S_FILEONLY)
833
803 834
804AC_PATH_PROG(INSTALL_INFO, install-info, :, 835AC_PATH_PROG(INSTALL_INFO, install-info, :,
805 $PATH$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR/sbin) 836 $PATH$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR/sbin)