* configure should have --with-ncurses and --with-ncursesw
@ 2006-12-18 14:38 Vincent Lefevre
2006-12-18 15:46 ` Peter Stephenson
0 siblings, 1 reply; 7+ messages in thread
From: Vincent Lefevre @ 2006-12-18 14:38 UTC (permalink / raw)
To: zsh-workers
Hi,
No-one commented on this. Zsh currently relies on curses compatibility
links. I think it should provide --with-ncurses and --with-ncursesw
configure options and be able to use the ncurses(w) API.
----- Forwarded message from Vincent Lefevre <vincent@vinc17.org> -----
Date: Tue, 24 Oct 2006 02:52:04 +0200
From: Vincent Lefevre <vincent@vinc17.org>
To: zsh-workers@sunsite.dk
Subject: configure should have --with-ncurses (was: zsh outputs "4m" lines
in eterm-color)
On 2006-10-24 02:38:51 +0200, Vincent Lefevre wrote:
> I wonder if this is due to the fact that zsh is linked to the ncurses
> in /usr/lib instead of /opt/local/lib (the problem cannot be reproduced
> with /opt/local/bin/tput); "otool -L =zsh" gives:
>
> /opt/local/bin/zsh:
> /opt/local/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)
> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.1.7)
> /usr/lib/libncurses.5.4.dylib (compatibility version 5.4.0, current version 5.4.0)
I now understand the problem. The library flags given in the zsh
configuration are -ltermcap or -lcurses (if --with-curses-terminfo
is used). And I have:
prunille:~> locate libcurses
/Developer/SDKs/MacOSX10.3.9.sdk/usr/lib/libcurses.dylib
/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/libcurses.dylib
/usr/lib/libcurses.dylib
prunille:~> locate libtermcap
/Developer/SDKs/MacOSX10.3.9.sdk/usr/lib/libtermcap.dylib
/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/libtermcap.dylib
/usr/lib/libtermcap.dylib
Both are a symbolic link to /usr/lib/libncurses.5.4.dylib.
I think that zsh should have --with-ncurses and --with-ncursesw
configure options, to be able to use the corresponding libraries.
(Alternatively, the ncurses and ncursesw MacPorts ports could add
compatibility symlinks, but I don't think that zsh should rely on
that.)
----- End forwarded message -----
--
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: configure should have --with-ncurses and --with-ncursesw 2006-12-18 14:38 configure should have --with-ncurses and --with-ncursesw Vincent Lefevre @ 2006-12-18 15:46 ` Peter Stephenson 2006-12-19 16:12 ` DervishD 0 siblings, 1 reply; 7+ messages in thread From: Peter Stephenson @ 2006-12-18 15:46 UTC (permalink / raw) To: Zsh hackers list Vincent Lefevre <vincent@vinc17.org> wrote: > No-one commented on this. That's probably because this is MAC-specific and nobody knew what it meant. > Zsh currently relies on curses compatibility > links. I think it should provide --with-ncurses and --with-ncursesw > configure options and be able to use the ncurses(w) API. I don't think there'll be any controversy if someone in a position to do so wants to provide configuration code to handle MAC-style libraries. I don't know what ncursesw is but from what you say it sounds like it requires internal changes. -- Peter Stephenson <pws@csr.com> Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070 To access the latest news from CSR copy this link into a web browser: http://www.csr.com/email_sig.php ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: configure should have --with-ncurses and --with-ncursesw 2006-12-18 15:46 ` Peter Stephenson @ 2006-12-19 16:12 ` DervishD 2006-12-19 16:22 ` Peter Stephenson 0 siblings, 1 reply; 7+ messages in thread From: DervishD @ 2006-12-19 16:12 UTC (permalink / raw) To: Peter Stephenson; +Cc: Zsh hackers list Hi Peter :) * Peter Stephenson <pws@csr.com> dixit: > Vincent Lefevre <vincent@vinc17.org> wrote: > > No-one commented on this. > > That's probably because this is MAC-specific and nobody knew what it > meant. Not at all, AFAIK. The ncursesw library can be used in any Linux, for example. > > Zsh currently relies on curses compatibility links. I think it > > should provide --with-ncurses and --with-ncursesw configure options > > and be able to use the ncurses(w) API. > > I don't think there'll be any controversy if someone in a position to do so > wants to provide configuration code to handle MAC-style libraries. I don't > know what ncursesw is but from what you say it sounds like it requires > internal changes. The ncursesw library is the wide-char interface to the ncurses library, or better said it is ncurses with wide-char support. As such, it is not a MAC only thing (but I don't know if Zsh needs this or not :??). Raúl Núñez de Arenas Coronado -- Linux Registered User 88736 | http://www.dervishd.net It's my PC and I'll cry if I want to... RAmen! ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: configure should have --with-ncurses and --with-ncursesw 2006-12-19 16:12 ` DervishD @ 2006-12-19 16:22 ` Peter Stephenson 2006-12-25 1:23 ` Vincent Lefevre 0 siblings, 1 reply; 7+ messages in thread From: Peter Stephenson @ 2006-12-19 16:22 UTC (permalink / raw) To: Zsh hackers list DervishD wrote: > Hi Peter :) > > * Peter Stephenson <pws@csr.com> dixit: > > Vincent Lefevre <vincent@vinc17.org> wrote: > > > No-one commented on this. > > > > That's probably because this is MAC-specific and nobody knew what it > > meant. > > Not at all, AFAIK. The ncursesw library can be used in any Linux, > for example. Indeed, I've got it here. The problem seems to be that in the case in question it's getting in the way for some reason and if we knew the whys and wherefores we could presumably avoid it. -- Peter Stephenson <pws@csr.com> Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070 To access the latest news from CSR copy this link into a web browser: http://www.csr.com/email_sig.php ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: configure should have --with-ncurses and --with-ncursesw 2006-12-19 16:22 ` Peter Stephenson @ 2006-12-25 1:23 ` Vincent Lefevre 2007-01-04 11:19 ` Peter Stephenson 0 siblings, 1 reply; 7+ messages in thread From: Vincent Lefevre @ 2006-12-25 1:23 UTC (permalink / raw) To: Zsh hackers list On 2006-12-19 16:22:38 +0000, Peter Stephenson wrote: > DervishD wrote: > > Hi Peter :) > > > > * Peter Stephenson <pws@csr.com> dixit: > > > Vincent Lefevre <vincent@vinc17.org> wrote: > > > > No-one commented on this. > > > > > > That's probably because this is MAC-specific and nobody knew what it > > > meant. > > > > Not at all, AFAIK. The ncursesw library can be used in any Linux, > > for example. > > Indeed, I've got it here. The problem seems to be that in the case in > question it's getting in the way for some reason and if we knew the whys > and wherefores we could presumably avoid it. The problem is that zsh uses the curses API by default, so that currently, the only way to use the ncurses library is to install curses compatibility link (ncurses doesn't install them, but Linux distributions and Mac OS X do). The problem occurs when the user wants to install a newer version of ncurses (from upstream) in /usr/local, /opt/local or whatever. As zsh uses curses by default, it uses the old ncurses library (which, in the case of Mac OS X, is buggy). To be able to use ncurses by default, I had to change the configure script: - termcap_curses_order="tinfo curses ncurses termcap" + termcap_curses_order="ncurses tinfo curses termcap" -- Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/> 100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/> Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon) ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: configure should have --with-ncurses and --with-ncursesw 2006-12-25 1:23 ` Vincent Lefevre @ 2007-01-04 11:19 ` Peter Stephenson 2007-01-05 13:51 ` Peter Stephenson 0 siblings, 1 reply; 7+ messages in thread From: Peter Stephenson @ 2007-01-04 11:19 UTC (permalink / raw) To: Zsh hackers list Vincent Lefevre <vincent@vinc17.org> wrote: > The problem is that zsh uses the curses API by default, so that > currently, the only way to use the ncurses library is to install > curses compatibility link (ncurses doesn't install them, but > Linux distributions and Mac OS X do). The problem occurs when > the user wants to install a newer version of ncurses (from > upstream) in /usr/local, /opt/local or whatever. As zsh uses > curses by default, it uses the old ncurses library (which, in > the case of Mac OS X, is buggy). > > To be able to use ncurses by default, I had to change the configure > script: > > - termcap_curses_order="tinfo curses ncurses termcap" > + termcap_curses_order="ncurses tinfo curses termcap" That looks harmless: I can't see why there might be a good reason for preferring curses to ncurses. I'll have a go at this when I'm back in normal operation (my home laptop power supply has died and I'm still reeling from being back at work). -- Peter Stephenson <pws@csr.com> Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070 To access the latest news from CSR copy this link into a web browser: http://www.csr.com/email_sig.php ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: configure should have --with-ncurses and --with-ncursesw 2007-01-04 11:19 ` Peter Stephenson @ 2007-01-05 13:51 ` Peter Stephenson 0 siblings, 0 replies; 7+ messages in thread From: Peter Stephenson @ 2007-01-05 13:51 UTC (permalink / raw) To: Zsh hackers list Peter Stephenson <pws@csr.com> wrote: > > To be able to use ncurses by default, I had to change the configure > > script: > > > > - termcap_curses_order="tinfo curses ncurses termcap" > > + termcap_curses_order="ncurses tinfo curses termcap" > > That looks harmless: I can't see why there might be a good reason for > preferring curses to ncurses. I'll have a go at this when I'm back in > normal operation (my home laptop power supply has died and I'm still > reeling from being back at work). OK, here is an attempt at doing this consistently. I've changed the search order. I've also changed the order in which we search for tigetflag (terminfo) and tgetent (termcap). The point of this is that if we find tigetflag in ncurses we then don't need to link against termcap as well. Much of the history of the termcap/terminfo/curses library search is probably irrelevant now, since we always try to link against terminfo in order to make the zsh/terminfo module to work and have done this for some time. I'm not sure we need --with-curses-terminfo any more. This now makes my Fedora system link against -lncurses, instead of -lcurses -ltermcap. Index: configure.ac =================================================================== RCS file: /cvsroot/zsh/zsh/configure.ac,v retrieving revision 1.60 diff -u -r1.60 configure.ac --- configure.ac 4 Dec 2006 11:24:10 -0000 1.60 +++ configure.ac 5 Jan 2007 13:05:47 -0000 @@ -637,20 +637,24 @@ AC_CHECK_LIB(m, pow) dnl Prefer BSD termcap library to SysV curses library, except on certain -dnl SYSV-derived systems. +dnl SYSV-derived systems. However, if we find terminfo and termcap +dnl stuff in the same library we will use that; typically this +dnl is ncurses or curses. dnl On HPUX, Hcurses is reported to work better than curses. +dnl Prefer ncurses to curses on all systems; prefer it to tinfo +dnl if we were told to use curses. tinfo isn't very common now. AC_ARG_WITH(curses-terminfo, AC_HELP_STRING([--with-curses-terminfo], [use terminfo support from curses library]), [if test x$withval = xyes; then - termcap_curses_order="tinfo curses ncurses termcap" + termcap_curses_order="ncurses tinfo curses termcap" AC_SEARCH_LIBS(tigetstr, [$termcap_curses_order]) else - termcap_curses_order="tinfo termcap curses ncurses" + termcap_curses_order="tinfo termcap ncurses curses" fi], [case "$host_os" in hpux10.*|hpux11.*|solaris*) - termcap_curses_order="Hcurses curses ncurses termcap" ;; - *) termcap_curses_order="tinfo termcap curses ncurses" ;; + termcap_curses_order="Hcurses ncurses curses termcap" ;; + *) termcap_curses_order="tinfo termcap ncurses curses" ;; esac])dnl AH_TEMPLATE([HAVE_BOOLCODES], @@ -667,8 +671,13 @@ [Define if you have the terminfo strnames symbol.]) AH_TEMPLATE([TERM_H_NEEDS_CURSES_H], [Define if term.h chokes without curses.h.]) -AC_SEARCH_LIBS(tgetent, [$termcap_curses_order]) +dnl Check for tigetflag (terminfo) before tgetent (termcap). +dnl That's so that on systems where termcap and [n]curses are +dnl both available and both contain termcap functions, while +dnl only [n]curses contains terminfo functions, we only link against +dnl [n]curses. AC_SEARCH_LIBS(tigetflag, [$termcap_curses_order]) +AC_SEARCH_LIBS(tgetent, [$termcap_curses_order]) AC_CHECK_HEADERS(curses.h, [], [AC_CACHE_CHECK(for Solaris 8 curses.h mistake, ac_cv_header_curses_solaris, AC_TRY_COMPILE([#include <curses.h>], [], -- Peter Stephenson <pws@csr.com> Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070 To access the latest news from CSR copy this link into a web browser: http://www.csr.com/email_sig.php ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2007-01-05 13:52 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2006-12-18 14:38 configure should have --with-ncurses and --with-ncursesw Vincent Lefevre 2006-12-18 15:46 ` Peter Stephenson 2006-12-19 16:12 ` DervishD 2006-12-19 16:22 ` Peter Stephenson 2006-12-25 1:23 ` Vincent Lefevre 2007-01-04 11:19 ` Peter Stephenson 2007-01-05 13:51 ` Peter Stephenson
Code repositories for project(s) associated with this public inbox https://git.vuxu.org/mirror/zsh/ This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).