Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: zsh-3.1.2-zefram3: libzsh install



Here is a patch for several problems with dynamic ZSH

  - libzsh.so was changed to libzsh.$(VERSION).so; zsh is linked
    with it explicitly

  - problem with staic libraries (looks, like no one else has it :)
    Our system lacks shared libcurses, so linking failed because
    zsh itself doesn't contains references to -lcurses. Now it just
    links with $(LIBZSH) $(LIBS) and is quite happy.
    (I discussed it with Zoltan awhile ago, but it looks like the most
    easy solution)

  - libzsh is now (un)installed. 

  - if I give relative pathname to configure, installation fails. The 
    reason is, configure figures out correct relative path for every
    directory level, but top level Makefile simply overrides it with
    it's own. I changed Makefile.in, Src/Makefile.in, Src/Makemod.in.in,
    but probably other Makefiles should be ajusted just for 
    consistency

  - I changed uninstall.bin to restore zsh.old to zsh - otherweise, I 
    don't see any need to make backup copy (we always have zsh-$(VERSION)   
    around)

I tried changes with both static and dynamic zsh, and they seem to work.

Aside: I tried to build ZSH on a system without RTLD_GLOBAL, and it was
screwd up. It did run, but it lost the whole environment, and had massive
problems with line refresh. I have no idea, if it is because of buggy OS
or ZSH has some problems in this case. Anybody tried this?

-------------------------------------------------------------------------
Andrej Borsenkow 		Fax:   +7 (095) 252 01 05
SNI ITS Moscow			Tel:   +7 (095) 252 13 88

NERV:  borsenkow.msk		E-Mail: borsenkow.msk@xxxxxx
-------------------------------------------------------------------------
--- zsh-3.1.2-zefram3/configure.in.org	Mon Jan 12 19:19:18 1998
+++ zsh-3.1.2-zefram3/configure.in	Wed Jan 14 18:16:50 1998
@@ -961,7 +961,7 @@
   RTLD_GLOBAL_OK=$zsh_cv_sys_dynamic_rtld_global
   zsh_SYS_DYNAMIC_EXECSYMS
   if test "$zsh_cv_sys_dynamic_execsyms" != yes; then
-    L=L LIBS="$LIBS -L. -lzsh"
+    L=L
   fi
   zsh_SYS_DYNAMIC_STRIP_EXE
   zsh_SYS_DYNAMIC_STRIP_LIB
--- zsh-3.1.2-zefram3/Makefile.in.org	Mon Jan 12 19:18:56 1998
+++ zsh-3.1.2-zefram3/Makefile.in	Wed Jan 14 18:54:31 1998
@@ -82,8 +82,7 @@
 DLCFLAGS='$(DLCFLAGS)' DLLDFLAGS='$(DLLDFLAGS)' \
 LIBLDFLAGS='$(LIBLDFLAGS)' EXELDFLAGS='$(EXELDFLAGS)' \
 LIBS='$(LIBS)' DL_EXT='$(DL_EXT)' DLLD='$(DLLD)' \
-AWK='$(AWK)' YODL='$(YODL)' INSTALL='$(INSTALL)' \
-INSTALL_PROGRAM='$(INSTALL_PROGRAM)' INSTALL_DATA='$(INSTALL_DATA)'
+AWK='$(AWK)' YODL='$(YODL)'
 
 .SUFFIXES:
 
@@ -110,11 +109,15 @@
 	@cd Src && $(MAKE) $(MAKEDEFS) $@
 
 # install/uninstall everything
-install: install.bin install.modules install.man install.info
-uninstall: uninstall.bin uninstall.modules uninstall.man uninstall.info
+install: install.bin install.lib install.modules install.man install.info
+uninstall: uninstall.bin uninstall.lib uninstall.modules uninstall.man uninstall.info
 
 # install/uninstall just the binary
 install.bin uninstall.bin:
