1
0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-09-20 10:53:29 +02:00

14041: reduce unnecessary linking for modules

This commit is contained in:
Clint Adams 2001-04-19 17:55:02 +00:00
parent 28fe9e6027
commit 3b09ee496a
8 changed files with 23 additions and 14 deletions

View File

@ -1,5 +1,10 @@
2001-04-19 Clint Adams <schizo@debian.org>
* 14041: configure.in, Config/defs.mk.in, Src/Makefile.in,
Src/Modules/cap.mdd, Src/Modules/termcap.mdd,
Src/Modules/terminfo.mdd, Src/Modules/zftp.mdd:
only link modules against needed libraries.
* 14039: configure.in, Config/defs.mk.in, Src/zsh.mdd,
Src/Modules/cap.mdd, Src/Modules/termcap.mdd,
Src/Modules/terminfo.mdd, Src/Modules/zftp.mdd:

View File

@ -64,6 +64,7 @@ EXPOPT = @EXPOPT@
IMPOPT = @IMPOPT@
# extra libraries
MAINLIBS = @MAINLIBS@
LIBS_M = @LIBS_M@
LIBS_CAP = @LIBS_CAP@
LIBS_SOCKET = @LIBS_SOCKET@

View File

@ -82,11 +82,11 @@ EXTRAZSHOBJS = @EXTRAZSHOBJS@
zsh$(EXEEXT): $(@L@IBZSH) $(@L@STMP) $(MAIN_OBJS) zsh.export $(EXTRAZSHOBJS)
rm -f $@
$(@L@DRUNPATH) $(LINK) $(MAIN_OBJS) $(EXTRAZSHOBJS) $(@L@LIST) $(ZSH_@E@XPORT) $(@L@IBZSH) $(LIBS_M) $(LIBS_TERMCAP) $(LIBS_YP) $(LIBS)
$(@L@DRUNPATH) $(LINK) $(MAIN_OBJS) $(EXTRAZSHOBJS) $(@L@LIST) $(ZSH_@E@XPORT) $(@L@IBZSH) $(MAINLIBS)
$(LIBZSH): $(LIBOBJS) $(NSTMP)
rm -f $@
$(DLLINK) $(LIBOBJS) $(NLIST) $(LIBS_M) $(LIBS_TERMCAP) $(LIBS)
$(DLLINK) $(LIBOBJS) $(NLIST) $(MAINLIBS)
zsh.res.o: $(sdir)/zsh.rc $(sdir)/zsh.ico
windres -O coff --include-dir $(sdir) -i $(sdir)/zsh.rc -o zsh.res.o

View File

@ -6,4 +6,4 @@ autobins="cap getcap setcap"
objects="cap.o"
#extralibs="cap"
extralibs="cap"

View File

@ -16,4 +16,4 @@ autobins="echotc"
objects="termcap.o"
#extralibs="termcap"
extralibs="termcap"

View File

@ -17,4 +17,4 @@ autoparams="terminfo"
objects="terminfo.o"
#extralibs="terminfo"
extralibs="terminfo"

View File

@ -7,4 +7,4 @@ autobins="zftp"
objects="zftp.o"
#extralibs="socket"
extralibs="socket"

View File

@ -898,7 +898,8 @@ if test $zsh_cv_func_tgetent_accepts_null = yes; then
AC_DEFINE(TGETENT_ACCEPTS_NULL)
fi
LIBS="$LIBS_CAP $LIBS_SOCKET $LIBS_M $LIBS_TERMCAP $LIBS_TERMINFO $LIBS_YP $SAVELIBS"
MAINLIBS="$LIBS_CAP $LIBS_SOCKET $LIBS_M $LIBS_TERMCAP $LIBS_TERMINFO $LIBS_YP $SAVELIBS"
LIBS=$SAVELIBS
AC_FUNC_MMAP
if test x$ac_cv_func_mmap_fixed_mapped = xyes; then
@ -1688,16 +1689,16 @@ if test "x$dynamic" = xyes; then
test "$zsh_cv_shared_environ" = yes || dynamic=no
dnl test "$zsh_cv_sys_dynamic_broken" = no || dynamic=no
if test "$ac_cv_func_tgetent" = yes; then
# SAVELIBS=$LIBS
# LIBS="$LIBS_TERMCAP $LIBS"
SAVELIBS=$LIBS
LIBS="$LIBS_TERMCAP $LIBS"
zsh_SHARED_FUNCTION([tgetent])
# LIBS=$SAVELIBS
LIBS=$SAVELIBS
fi
if test "$ac_cv_func_tigetstr" = yes; then
# SAVELIBS=$LIBS
# LIBS="$LIBS_TERMINFO $LIBS"
SAVELIBS=$LIBS
LIBS="$LIBS_TERMINFO $LIBS"
zsh_SHARED_FUNCTION([tigetstr])
# LIBS=$SAVELIBS
LIBS=$SAVELIBS
fi
fi
@ -1771,6 +1772,7 @@ AC_SUBST(MOD_EXPORT)dnl
AC_SUBST(MOD_IMPORT_VARIABLE)dnl
AC_SUBST(MOD_IMPORT_FUNCTION)dnl
AC_SUBST(EXTRAZSHOBJS)dnl
AC_SUBST(MAINLIBS)dnl
AC_SUBST(LIBS_M)dnl
AC_SUBST(LIBS_CAP)dnl
AC_SUBST(LIBS_SOCKET)dnl
@ -1927,7 +1929,8 @@ if test "$dynamic" = yes; then
module linker flags : ${LDFLAGS} ${LIBLDFLAGS} ${DLLDFLAGS}"
fi
echo "\
library flags : ${LIBS}
main library flags : ${MAINLIBS}
base library flags : ${LIBS}
installation basename : ${tzsh_name}
binary install path : ${zshbin2}
man page install path : ${zshman}