From a846a6e0a7d237f206a7e5445ce3a2392d0f434a Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Sun, 7 Sep 2008 03:17:22 -0400 Subject: [PATCH] Install with relative symlinks if $(root_libdir) == $(libdir) When installing the ELF link library, avoid using absolute pathnames if $(root_libdir) and $(libdir) are the same. Addresses-Sourceforge-Bug: #1782913 Signed-off-by: "Theodore Ts'o" --- lib/Makefile.elf-lib | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/Makefile.elf-lib b/lib/Makefile.elf-lib index c360adca..4c778b96 100644 --- a/lib/Makefile.elf-lib +++ b/lib/Makefile.elf-lib @@ -45,8 +45,12 @@ install-shlibs install:: $(ELF_LIB) installdirs-elf-lib @echo " SYMLINK $(ELF_INSTALL_DIR)/$(ELF_SONAME)" @$(LN_S) -f $(ELF_LIB) $(DESTDIR)$(ELF_INSTALL_DIR)/$(ELF_SONAME) @echo " SYMLINK $(libdir)/$(ELF_IMAGE).so" - @$(LN_S) -f $(ELF_INSTALL_DIR)/$(ELF_SONAME) \ - $(DESTDIR)$(libdir)/$(ELF_IMAGE).so + @if test "$(ELF_INSTALL_DIR)" = "$(libdir)"; then \ + $(LN_S) -f $(ELF_SONAME) $(DESTDIR)$(libdir)/$(ELF_IMAGE).so ; \ + else \ + $(LN_S) -f $(ELF_INSTALL_DIR)/$(ELF_SONAME) \ + $(DESTDIR)$(libdir)/$(ELF_IMAGE).so; \ + fi @echo " LDCONFIG" @-$(LDCONFIG)