<div dir="ltr">Actually, I just looked at the cmake code and it checks a list of libraries, i.e., tinfo, terminfo, curses, ncurses, and ncursesw.  If any of them have setupterm, it will define HAVE_TERMINFO 1.  <div><br></div><div>So, at least that give you something to check.</div><div><br></div><div>hth...</div><div>don</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 10, 2015 at 12:06 PM, don hinton <span dir="ltr"><<a href="mailto:hintonda@gmail.com" target="_blank">hintonda@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I meant the headers.  If you use cmake, take a look at cmake/config-ix.cmake.  Configure does something similar. <div><br></div><div>Basically, if it finds the right headers, it will #define HAS_TERMINFO, and the code that checks it is terminalHasColors() in lib/Support/Unix/Process.inc.<br><div><br></div></div><div>Not sure how gcc checks.</div><div><br></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 10, 2015 at 11:58 AM, Victor <span dir="ltr"><<a href="mailto:d.v.a@ngs.ru" target="_blank">d.v.a@ngs.ru</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Did you build clang?<br>
</blockquote>
Yes<span><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Do you have terminfo installed?<br>
</blockquote></span>
$ find /usr/share/terminfo -type f<br>
/usr/share/terminfo/k/kon2<br>
/usr/share/terminfo/k/kon<br>
/usr/share/terminfo/k/konsole-256color<br>
/usr/share/terminfo/k/konsole<br>
/usr/share/terminfo/v/vs100<br>
/usr/share/terminfo/c/cygwin<br>
/usr/share/terminfo/c/cons25<br>
/usr/share/terminfo/t/teraterm2.3<br>
/usr/share/terminfo/t/teraterm<br>
/usr/share/terminfo/g/gnome<br>
/usr/share/terminfo/g/gnome-256color<br>
/usr/share/terminfo/w/wsvt25<br>
/usr/share/terminfo/w/wsvt25m<br>
/usr/share/terminfo/n/nxterm<br>
/usr/share/terminfo/n/nsterm<br>
/usr/share/terminfo/m/mrxvt<br>
/usr/share/terminfo/m/mach<br>
/usr/share/terminfo/m/mach-bold<br>
/usr/share/terminfo/m/mach-color<br>
/usr/share/terminfo/m/mlterm<br>
/usr/share/terminfo/E/Eterm-88color<br>
/usr/share/terminfo/E/Eterm-256color<br>
/usr/share/terminfo/E/Eterm<br>
/usr/share/terminfo/E/Eterm-color<br>
/usr/share/terminfo/a/aterm<br>
/usr/share/terminfo/a/ansis<br>
/usr/share/terminfo/a/ansi80x25<br>
/usr/share/terminfo/p/putty-vt100<br>
/usr/share/terminfo/p/pcansi<br>
/usr/share/terminfo/p/putty-256color<br>
/usr/share/terminfo/p/putty<br>
/usr/share/terminfo/s/screen.xterm-new<br>
/usr/share/terminfo/s/sun<br>
/usr/share/terminfo/s/screen-16color-bce<br>
/usr/share/terminfo/s/screen-16color-s<br>
/usr/share/terminfo/s/screen-16color-bce-s<br>
/usr/share/terminfo/s/sun1<br>
/usr/share/terminfo/s/screen<br>
/usr/share/terminfo/s/screen.rxvt<br>
/usr/share/terminfo/s/sun2<br>
/usr/share/terminfo/s/screen.linux<br>
/usr/share/terminfo/s/screen-256color-bce<br>
/usr/share/terminfo/s/screen-16color<br>
/usr/share/terminfo/s/screen-256color-s<br>
/usr/share/terminfo/s/screen.xterm-xfree86<br>
/usr/share/terminfo/s/screen-256color-bce-s<br>
/usr/share/terminfo/s/screen.teraterm<br>
/usr/share/terminfo/s/screen-bce<br>
/usr/share/terminfo/s/screen-s<br>
/usr/share/terminfo/s/screen.mlterm<br>
/usr/share/terminfo/s/screen-w<br>
/usr/share/terminfo/s/screen.xterm-r6<br>
/usr/share/terminfo/s/screen-256color<br>
/usr/share/terminfo/s/screen.Eterm<br>
/usr/share/terminfo/j/jfbterm<br>
/usr/share/terminfo/h/hurd<br>
/usr/share/terminfo/r/rxvt-color<br>
/usr/share/terminfo/r/rxvt-xpm<br>
/usr/share/terminfo/r/rxvt-unicode<br>
/usr/share/terminfo/r/rxvt-basic<br>
/usr/share/terminfo/r/rxvt<br>
/usr/share/terminfo/r/rxvt-88color<br>
/usr/share/terminfo/r/rxvt-16color<br>
/usr/share/terminfo/r/rxvt-cygwin-native<br>
/usr/share/terminfo/r/rxvt-256color<br>
/usr/share/terminfo/r/rxvt-cygwin<br>
/usr/share/terminfo/x/xterm-xf86-v32<br>
/usr/share/terminfo/x/xterm-xi<br>
/usr/share/terminfo/x/xterm-r5<br>
/usr/share/terminfo/x/xterm-vt220<br>
/usr/share/terminfo/x/xterm-new<br>
/usr/share/terminfo/x/xterm-sun<br>
/usr/share/terminfo/x/xterm-nic<br>
/usr/share/terminfo/x/xterm-8bit<br>
/usr/share/terminfo/x/xterm-old<br>
/usr/share/terminfo/x/xterm-hp<br>
/usr/share/terminfo/x/xterm-color<br>
/usr/share/terminfo/x/xterm-256color<br>
/usr/share/terminfo/x/xterm-pcolor<br>
/usr/share/terminfo/x/xterm-basic<br>
/usr/share/terminfo/x/xterm-noapp<br>
/usr/share/terminfo/x/xterm-24<br>
/usr/share/terminfo/x/xterm-bold<br>
/usr/share/terminfo/x/xterms<br>
/usr/share/terminfo/x/xterm<br>
/usr/share/terminfo/x/xterm-1003<br>
/usr/share/terminfo/x/xterm-sco<br>
/usr/share/terminfo/x/xterm-1002<br>
/usr/share/terminfo/x/xterm-vt52<br>
/usr/share/terminfo/x/xterm-16color<br>
/usr/share/terminfo/x/xterm-r6<br>
/usr/share/terminfo/x/xterm-xf86-v44<br>
/usr/share/terminfo/x/xfce<br>
/usr/share/terminfo/x/xterm-xf86-v333<br>
/usr/share/terminfo/x/xterm-88color<br>
/usr/share/terminfo/x/xterm-xfree86<br>
/usr/share/terminfo/x/xterm-xf86-v43<br>
/usr/share/terminfo/x/xterm-xf86-v40<br>
/usr/share/terminfo/x/xterm-xf86-v33<br>
/usr/share/terminfo/e/eterm<br>
/usr/share/terminfo/e/eterm-color<br>
/usr/share/terminfo/A/Apple_Terminal<br>
<br>
On Thu, 10 Sep 2015 11:53:48 -0400<div><div><br>
 don hinton <<a href="mailto:hintonda@gmail.com" target="_blank">hintonda@gmail.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Did you build clang?  Do you have terminfo installed?  I think that's what<br>
