* Patch to link dynamic zsh even if some libs are static
@ 1997-07-03 9:55 Andrej Borsenkow
1997-07-03 16:14 ` Zoltan Hidvegi
0 siblings, 1 reply; 2+ messages in thread
From: Andrej Borsenkow @ 1997-07-03 9:55 UTC (permalink / raw)
To: Zsh workers mailing list
I reported the problem some time ago: our system doesn't have shared
libcurses (linked with libtermcap) and linking fails, because currently
libzsh.so is _not_ linked with $(LIBS).
As long as I cannot make our developers to provide shared versions of all
libs (Kosten Frage ;), here is very small patch to enable compilation
anyway. I added configure parameter '--enable-libhack'. If it is defined,
both zsh and libzsh.so are linked with $(LIBS). (It is not enough to ink
only libzsh.so - I wonder, if it is a bug or a feature?) The parameters
defaults to "no". I did it, because I am not shure about impact on other
systems - otherweise it is enough to just define LIBZSH_LIBS. The patch is
enough to compile ZSH on my system - it seems nobody else have this
problem.
It also includes previous patch I sent - not all systems support "ln -sf"
(ours doesn't).
BTW our compiler defaults to PIC code, so even linked with static library,
libzsh.so should be shared as well. I hope ... ;)
-------------------------------------------------------------------------
Andrej Borsenkow Fax: +7 (095) 252 01 05
SNI ITS Moscow Tel: +7 (095) 252 13 88
NERV: borsenkow.msk E-Mail: borsenkow.msk@sni.de
-------------------------------------------------------------------------
================== CUT HERE ==============================
--- zsh-3.1.2/Src/Makefile.in.org Thu Jul 3 13:45:12 1997
+++ zsh-3.1.2/Src/Makefile.in Thu Jul 3 12:47:33 1997
@@ -55,6 +55,7 @@
EXELDFLAGS = @EXELDFLAGS@
LIBLDFLAGS = @LIBLDFLAGS@
EXTRA_LDFLAGS = @EXTRA_LDFLAGS@
+LIBZSH_LIBS = @LIBZSH_LIBS@
INCLUDES = -I.. -I. -I$(srcdir)
@@ -177,9 +178,9 @@
$(LINK) $(@L@OBJS) $(@L@LIST) $(LIBS)
$(LIBZSH): $(LIBOBJS) $(NSTMP)
- rm -f $@
- $(DLLINK) $(LIBOBJS) $(NLIST)
- ln -sf $(LIBZSH) libzsh.so
+ rm -f $@ libzsh.so
+ $(DLLINK) $(LIBOBJS) $(NLIST) $(LIBZSH_LIBS)
+ ln -s $(LIBZSH) libzsh.so
ansi2knr: ansi2knr.c
$(COMPILE) $(srcdir)/ansi2knr.c
--- zsh-3.1.2/configure.in.org Thu May 29 08:47:33 1997
+++ zsh-3.1.2/configure.in Thu Jul 3 12:49:53 1997
@@ -184,6 +184,12 @@
[ --enable-ansi2knr translate source to K&R C before compiling],
[ansi2knr="$enableval"], [ansi2knr=default])
+dnl If you have only static version of some libraries needed by ZSH
+AC_ARG_ENABLE(libhack,
+[ --enable-libhack if you have only static version of some libs;
+ used only if --enable-dynamic=yes],
+[libhack="$enableval"], [libhack=no])
+
dnl ------------------
dnl CHECK THE COMPILER
dnl ------------------
@@ -966,6 +972,9 @@
RTLD_GLOBAL_OK=$zsh_cv_sys_dynamic_rtld_global
zsh_SYS_DYNAMIC_EXECSYMS
if test "$zsh_cv_sys_dynamic_execsyms" != yes; then
+ if test "$libhack" = yes; then
+ LIBZSH_LIBS="$LIBS"
+ fi
L=L LIBS="$LIBS -L. -lzsh"
fi
zsh_SYS_DYNAMIC_STRIP_EXE
@@ -997,6 +1006,7 @@
AC_SUBST(DLLDFLAGS)dnl
AC_SUBST(EXTRA_LDFLAGS)dnl
AC_SUBST(L)dnl
+AC_SUBST(LIBZSH_LIBS)dnl
AC_SUBST(RTLD_GLOBAL_OK)dnl
AC_OUTPUT(Makefile Src/Makefile Src/Builtins/Makefile Src/Zle/Makefile \
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Patch to link dynamic zsh even if some libs are static
1997-07-03 9:55 Patch to link dynamic zsh even if some libs are static Andrej Borsenkow
@ 1997-07-03 16:14 ` Zoltan Hidvegi
0 siblings, 0 replies; 2+ messages in thread
From: Zoltan Hidvegi @ 1997-07-03 16:14 UTC (permalink / raw)
To: borsenkow.msk; +Cc: zsh-workers
> As long as I cannot make our developers to provide shared versions of all
> libs (Kosten Frage ;), here is very small patch to enable compilation
Why do not you make a shared curses yourself? Split the .a file to object
files, and link them to a shared library just as zsh creates libzsh.so.
Zoltan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1997-07-03 16:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-07-03 9:55 Patch to link dynamic zsh even if some libs are static Andrej Borsenkow
1997-07-03 16:14 ` Zoltan Hidvegi
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).