+	@cd Src && $(MAKE) $(MAKEDEFS) $@
+
+# install/uninstall just the library
+install.lib uninstall.lib:
 	@cd Src && $(MAKE) $(MAKEDEFS) $@
 
 # install/uninstall just the modules
--- zsh-3.1.2-zefram3/Src/Makefile.in.org	Mon Jan 12 19:18:59 1998
+++ zsh-3.1.2-zefram3/Src/Makefile.in	Wed Jan 14 20:57:50 1998
@@ -102,17 +102,16 @@
 NSTMP = stamp-modobjs
 NLIST = `cat stamp-modobjs`
 
-LIBZSH = libzsh.so.$(VERSION)
+LIBZSH = libzsh.$(VERSION).so
 NIBZSH =
 
 zsh: $(@L@IBZSH) $(@L@STMP) $(MAIN_OBJS)
 	rm -f $@
-	$(LINK) $(MAIN_OBJS) $(@L@LIST) $(LIBS)
+	$(LINK) $(MAIN_OBJS) $(@L@LIST) $(@L@IBZSH) $(LIBS)
 
 $(LIBZSH): $(LIBOBJS) $(NSTMP)
 	rm -f $@
 	$(DLLINK) $(LIBOBJS) $(NLIST)
-	ln -sf $(LIBZSH) libzsh.so
 
 stamp-modobjs: modobjs
 	@if cmp -s stamp-modobjs.tmp stamp-modobjs; then \
@@ -178,8 +177,8 @@
 
 # ========== DEPENDENCIES FOR INSTALLING ==========
 
-install: install.bin install.modules
-uninstall: uninstall.bin uninstall.modules
+install: install.bin install.modules install.lib
+uninstall: uninstall.bin uninstall.modules install.lib
 
 install.bin: install.bin-here
 uninstall.bin: uninstall.bin-here
@@ -196,6 +195,23 @@
 uninstall.bin-here:
 	-if [ -f $(bindir)/zsh ]; then rm -f $(bindir)/zsh; fi
 	-if [ -f $(bindir)/zsh-$(VERSION) ]; then rm -f $(bindir)/zsh-$(VERSION); fi
+	-if [ -f $(bindir)/zsh.old ]; then mv $(bindir)/zsh $(bindir)/zsh; fi
+
+# install ZSH shared library if was built
+install.lib: install.lib.@L@
+
+install.lib.L: $(LIBZSH)
+	$(INSTALL_PROGRAM) $(LIBZSH) $(libdir)/$(LIBZSH)
+
+install.lib.N:
+
+# uninstall ZSH shared library if was built
+uninstall.lib: uninstall.lib.@L@
+
+uninstall.lib.L: $(LIBZSH)
+	-if [ -f $(libdir)/$(LIBZSH) ]; then rm -f $(libdir)/$(LIBZSH); fi
+
+uninstall.lib.N:
 
 # ========== DEPENDENCIES FOR CLEANUP ==========
 
--- zsh-3.1.2-zefram3/Src/Makemod.in.in.org	Tue Jan 13 12:33:58 1998
+++ zsh-3.1.2-zefram3/Src/Makemod.in.in	Wed Jan 14 20:11:57 1998
@@ -81,8 +81,7 @@
 DLCFLAGS='$(DLCFLAGS)' DLLDFLAGS='$(DLLDFLAGS)' \
 LIBLDFLAGS='$(LIBLDFLAGS)' EXELDFLAGS='$(EXELDFLAGS)' \
 LIBS='$(LIBS)' DL_EXT='$(DL_EXT)' DLLD='$(DLLD)' \
-AWK='$(AWK)' YODL='$(YODL)' INSTALL='$(INSTALL)' \
-INSTALL_PROGRAM='$(INSTALL_PROGRAM)' INSTALL_DATA='$(INSTALL_DATA)'
+AWK='$(AWK)' YODL='$(YODL)'
 
 # ========== COMPILATION RULES ==========
 





Messages sorted by: Reverse Date, Date, Thread, Author