[llvm] r187874 - Add support for linking against a curses library when available and

Chandler Carruth chandlerc at google.com
Mon Aug 12 02:56:43 PDT 2013


On Thu, Aug 8, 2013 at 4:36 AM, Joerg Sonnenberger
<joerg at britannica.bec.de>wrote:

> On Wed, Aug 07, 2013 at 01:00:16PM -0700, Chandler Carruth wrote:
> > On Wed, Aug 7, 2013 at 12:23 PM, Joerg Sonnenberger <
> joerg at britannica.bec.de
> > > wrote:
> >
> > > On Wed, Aug 07, 2013 at 08:47:36AM -0000, Chandler Carruth wrote:
> > > > Log:
> > > > Add support for linking against a curses library when available and
> > > > using it to detect whether or not a terminal supports colors.
> > >
> > > I think it would preferable to use terminfo or termcap directly for
> > > this. The former exists at least on every system with ncurses and
> NetBSD
> > > 6+, the latter on another range of systems. All curses implementations
> I
> > > am aware of pull one of those two libraries in, but add more junk on
> > > top. I don't see any need for supporting termcap for optional colour
> > > support, so just going with terminfo sounds fine.
> >
> >
> > What specific library are you suggesting?
>
> Terminfo.
>

There is no portable terminfo library. Most Unix systems I've been able to
test on don't have a stand-alone library.


> > I'm unable to find a library/API for terminfo directly, and instead
> > find just the specs for its database format.
>
> http://netbsd.gw.com/cgi-bin/man-cgi?terminfo++NetBSD-current
>
> should apply to both ncurses and NetBSD's terminfo implementation.
>

Ah, NetBSD has a standalone terminfo library. Turns out ncurses grew
support for building its terminfo bits as a standalone 'tinfo' library at
some point, and I've locally used this to figure out how to do this. As of
r188160 we should be using strictly the terminfo querying interfaces, and I
think you should be able to easily teach the configure and cmake bits to
recognize the netbsd library. I don't want to do this myself as I can't
even sanity check it and I'm not aware of a netbsd build bot host that
would tell me if i got it wrong. Let me know if you need help crafting the
patch for this though.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130812/fe620658/attachment.html>


More information about the llvm-commits mailing list