diff options
| author | Glenn Morris | 2013-04-17 22:03:53 -0700 |
|---|---|---|
| committer | Glenn Morris | 2013-04-17 22:03:53 -0700 |
| commit | 4f8902cd02ff6c182dddf5217d2683cb6abdb728 (patch) | |
| tree | 0167556a75b12444999772e0e8022332f6414981 | |
| parent | 29f47822781c138daa36a6acda85b09bccc52a95 (diff) | |
| download | emacs-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-- | ChangeLog | 8 | ||||
| -rw-r--r-- | Makefile.in | 5 | ||||
| -rw-r--r-- | configure.ac | 33 |
3 files changed, 43 insertions, 3 deletions
| @@ -1,3 +1,11 @@ | |||
| 1 | 2013-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 | |||
| 1 | 2013-04-12 Ken Brown <kbrown@cornell.edu> | 9 | 2013-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. |
| 254 | INSTALL_STRIP = | 254 | INSTALL_STRIP = |
| 255 | MKDIR_P = @MKDIR_P@ | 255 | MKDIR_P = @MKDIR_P@ |
| 256 | LN_S = @LN_S@ | 256 | # Create a link to a file in the same directory as the target. |
| 257 | LN_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. |
| 259 | GZIP_PROG = @GZIP_PROG@ | 260 | GZIP_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 | |||
| 799 | dnl if test "x$RANLIB" = x; then | 799 | dnl if test "x$RANLIB" = x; then |
| 800 | dnl AC_PROG_RANLIB | 800 | dnl AC_PROG_RANLIB |
| 801 | dnl fi | 801 | dnl fi |
| 802 | AC_PROG_LN_S | 802 | |
| 803 | |||
| 804 | dnl Sadly, AC_PROG_LN_S is too restrictive. It also tests whether links | ||
| 805 | dnl can be made to directories. This is not relevant for our usage, and | ||
| 806 | dnl excludes some cases that work fine for us. Eg MS Windows or files | ||
| 807 | dnl hosted on AFS, both examples where simple links work, but links to | ||
| 808 | dnl directories fail. We use a cut-down version instead. | ||
| 809 | dnl AC_PROG_LN_S | ||
| 810 | |||
| 811 | AC_MSG_CHECKING([whether ln -s works for files in the same directory]) | ||
| 812 | rm -f conf$$ conf$$.file | ||
| 813 | |||
| 814 | LN_S_FILEONLY='cp -p' | ||
| 815 | |||
| 816 | if (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 | ||
| 822 | fi | ||
| 823 | |||
| 824 | rm -f conf$$ conf$$.file | ||
| 825 | |||
| 826 | if test "$LN_S_FILEONLY" = "ln -s"; then | ||
| 827 | AC_MSG_RESULT([yes]) | ||
| 828 | else | ||
| 829 | AC_MSG_RESULT([no, using $LN_S_FILEONLY]) | ||
| 830 | fi | ||
| 831 | |||
| 832 | AC_SUBST(LN_S_FILEONLY) | ||
| 833 | |||
| 803 | 834 | ||
| 804 | AC_PATH_PROG(INSTALL_INFO, install-info, :, | 835 | AC_PATH_PROG(INSTALL_INFO, install-info, :, |
| 805 | $PATH$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR/sbin) | 836 | $PATH$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR/sbin) |