it checks.<br>
<br>
On Thu, Sep 10, 2015 at 11:49 AM, Victor <<a href="mailto:d.v.a@ngs.ru" target="_blank">d.v.a@ngs.ru</a>> wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
No. Still no luck. Tried both<br>
<br>
<br>
On Thu, 10 Sep 2015 11:39:24 -0400<br>
 don hinton <<a href="mailto:hintonda@gmail.com" target="_blank">hintonda@gmail.com</a>> wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Victor:<br>
<br>
Try setting TERM to a color terminal, e.g., xterm-color or xterm-256color<br>
and see if that helps.  I use xterm-256color inside tmux and it works<br>
fine.<br>
<br>
hth...<br>
don<br>
<br>
On Thu, Sep 10, 2015 at 2:40 AM, Victor via cfe-users <<br>
<a href="mailto:cfe-users@lists.llvm.org" target="_blank">cfe-users@lists.llvm.org</a>> wrote:<br>
<br>
I'm using command like this:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
$ clang++ prg.cpp<br>
<br>
My Clang is built from sources. What libraries it needs to use colors<br>
automatically? Or may be there is some option that I can specify for<br>
configure?<br>
<br>
<br>
On Wed, 9 Sep 2015 19:49:21 -0700<br>
 Richard Trieu <<a href="mailto:rtrieu@google.com" target="_blank">rtrieu@google.com</a>> wrote:<br>
<br>
Are you invoking Clang with "clang foo.cc" or "clang -cc1 foo.cc"?  The<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
first should detect if you have a color capable terminal and<br>
automatically<br>
turn on color diagnostics while the second needs the flag explicitly.<br>
The<br>
other possibility is that the Clang you are using was compiled with the<br>
libraries needed to detect a color terminal, and defaults to no color.<br>
<br>
On Mon, Sep 7, 2015 at 5:15 AM, Victor via cfe-users <<br>
<a href="mailto:cfe-users@lists.llvm.org" target="_blank">cfe-users@lists.llvm.org</a>> wrote:<br>
<br>
Hello, all.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Why doesn't clang use colors for diagnostics by default?<br>
My environment:<br>
<br>
$ cat /etc/*-release<br>
Red Hat Enterprise Linux Server release 6.3 (Santiago)<br>
<br>
$ echo $TERM<br>
xterm<br>
<br>
Doc here<br>
<a href="http://clang.llvm.org/docs/UsersManual.html#formatting-of-diagnostics" rel="noreferrer" target="_blank">http://clang.llvm.org/docs/UsersManual.html#formatting-of-diagnostics</a><br>
says: "This option, which defaults to on when a color-capable terminal<br>
is<br>
detected". Isn't xterm "a color-capable terminal"?<br>
<br>
If I give -fcolor-diagnostics explicitly, all works as expected. But<br>
why<br>
must I do that? GCC uses colors by default.<br>
_______________________________________________<br>
cfe-users mailing list<br>
<a href="mailto:cfe-users@lists.llvm.org" target="_blank">cfe-users@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users</a><br>
<br>
<br>
_______________________________________________<br>
</blockquote></blockquote>
cfe-users mailing list<br>
<a href="mailto:cfe-users@lists.llvm.org" target="_blank">cfe-users@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users</a><br>
<br>
<br>
</blockquote></blockquote>
<br>
</blockquote></blockquote>
<br>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>