<div dir="ltr">On Thu, Aug 8, 2013 at 4:36 AM, Joerg Sonnenberger <span dir="ltr"><<a href="mailto:joerg@britannica.bec.de" target="_blank" class="cremed">joerg@britannica.bec.de</a>></span> wrote:<br><div class="gmail_extra">
<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Wed, Aug 07, 2013 at 01:00:16PM -0700, Chandler Carruth wrote:<br>
> On Wed, Aug 7, 2013 at 12:23 PM, Joerg Sonnenberger <<a href="mailto:joerg@britannica.bec.de" class="cremed">joerg@britannica.bec.de</a><br>
> > wrote:<br>
><br>
> > On Wed, Aug 07, 2013 at 08:47:36AM -0000, Chandler Carruth wrote:<br>
> > > Log:<br>
> > > Add support for linking against a curses library when available and<br>
> > > using it to detect whether or not a terminal supports colors.<br>
> ><br>
> > I think it would preferable to use terminfo or termcap directly for<br>
> > this. The former exists at least on every system with ncurses and NetBSD<br>
> > 6+, the latter on another range of systems. All curses implementations I<br>
> > am aware of pull one of those two libraries in, but add more junk on<br>
> > top. I don't see any need for supporting termcap for optional colour<br>
> > support, so just going with terminfo sounds fine.<br>
><br>
><br>
> What specific library are you suggesting?<br>
<br>
</div>Terminfo.<br></blockquote><div><br></div><div>There is no portable terminfo library. Most Unix systems I've been able to test on don't have a stand-alone library.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="im">> I'm unable to find a library/API for terminfo directly, and instead<br>
> find just the specs for its database format.<br>
<br>
</div><a href="http://netbsd.gw.com/cgi-bin/man-cgi?terminfo++NetBSD-current" target="_blank" class="cremed">http://netbsd.gw.com/cgi-bin/man-cgi?terminfo++NetBSD-current</a><br>
<br>
should apply to both ncurses and NetBSD's terminfo implementation.<br></blockquote><div><br></div><div>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.</div>
</div></div></div>