summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Config/defs.mk.in1
-rw-r--r--Src/Makefile.in4
-rw-r--r--Src/Modules/cap.mdd2
-rw-r--r--Src/Modules/termcap.mdd2
-rw-r--r--Src/Modules/terminfo.mdd2
-rw-r--r--Src/Modules/zftp.mdd2
-rw-r--r--configure.in19
8 files changed, 23 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog
index ac73b2132..d9f67e3a4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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:
diff --git a/Config/defs.mk.in b/Config/defs.mk.in
index eb0d6a5e1..6a9af5db0 100644
--- a/Config/defs.mk.in
+++ b/Config/defs.mk.in
@@ -64,6 +64,7 @@ EXPOPT          = @EXPOPT@
 IMPOPT          = @IMPOPT@
 
 # extra libraries
+MAINLIBS        = @MAINLIBS@
 LIBS_M          = @LIBS_M@
 LIBS_CAP        = @LIBS_CAP@
 LIBS_SOCKET     = @LIBS_SOCKET@
diff --git a/Src/Makefile.in b/Src/Makefile.in
index 5126a2b7c..2fd48a151 100644
--- a/Src/Makefile.in
+++ b/Src/Makefile.in
@@ -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
diff --git a/Src/Modules/cap.mdd b/Src/Modules/cap.mdd
index df4a52c4c..0393f7f38 100644
--- a/Src/Modules/cap.mdd
+++ b/Src/Modules/cap.mdd
@@ -6,4 +6,4 @@ autobins="cap getcap setcap"
 
 objects="cap.o"
 
-#extralibs="cap"
+extralibs="cap"
diff --git a/Src/Modules/termcap.mdd b/Src/Modules/termcap.mdd
index f50fb59a1..4c33f5690 100644
--- a/Src/Modules/termcap.mdd
+++ b/Src/Modules/termcap.mdd
@@ -16,4 +16,4 @@ autobins="echotc"
 
 objects="termcap.o"
 
-#extralibs="termcap"
+extralibs="termcap"
diff --git a/Src/Modules/terminfo.mdd b/Src/Modules/terminfo.mdd
index 2525eda57..0eca9ddfb 100644
--- a/Src/Modules/terminfo.mdd
+++ b/Src/Modules/terminfo.mdd
@@ -17,4 +17,4 @@ autoparams="terminfo"
 
 objects="terminfo.o"
 
-#extralibs="terminfo"
+extralibs="terminfo"
diff --git a/Src/Modules/zftp.mdd b/Src/Modules/zftp.mdd
index 504984ed2..0e11a72d6 100644
--- a/Src/Modules/zftp.mdd
+++ b/Src/Modules/zftp.mdd
@@ -7,4 +7,4 @@ autobins="zftp"
 
 objects="zftp.o"
 
-#extralibs="socket"
+extralibs="socket"
diff --git a/configure.in b/configure.in
index 006a45e93..2da58cf69 100644
--- a/configure.in
+++ b/configure.in
@@ -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}