Re: tin modifies terminal settings

clemens fischer <[email protected]> Fri, 02 Apr 2010 22:11:33 +0200
Newsgroups gmane.network.tin.user
Message-ID <[email protected]>
Thomas Dickey wrote:

> On Thu, 1 Apr 2010, clemens fischer wrote:
>
>> Dennis Preiser wrote:
>>
>>> On Thu, Apr 01, 2010 at 08:06:54PM +0200, clemens fischer wrote:
>>>>   $ ncursesw5-config --version -> 5.7.20081102
>>>>   $ ncursesw5-config --abi-version -> 5
>>>>
>>>>   $ tin -V
>>>>   Version: tin 1.9.6 release 20100313 ("Lochruan") Mar 29 2010 22:46:39
>>>>   Platform:
>>>>           OS-Name  = "linux-gnu"
>>>>   Compiler:
>>>>           CC       = "gcc"
>>>>           CFLAGS   = "-g -O"
>>>>           CPP      = "gcc -E"
>>>>           CPPFLAGS = "-D_GNU_SOURCE"
>>>>   Linker and Libraries:
>>>>           LD       = "gcc"
>>>>           LDFLAGS  = "-g"
>>>>           LIBS     = "-lcurses   -lidn -licuuc"
>>>                          ^^^^^^
>>> You could try to link against ncursesw.
>>>
>>> ./configure [...] --with-screen=ncursesw
>>
>> Ok, this is what I tried and it fixed my problem.  But why is ncursesw
>> not the default if available on the system?  I'd tend to consider this
>> a bug.
>
> More than one reason - tin's configuring against the system libraries
> which may not be ncurses anyway.  Also, because ncurses often is not
> the system library, there are special features in the configure script
> needed to detect it properly.

On my system (arch-linux) the systems curses lib is actually
libncursesw, but all combinations of curses, cursesw, ncurses and
ncursesw exist, in any form:

  $ ll /lib/*curs* /usr/lib/*curs*
    607 lrwxrwxrwx 1 root root ?   18 Nov 14  2008 /lib/libncursesw.so.5 -> libncursesw.so.5.7*
    719 -rwxr-xr-x 1 root root ? 338K Nov 14  2008 /lib/libncursesw.so.5.7*
  18471 lrwxrwxrwx 1 root root ?   12 Nov 14  2008 /usr/lib/libcurses.a -> libncurses.a
  18472 lrwxrwxrwx 1 root root ?   13 Nov 14  2008 /usr/lib/libcurses.so -> libncurses.so
  18473 lrwxrwxrwx 1 root root ?   13 Nov 14  2008 /usr/lib/libcursesw.a -> libncursesw.a
  20857 -rw-r--r-- 1 root root ?   18 Nov 14  2008 /usr/lib/libcursesw.so
  18817 lrwxrwxrwx 1 root root ?   13 Nov 14  2008 /usr/lib/libncurses.a -> libncursesw.a
  18816 lrwxrwxrwx 1 root root ?   15 Nov 14  2008 /usr/lib/libncurses++.a -> libncurses++w.a
  21165 -rw-r--r-- 1 root root ?   18 Nov 14  2008 /usr/lib/libncurses.so
  18818 lrwxrwxrwx 1 root root ?   17 Nov 14  2008 /usr/lib/libncurses.so.5 -> libncurses.so.5.7*
  21166 -rwxr-xr-x 1 root root ? 286K Nov 14  2008 /usr/lib/libncurses.so.5.7*
  21164 -rw-r--r-- 1 root root ? 141K Nov 14  2008 /usr/lib/libncurses++w.a
  21167 -rw-r--r-- 1 root root ? 464K Nov 14  2008 /usr/lib/libncursesw.a
  18819 lrwxrwxrwx 1 root root ?   26 Nov 14  2008 /usr/lib/libncursesw.so -> ../../lib/libncursesw.so.5*
  20581 -rw-r--r-- 1 root root ?  36K Sep  4  2009 /usr/lib/libXcursor.a
  17855 lrwxrwxrwx 1 root root ?   19 Sep  4  2009 /usr/lib/libXcursor.so -> libXcursor.so.1.0.2*
  17856 lrwxrwxrwx 1 root root ?   19 Sep  4  2009 /usr/lib/libXcursor.so.1 -> libXcursor.so.1.0.2*
  20582 -rwxr-xr-x 1 root root ?  39K Sep  4  2009 /usr/lib/libXcursor.so.1.0.2*

  $ g . /usr/lib/libncurses.so /usr/lib/libcursesw.so
  /usr/lib/libncurses.so:INPUT(-lncursesw)
  /usr/lib/libcursesw.so:INPUT(-lncursesw)

So I can believe it's not the easiest job to autoconf this portably.


clemens