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

Re: PATCH: honor STRIPFLAGS for modules



> Does zsh_SEARCH_LIBS really need to do everything with AC_TRY_LINK_FUNC
> then - couldn't it just save and restore LIBS and use AC_SEARCH_LIBS?

It could.  I thought that this way would be cleaner.  How would you
determine what had been added by AC_SEARCH_LIBS in that event?

> That said, I haven't looked at your change in detail so may be missing
> the point. I agree with Andrej that we should be careful about these
> changes before 4.0.1 because of the potential to break the compile on a
> particular platform. It seems to be adding quite a bit of complexity. Do
> redundant libraries in LIBS matter much? If I remember correctly, IRIX
> displays a warning but doesn't actually link the library in.

Well, this does have the side effect of having -l{termcap,curses,ncurses}
being duplicated if they are one and the same for termcap and terminfo.

The issue was not redundant libraries, however; it was unused libraries.

Index: configure.in
===================================================================
RCS file: /cvsroot/zsh/zsh/configure.in,v
retrieving revision 1.45
diff -u -r1.45 configure.in
--- configure.in	2001/04/19 17:00:53	1.45
+++ configure.in	2001/04/19 17:43:12
@@ -898,7 +898,8 @@
   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 @@
   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_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 @@
 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}
Index: Config/defs.mk.in
===================================================================
RCS file: /cvsroot/zsh/zsh/Config/defs.mk.in,v
retrieving revision 1.5
diff -u -r1.5 defs.mk.in
--- Config/defs.mk.in	2001/04/19 14:45:41	1.5
+++ Config/defs.mk.in	2001/04/19 17:43:12
@@ -64,6 +64,7 @@
 IMPOPT          = @IMPOPT@
 
 # extra libraries
+MAINLIBS        = @MAINLIBS@
 LIBS_M          = @LIBS_M@
 LIBS_CAP        = @LIBS_CAP@
 LIBS_SOCKET     = @LIBS_SOCKET@
Index: Src/Makefile.in
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Makefile.in,v
retrieving revision 1.8
diff -u -r1.8 Makefile.in
--- Src/Makefile.in	2001/04/19 14:45:41	1.8
+++ Src/Makefile.in	2001/04/19 17:43:12
@@ -82,11 +82,11 @@
 
 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
Index: Src/Modules/cap.mdd
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Modules/cap.mdd,v
retrieving revision 1.4
diff -u -r1.4 cap.mdd
--- Src/Modules/cap.mdd	2001/04/19 17:00:53	1.4
+++ Src/Modules/cap.mdd	2001/04/19 17:43:12
@@ -6,4 +6,4 @@
 
 objects="cap.o"
 
-#extralibs="cap"
+extralibs="cap"
Index: Src/Modules/termcap.mdd
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Modules/termcap.mdd,v
retrieving revision 1.6
diff -u -r1.6 termcap.mdd
--- Src/Modules/termcap.mdd	2001/04/19 17:00:53	1.6
+++ Src/Modules/termcap.mdd	2001/04/19 17:43:12
@@ -16,4 +16,4 @@
 
 objects="termcap.o"
 
-#extralibs="termcap"
+extralibs="termcap"
Index: Src/Modules/terminfo.mdd
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Modules/terminfo.mdd,v
retrieving revision 1.8
diff -u -r1.8 terminfo.mdd
--- Src/Modules/terminfo.mdd	2001/04/19 17:00:53	1.8
+++ Src/Modules/terminfo.mdd	2001/04/19 17:43:12
@@ -17,4 +17,4 @@
 
 objects="terminfo.o"
 
-#extralibs="terminfo"
+extralibs="terminfo"
Index: Src/Modules/zftp.mdd
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Modules/zftp.mdd,v
retrieving revision 1.4
diff -u -r1.4 zftp.mdd
--- Src/Modules/zftp.mdd	2001/04/19 17:00:53	1.4
+++ Src/Modules/zftp.mdd	2001/04/19 17:43:12
@@ -7,4 +7,4 @@
 
 objects="zftp.o"
 
-#extralibs="socket"
+extralibs="socket"



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