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

Re: PATCH: honor STRIPFLAGS for modules

Clint Adams wrote:
> > 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

If it's a choice between configure or configure.in being cleaner, I'd
favour keeping configure.in cleaner because it is the one which has to
be understood by humans. I envisioned zsh_SEARCH_LIBS as just being save
LIBS, call AC_SEARCH_LIBS, restore LIBS making it simpler but I probably
am missing half its point such as if it needs to know what was added to

> determine what had been added by AC_SEARCH_LIBS in that event?

On the basis that we're limited to compatible /bin/sh code, comparing
SAVELIBS to LIBS isn't easy so fair enough.

> 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.

I'm not sure that I understand the difference. I only just realised that
on Linux termcap and curses are symlinked - yuk. So I guess the initial
patch was removing the duplicates by doing symbol searches to detect if
termcap/curses are one and the same which is fair enough provided there
is some tangible benefit of not linking both. If you say it makes a
difference on Linux then fine. I'm just not clear on why it was an
improvement other than possibly making the compile system cleaner. If
I'm asking stupid questions, ignore me: normally I'd have assumed you
know what you're doing and kept quiet if I didn't fully understand but
in this case I'm afraid I didn't.

So, this latest patch seems to be separating LIBS, and MAINLIBS for DSOs
and the main zsh binary - right? It sounds to me from the discussion
though that we almost need a separate $LIBS for every single module
though which is a bit worrying. Is the initial thing which has sparked
this off that the termcap/terminfo modules are the first modules which
are using libraries which the main zsh never previously loaded? Could
LIBS maybe remain just the common libraries and we then add the extra
libraries for the termcap module only?

Also, a while back when you implemented ${(k)terminfo} you asked if you
should also do this for termcap. Sorry if this is already done but if
not, I'd just like to add my vote in favour, even if you need to
constant table of termcap codes - it'd be useful.


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