* Re: zsh-4.3.4-dev-2.tar.gz [not found] ` <4742E805.5030402@math.technion.ac.il> @ 2007-11-20 14:08 ` Peter Stephenson 0 siblings, 0 replies; 8+ messages in thread From: Peter Stephenson @ 2007-11-20 14:08 UTC (permalink / raw) To: Zsh hackers list "Zvi Har'El" wrote: > One problem that I have found is that zsh-4.3.4-dev-2/Doc/zsh.texi is > older than the CVS HEAD, and still refers to the dev-1 version: That should be fixed when I regenerate the docs fully for the proper release, but it looks like the dependencies are screwy. (Actually, all make dependencies in every system I know are screwy, but at least we can fix this one.) Index: Doc/Makefile.in =================================================================== RCS file: /cvsroot/zsh/zsh/Doc/Makefile.in,v retrieving revision 1.37 diff -u -r1.37 Makefile.in --- Doc/Makefile.in 14 Oct 2007 17:14:22 -0000 1.37 +++ Doc/Makefile.in 20 Nov 2007 14:06:48 -0000 @@ -106,7 +106,7 @@ texi: $(sdir)/zsh.texi .PHONY: texi -$(sdir)/zsh.texi: +$(sdir)/zsh.texi: version.yo $(YODL) -o $@ -I$(sdir) -w ztexi.yo version.yo zsh.yo; \ test -f $@ -- 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 ^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <4742DC87.5030901@math.technion.ac.il>]
* Re: zsh-4.3.4-dev-2.tar.gz [not found] ` <4742DC87.5030901@math.technion.ac.il> @ 2007-11-20 14:14 ` Peter Stephenson 2007-11-20 15:03 ` zsh-4.3.4-dev-2.tar.gz Zvi Har'El 0 siblings, 1 reply; 8+ messages in thread From: Peter Stephenson @ 2007-11-20 14:14 UTC (permalink / raw) To: Zsh Hackers' List On Tue, 20 Nov 2007 15:09:27 +0200 "Zvi Har'El" <rl@math.technion.ac.il> wrote: > Another problem. I have two Solaris systems, 2.8 and 2.9. The tar, as > well as the CVS Head, do not build. Last time I was able to build was, > from the Head > > -rwxr-xr-x 2 root root 548196 2007-11-08 10:24:53.000000000 +0200 > /usr/local/bin/zsh > > The I have in these systems, in addition to Solaris's curses, also gnu > ncurses 5.6 (installed at /usr/local). For some reason, configure finds > ncursesw.so but doesn't find ncurses.h. I attach config.log and > config.h. Thanks. We shouldn't search the ncurses library if we haven't found the ncurses header. Obviously it's better to find the header, but the shell may need help doing that. I've added a note to the installation instructions. The last hunk was supposed to add "-expect_unresolved '*'" to DLLDFLAGS on Tru64 Unix, but the mail I sent seems to have gone astray. I haven't tested this. The idea that the OS still appeared to autoconf as osf* was suggested by Google but I don't know that for sure either. Index: INSTALL =================================================================== RCS file: /cvsroot/zsh/zsh/INSTALL,v retrieving revision 1.32 diff -u -r1.32 INSTALL --- INSTALL 12 Oct 2007 10:18:58 -0000 1.32 +++ INSTALL 20 Nov 2007 14:08:56 -0000 @@ -328,6 +328,14 @@ to the developers at zsh-workers@sunsite.dk and attempt to recompile with --with-term-lib="tinfo termcap ncurses curses" (see below). +Note that use of ncurses requires the header ncurses.h, so this +needs to be in the include path. configure will not search for +ncurses or ncursesw unless this is the case. If you have installed +ncurses.h in a non-standard place you may need to pass +CPPFLAGS=-I/usr/local/include (or wherever the header is found) to +configure. Similarly, you may need to pass LDFLAGS=-L/usr/local/lib +(or wherever) in order to find the library. + On some systems a suitable development package with a name such as curses-devel or ncurses-devel needs to be installed before zsh can be compiled. This is likely to be contained on any installation media, Index: configure.ac =================================================================== RCS file: /cvsroot/zsh/zsh/configure.ac,v retrieving revision 1.78 diff -u -r1.78 configure.ac --- configure.ac 10 Nov 2007 20:29:27 -0000 1.78 +++ configure.ac 20 Nov 2007 14:08:58 -0000 @@ -636,6 +636,17 @@ AC_CHECK_LIB(m, pow) +dnl Various features of ncurses depend on having the right header +dnl (the system's own curses.h may well not be good enough). +dnl So don't search for ncurses unless we found the header. +if test x$ac_cv_header_ncurses_h = xyes; then + ncursesw_test=ncursesw + ncurses_test=ncurses +else + ncursesw_test= + ncurses_test= +fi + dnl Prefer BSD termcap library to SysV curses library, except on certain dnl SYSV-derived systems. However, if we find terminfo and termcap dnl stuff in the same library we will use that; typically this @@ -648,12 +659,13 @@ termcap_curses_order="$withval" AC_SEARCH_LIBS(tigetstr, [$termcap_curses_order]) else - termcap_curses_order="ncursesw tinfo termcap ncurses curses" + termcap_curses_order="$ncursesw_test tinfo termcap $ncurses_test curses" fi], [case "$host_os" in hpux10.*|hpux11.*|solaris*) - termcap_curses_order="Hcurses ncursesw ncurses curses termcap" ;; - *) termcap_curses_order="ncursesw tinfo termcap ncurses curses" ;; + termcap_curses_order="Hcurses $ncursesw_test $ncurses_test curses termcap" ;; + *) + termcap_curses_order="$ncursesw_test tinfo termcap $ncurses_test curses" ;; esac])dnl AH_TEMPLATE([HAVE_BOOLCODES], @@ -2357,7 +2369,8 @@ esac fi case "$host_os" in - *freebsd*|linux*|irix*|osf*|gnu*|dragonfly*) DLLDFLAGS="${DLLDFLAGS=-shared}" ;; + osf*) DLLDFLAGS="${DLLDFLAGS=-shared -expect_unresolved '*'}" ;; + *freebsd*|linux*|irix*|gnu*|dragonfly*) DLLDFLAGS="${DLLDFLAGS=-shared}" ;; sunos*) DLLDFLAGS="${DLLDFLAGS=-assert nodefinitions}" ;; sysv4*|esix*) DLLDFLAGS="${DLLDFLAGS=-G $ldflags}" ;; netbsd*) DLLDFLAGS="${DLLDFLAGS=${DLLDARG}-x -shared --whole-archive}" ;; -- 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 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: zsh-4.3.4-dev-2.tar.gz 2007-11-20 14:14 ` zsh-4.3.4-dev-2.tar.gz Peter Stephenson @ 2007-11-20 15:03 ` Zvi Har'El 2007-11-20 15:11 ` zsh-4.3.4-dev-2.tar.gz Zvi Har'El 2007-11-20 15:42 ` zsh-4.3.4-dev-2.tar.gz Peter Stephenson 0 siblings, 2 replies; 8+ messages in thread From: Zvi Har'El @ 2007-11-20 15:03 UTC (permalink / raw) To: Peter Stephenson; +Cc: Zsh Hackers' List [-- Attachment #1: Type: text/plain, Size: 5548 bytes --] I believe ncurses.h is in the standard place, but not where it is configures looks for and the sources include it: /usr/local/src/build/zsh-4.3.4-dev-2$ grep 'include.*curses' **/*.c Src/Modules/curses.c:#include "curses.mdh" Src/Modules/curses.c:#include "curses.pro" Src/Modules/curses.c:# include <ncurses.h> Src/Modules/curses.c:# include <curses.h> Src/Modules/curses.c:#include "curses_keys.h" Src/Modules/termcap.c:# include <curses.h> Src/Modules/terminfo.c:# include <curses.h> /usr/local/src/build/zsh-4.3.4-dev-2$ locate ncurses.h /usr/local/include/ncurses/ncurses.h /usr/local/include/ncursesw/ncurses.h so, one should have #include <ncursesw/ncurses.h> rather than #include <ncurses.h> in Src/Modules/curses.c Perhaps I should add -I/usr/local/include/ncursesw to the CPPFLAGS? On 20/11/07 16:14, Peter Stephenson wrote: > On Tue, 20 Nov 2007 15:09:27 +0200 > "Zvi Har'El" <rl@math.technion.ac.il> wrote: > >> Another problem. I have two Solaris systems, 2.8 and 2.9. The tar, as >> well as the CVS Head, do not build. Last time I was able to build was, >> from the Head >> >> -rwxr-xr-x 2 root root 548196 2007-11-08 10:24:53.000000000 +0200 >> /usr/local/bin/zsh >> >> The I have in these systems, in addition to Solaris's curses, also gnu >> ncurses 5.6 (installed at /usr/local). For some reason, configure finds >> ncursesw.so but doesn't find ncurses.h. I attach config.log and >> config.h. >> > > Thanks. We shouldn't search the ncurses library if we haven't found > the ncurses header. > > Obviously it's better to find the header, but the shell may need help doing > that. I've added a note to the installation instructions. > > The last hunk was supposed to add "-expect_unresolved '*'" to DLLDFLAGS on > Tru64 Unix, but the mail I sent seems to have gone astray. I haven't > tested this. The idea that the OS still appeared to autoconf as osf* was > suggested by Google but I don't know that for sure either. > > Index: INSTALL > =================================================================== > RCS file: /cvsroot/zsh/zsh/INSTALL,v > retrieving revision 1.32 > diff -u -r1.32 INSTALL > --- INSTALL 12 Oct 2007 10:18:58 -0000 1.32 > +++ INSTALL 20 Nov 2007 14:08:56 -0000 > @@ -328,6 +328,14 @@ > to the developers at zsh-workers@sunsite.dk and attempt to recompile with > --with-term-lib="tinfo termcap ncurses curses" (see below). > > +Note that use of ncurses requires the header ncurses.h, so this > +needs to be in the include path. configure will not search for > +ncurses or ncursesw unless this is the case. If you have installed > +ncurses.h in a non-standard place you may need to pass > +CPPFLAGS=-I/usr/local/include (or wherever the header is found) to > +configure. Similarly, you may need to pass LDFLAGS=-L/usr/local/lib > +(or wherever) in order to find the library. > + > On some systems a suitable development package with a name such as > curses-devel or ncurses-devel needs to be installed before zsh can > be compiled. This is likely to be contained on any installation media, > Index: configure.ac > =================================================================== > RCS file: /cvsroot/zsh/zsh/configure.ac,v > retrieving revision 1.78 > diff -u -r1.78 configure.ac > --- configure.ac 10 Nov 2007 20:29:27 -0000 1.78 > +++ configure.ac 20 Nov 2007 14:08:58 -0000 > @@ -636,6 +636,17 @@ > > AC_CHECK_LIB(m, pow) > > +dnl Various features of ncurses depend on having the right header > +dnl (the system's own curses.h may well not be good enough). > +dnl So don't search for ncurses unless we found the header. > +if test x$ac_cv_header_ncurses_h = xyes; then > + ncursesw_test=ncursesw > + ncurses_test=ncurses > +else > + ncursesw_test= > + ncurses_test= > +fi > + > dnl Prefer BSD termcap library to SysV curses library, except on certain > dnl SYSV-derived systems. However, if we find terminfo and termcap > dnl stuff in the same library we will use that; typically this > @@ -648,12 +659,13 @@ > termcap_curses_order="$withval" > AC_SEARCH_LIBS(tigetstr, [$termcap_curses_order]) > else > - termcap_curses_order="ncursesw tinfo termcap ncurses curses" > + termcap_curses_order="$ncursesw_test tinfo termcap $ncurses_test curses" > fi], > [case "$host_os" in > hpux10.*|hpux11.*|solaris*) > - termcap_curses_order="Hcurses ncursesw ncurses curses termcap" ;; > - *) termcap_curses_order="ncursesw tinfo termcap ncurses curses" ;; > + termcap_curses_order="Hcurses $ncursesw_test $ncurses_test curses termcap" ;; > + *) > + termcap_curses_order="$ncursesw_test tinfo termcap $ncurses_test curses" ;; > esac])dnl > > AH_TEMPLATE([HAVE_BOOLCODES], > @@ -2357,7 +2369,8 @@ > esac > fi > case "$host_os" in > - *freebsd*|linux*|irix*|osf*|gnu*|dragonfly*) DLLDFLAGS="${DLLDFLAGS=-shared}" ;; > + osf*) DLLDFLAGS="${DLLDFLAGS=-shared -expect_unresolved '*'}" ;; > + *freebsd*|linux*|irix*|gnu*|dragonfly*) DLLDFLAGS="${DLLDFLAGS=-shared}" ;; > sunos*) DLLDFLAGS="${DLLDFLAGS=-assert nodefinitions}" ;; > sysv4*|esix*) DLLDFLAGS="${DLLDFLAGS=-G $ldflags}" ;; > netbsd*) DLLDFLAGS="${DLLDFLAGS=${DLLDARG}-x -shared --whole-archive}" ;; > > -- Dr. Zvi Har'El mailto:rl@math.technion.ac.il Department of Mathematics tel:+972-54-4227607 Technion - Israel Institute of Technology fax:+972-4-8293388 http://www.math.technion.ac.il/~rl/ Haifa 32000, ISRAEL "If you can't say somethin' nice, don't say nothin' at all." -- Thumper (1942) [-- Attachment #2: Type: text/html, Size: 6278 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: zsh-4.3.4-dev-2.tar.gz 2007-11-20 15:03 ` zsh-4.3.4-dev-2.tar.gz Zvi Har'El @ 2007-11-20 15:11 ` Zvi Har'El 2007-11-20 15:42 ` zsh-4.3.4-dev-2.tar.gz Peter Stephenson 1 sibling, 0 replies; 8+ messages in thread From: Zvi Har'El @ 2007-11-20 15:11 UTC (permalink / raw) To: Peter Stephenson; +Cc: Zsh Hackers' List [-- Attachment #1: Type: text/plain, Size: 6165 bytes --] Yes. CPPFLAGS=-I/usr/local/include/ncursesw ./configure --enable-multibyte does the trick. On 20/11/07 17:03, Zvi Har'El wrote: > I believe ncurses.h is in the standard place, but not where it is > configures looks for and the sources include it: > > /usr/local/src/build/zsh-4.3.4-dev-2$ grep 'include.*curses' **/*.c > Src/Modules/curses.c:#include "curses.mdh" > Src/Modules/curses.c:#include "curses.pro" > Src/Modules/curses.c:# include <ncurses.h> > Src/Modules/curses.c:# include <curses.h> > Src/Modules/curses.c:#include "curses_keys.h" > Src/Modules/termcap.c:# include <curses.h> > Src/Modules/terminfo.c:# include <curses.h> > > /usr/local/src/build/zsh-4.3.4-dev-2$ locate ncurses.h > /usr/local/include/ncurses/ncurses.h > /usr/local/include/ncursesw/ncurses.h > > so, one should have > #include <ncursesw/ncurses.h> > > rather than > #include <ncurses.h> > > in Src/Modules/curses.c > > Perhaps I should add -I/usr/local/include/ncursesw to the CPPFLAGS? > > On 20/11/07 16:14, Peter Stephenson wrote: >> On Tue, 20 Nov 2007 15:09:27 +0200 >> "Zvi Har'El" <rl@math.technion.ac.il> wrote: >> >>> Another problem. I have two Solaris systems, 2.8 and 2.9. The tar, as >>> well as the CVS Head, do not build. Last time I was able to build was, >>> from the Head >>> >>> -rwxr-xr-x 2 root root 548196 2007-11-08 10:24:53.000000000 +0200 >>> /usr/local/bin/zsh >>> >>> The I have in these systems, in addition to Solaris's curses, also gnu >>> ncurses 5.6 (installed at /usr/local). For some reason, configure finds >>> ncursesw.so but doesn't find ncurses.h. I attach config.log and >>> config.h. >>> >> >> Thanks. We shouldn't search the ncurses library if we haven't found >> the ncurses header. >> >> Obviously it's better to find the header, but the shell may need help doing >> that. I've added a note to the installation instructions. >> >> The last hunk was supposed to add "-expect_unresolved '*'" to DLLDFLAGS on >> Tru64 Unix, but the mail I sent seems to have gone astray. I haven't >> tested this. The idea that the OS still appeared to autoconf as osf* was >> suggested by Google but I don't know that for sure either. >> >> Index: INSTALL >> =================================================================== >> RCS file: /cvsroot/zsh/zsh/INSTALL,v >> retrieving revision 1.32 >> diff -u -r1.32 INSTALL >> --- INSTALL 12 Oct 2007 10:18:58 -0000 1.32 >> +++ INSTALL 20 Nov 2007 14:08:56 -0000 >> @@ -328,6 +328,14 @@ >> to the developers at zsh-workers@sunsite.dk and attempt to recompile with >> --with-term-lib="tinfo termcap ncurses curses" (see below). >> >> +Note that use of ncurses requires the header ncurses.h, so this >> +needs to be in the include path. configure will not search for >> +ncurses or ncursesw unless this is the case. If you have installed >> +ncurses.h in a non-standard place you may need to pass >> +CPPFLAGS=-I/usr/local/include (or wherever the header is found) to >> +configure. Similarly, you may need to pass LDFLAGS=-L/usr/local/lib >> +(or wherever) in order to find the library. >> + >> On some systems a suitable development package with a name such as >> curses-devel or ncurses-devel needs to be installed before zsh can >> be compiled. This is likely to be contained on any installation media, >> Index: configure.ac >> =================================================================== >> RCS file: /cvsroot/zsh/zsh/configure.ac,v >> retrieving revision 1.78 >> diff -u -r1.78 configure.ac >> --- configure.ac 10 Nov 2007 20:29:27 -0000 1.78 >> +++ configure.ac 20 Nov 2007 14:08:58 -0000 >> @@ -636,6 +636,17 @@ >> >> AC_CHECK_LIB(m, pow) >> >> +dnl Various features of ncurses depend on having the right header >> +dnl (the system's own curses.h may well not be good enough). >> +dnl So don't search for ncurses unless we found the header. >> +if test x$ac_cv_header_ncurses_h = xyes; then >> + ncursesw_test=ncursesw >> + ncurses_test=ncurses >> +else >> + ncursesw_test= >> + ncurses_test= >> +fi >> + >> dnl Prefer BSD termcap library to SysV curses library, except on certain >> dnl SYSV-derived systems. However, if we find terminfo and termcap >> dnl stuff in the same library we will use that; typically this >> @@ -648,12 +659,13 @@ >> termcap_curses_order="$withval" >> AC_SEARCH_LIBS(tigetstr, [$termcap_curses_order]) >> else >> - termcap_curses_order="ncursesw tinfo termcap ncurses curses" >> + termcap_curses_order="$ncursesw_test tinfo termcap $ncurses_test curses" >> fi], >> [case "$host_os" in >> hpux10.*|hpux11.*|solaris*) >> - termcap_curses_order="Hcurses ncursesw ncurses curses termcap" ;; >> - *) termcap_curses_order="ncursesw tinfo termcap ncurses curses" ;; >> + termcap_curses_order="Hcurses $ncursesw_test $ncurses_test curses termcap" ;; >> + *) >> + termcap_curses_order="$ncursesw_test tinfo termcap $ncurses_test curses" ;; >> esac])dnl >> >> AH_TEMPLATE([HAVE_BOOLCODES], >> @@ -2357,7 +2369,8 @@ >> esac >> fi >> case "$host_os" in >> - *freebsd*|linux*|irix*|osf*|gnu*|dragonfly*) DLLDFLAGS="${DLLDFLAGS=-shared}" ;; >> + osf*) DLLDFLAGS="${DLLDFLAGS=-shared -expect_unresolved '*'}" ;; >> + *freebsd*|linux*|irix*|gnu*|dragonfly*) DLLDFLAGS="${DLLDFLAGS=-shared}" ;; >> sunos*) DLLDFLAGS="${DLLDFLAGS=-assert nodefinitions}" ;; >> sysv4*|esix*) DLLDFLAGS="${DLLDFLAGS=-G $ldflags}" ;; >> netbsd*) DLLDFLAGS="${DLLDFLAGS=${DLLDARG}-x -shared --whole-archive}" ;; >> >> > > -- > Dr. Zvi Har'El mailto:rl@math.technion.ac.il Department of Mathematics > tel:+972-54-4227607 Technion - Israel Institute of Technology > fax:+972-4-8293388 http://www.math.technion.ac.il/~rl/ Haifa 32000, ISRAEL > "If you can't say somethin' nice, don't say nothin' at all." -- Thumper (1942) > -- Dr. Zvi Har'El mailto:rl@math.technion.ac.il Department of Mathematics tel:+972-54-4227607 Technion - Israel Institute of Technology fax:+972-4-8293388 http://www.math.technion.ac.il/~rl/ Haifa 32000, ISRAEL "If you can't say somethin' nice, don't say nothin' at all." -- Thumper (1942) [-- Attachment #2: Type: text/html, Size: 7337 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: zsh-4.3.4-dev-2.tar.gz 2007-11-20 15:03 ` zsh-4.3.4-dev-2.tar.gz Zvi Har'El 2007-11-20 15:11 ` zsh-4.3.4-dev-2.tar.gz Zvi Har'El @ 2007-11-20 15:42 ` Peter Stephenson 2007-11-20 15:59 ` zsh-4.3.4-dev-2.tar.gz Peter Stephenson 2007-11-21 9:40 ` zsh-4.3.4-dev-2.tar.gz Vincent Lefevre 1 sibling, 2 replies; 8+ messages in thread From: Peter Stephenson @ 2007-11-20 15:42 UTC (permalink / raw) To: Zsh Hackers' List On Tue, 20 Nov 2007 17:03:15 +0200 "Zvi Har'El" <rl@math.technion.ac.il> wrote: > I believe ncurses.h is in the standard place, but not where it is > configures looks for and the sources include it: >... > so, one should have > #include <ncursesw/ncurses.h> Aieee. This looks for the header in more places and tries to be consistent about multibyte support. It also tries to be consistent the other way: if we haven't found the ncurses library, we shouldn't be using the headers. Index: configure.ac =================================================================== RCS file: /cvsroot/zsh/zsh/configure.ac,v retrieving revision 1.79 diff -u -r1.79 configure.ac --- configure.ac 20 Nov 2007 14:20:00 -0000 1.79 +++ configure.ac 20 Nov 2007 15:39:40 -0000 @@ -557,7 +557,8 @@ unistd.h sys/capability.h \ utmp.h utmpx.h sys/types.h pwd.h grp.h poll.h sys/mman.h \ netinet/in_systm.h pcre.h langinfo.h wchar.h stddef.h \ - sys/stropts.h iconv.h ncurses.h) + sys/stropts.h iconv.h ncurses.h ncursesw/ncurses.h \ + ncurses/ncurses.h) if test x$dynamic = xyes; then AC_CHECK_HEADERS(dlfcn.h) AC_CHECK_HEADERS(dl.h) @@ -639,7 +640,7 @@ dnl Various features of ncurses depend on having the right header dnl (the system's own curses.h may well not be good enough). dnl So don't search for ncurses unless we found the header. -if test x$ac_cv_header_ncurses_h = xyes; then +if test x$ac_cv_header_ncurses_h = xyes || test x$ac_cv_header_ncurses_ncurses_h = xyes || test x$ac_cv_header_ncursesw_ncurses_h = xyes; then ncursesw_test=ncursesw ncurses_test=ncurses else @@ -719,6 +720,16 @@ AC_MSG_RESULT(no) fi +dnl If our terminal library is not ncurses, don't try including +dnl any ncurses headers. +AH_TEMPLATE([ZSH_IGNORE_NCURSES], +[Define to 1 to ignore any ncurses library headers found on the system.]) +case $LIBS in + ncurses*) ;; + *) + AC_DEFINE(ZSH_IGNORE_NCURSES) ;; +esac + AC_MSG_CHECKING(if boolcodes is available) AC_TRY_LINK([#ifdef TERM_H_NEEDS_CURSES_H #include <curses.h> @@ -1381,7 +1392,7 @@ AC_CACHE_CHECK(where curses key definitions are located, zsh_cv_path_curses_keys_h, [dnl This is an identical trick to errno.h, except we use ncurses.h dnl if we can. -if test x$ac_cv_header_ncurses_h = xyes; then +if test x$ac_cv_header_ncurses_h = xyes || test x$ac_cv_header_ncurses_ncurses_h = xyes || test x$ac_cv_header_ncursesw_ncurses_h = xyes; then echo "#include <ncurses.h>" >nametmp.c else if test x$ac_cv_header_curses_h = xyes; then Index: Src/Modules/curses.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/Modules/curses.c,v retrieving revision 1.40 diff -u -r1.40 curses.c --- Src/Modules/curses.c 12 Nov 2007 12:16:52 -0000 1.40 +++ Src/Modules/curses.c 20 Nov 2007 15:39:41 -0000 @@ -32,20 +32,35 @@ #include "curses.mdh" #include "curses.pro" -#ifdef HAVE_NCURSES_H -# include <ncurses.h> -#else -# ifdef HAVE_CURSES_H -# include <curses.h> -# endif -#endif - #ifndef MULTIBYTE_SUPPORT # undef HAVE_GETCCHAR # undef HAVE_SETCCHAR # undef HAVE_WADDWSTR # undef HAVE_WGET_WCH # undef HAVE_WIN_WCH +# undef HAVE_NCURSESW_NCURSES_H +#endif + +#ifdef ZSH_IGNORE_NCURSES +# ifdef HAVE_CURSES_H +# include <curses.h> +# endif +#else +# ifdef HAVE_NCURSESW_NCURSES_H +# include <ncursesw/ncurses.h> +# else +# ifdef HAVE_NCURSES_H +# include <ncurses.h> +# else +# ifdef HAVE_NCURSES_NCURSES_H +# include <ncurses/ncurses.h> +# else +# ifdef HAVE_CURSES_H +# include <curses.h> +# endif +# endif +# endif +# endif #endif #ifdef HAVE_SETCCHAR -- 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 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: zsh-4.3.4-dev-2.tar.gz 2007-11-20 15:42 ` zsh-4.3.4-dev-2.tar.gz Peter Stephenson @ 2007-11-20 15:59 ` Peter Stephenson 2007-11-21 9:40 ` zsh-4.3.4-dev-2.tar.gz Vincent Lefevre 1 sibling, 0 replies; 8+ messages in thread From: Peter Stephenson @ 2007-11-20 15:59 UTC (permalink / raw) To: Zsh Hackers' List On Tue, 20 Nov 2007 15:42:46 +0000 Peter Stephenson <pws@csr.com> wrote: > Aieee. Gaah. > +dnl If our terminal library is not ncurses, don't try including > +dnl any ncurses headers. > +AH_TEMPLATE([ZSH_IGNORE_NCURSES], > +[Define to 1 to ignore any ncurses library headers found on the system.]) > +case $LIBS in > + ncurses*) ;; > + *) > + AC_DEFINE(ZSH_IGNORE_NCURSES) ;; > +esac > + Nope. Index: configure.ac =================================================================== RCS file: /cvsroot/zsh/zsh/configure.ac,v retrieving revision 1.80 diff -u -r1.80 configure.ac --- configure.ac 20 Nov 2007 15:48:51 -0000 1.80 +++ configure.ac 20 Nov 2007 15:58:07 -0000 @@ -720,16 +720,6 @@ AC_MSG_RESULT(no) fi -dnl If our terminal library is not ncurses, don't try including -dnl any ncurses headers. -AH_TEMPLATE([ZSH_IGNORE_NCURSES], -[Define to 1 to ignore any ncurses library headers found on the system.]) -case $LIBS in - ncurses*) ;; - *) - AC_DEFINE(ZSH_IGNORE_NCURSES) ;; -esac - AC_MSG_CHECKING(if boolcodes is available) AC_TRY_LINK([#ifdef TERM_H_NEEDS_CURSES_H #include <curses.h> @@ -768,6 +758,17 @@ AC_MSG_RESULT($strnames) ]) + +dnl If our terminal library is not ncurses, don't try including +dnl any ncurses headers. +AH_TEMPLATE([ZSH_IGNORE_NCURSES], +[Define to 1 to ignore any ncurses library headers found on the system.]) +case $LIBS in + -lncurses*) ;; + *) + AC_DEFINE(ZSH_IGNORE_NCURSES) ;; +esac + dnl Some systems (Solaris 2.x, Linux Redhat 5.x) require dnl libnsl (Network Services Library) to find yp_all ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: zsh-4.3.4-dev-2.tar.gz 2007-11-20 15:42 ` zsh-4.3.4-dev-2.tar.gz Peter Stephenson 2007-11-20 15:59 ` zsh-4.3.4-dev-2.tar.gz Peter Stephenson @ 2007-11-21 9:40 ` Vincent Lefevre 2007-11-21 9:49 ` zsh-4.3.4-dev-2.tar.gz Peter Stephenson 1 sibling, 1 reply; 8+ messages in thread From: Vincent Lefevre @ 2007-11-21 9:40 UTC (permalink / raw) To: Zsh Hackers' List On 2007-11-20 15:42:46 +0000, Peter Stephenson wrote: > +#ifdef ZSH_IGNORE_NCURSES > +# ifdef HAVE_CURSES_H > +# include <curses.h> > +# endif > +#else > +# ifdef HAVE_NCURSESW_NCURSES_H > +# include <ncursesw/ncurses.h> > +# else > +# ifdef HAVE_NCURSES_H > +# include <ncurses.h> > +# else > +# ifdef HAVE_NCURSES_NCURSES_H > +# include <ncurses/ncurses.h> > +# else > +# ifdef HAVE_CURSES_H > +# include <curses.h> > +# endif > +# endif > +# endif > +# endif > #endif Shouldn't HAVE_NCURSES_NCURSES_H and HAVE_NCURSES_H be reversed, in case both are defined? Indeed I assume that <ncurses/ncurses.h> should have the precedence over <ncurses.h> since the former is the canonical place, isn't it? FYI, on my Mac OS X machine: prunille:~> locate ncurses.h /Developer/SDKs/MacOSX10.3.9.sdk/usr/include/ncurses.h /Developer/SDKs/MacOSX10.4u.sdk/usr/include/ncurses.h /opt/local/include/ncurses/ncurses.h /opt/local/include/ncursesw/ncurses.h /opt/local/var/macports/software/ncurses/5.6_0+darwin_8/opt/local/include/ncurses/ncurses.h /opt/local/var/macports/software/ncursesw/5.6_0+darwin_8/opt/local/include/ncursesw/ncurses.h /usr/include/ncurses.h prunille:~> locate libncurses.dylib /Applications/Gimp.app/Contents/Resources/lib/libncurses.dylib /Developer/SDKs/MacOSX10.3.9.sdk/usr/lib/libncurses.dylib /Developer/SDKs/MacOSX10.4u.sdk/usr/lib/libncurses.dylib /opt/local/lib/libncurses.dylib /opt/local/var/macports/software/ncurses/5.6_0+darwin_8/opt/local/lib/libncurses.dylib /usr/lib/libncurses.dylib So, if libncursesw isn't installed, zsh will currently be built using /usr/include/ncurses.h (the old Mac OS X header file) and /opt/local/lib/libncurses.dylib (the new ncurses library installed via MacPorts). If the ncurses ABI has changed, this can lead to a broken zsh binary. BTW, since gr -r 'include.*curses' . on zsh 4.3.4 only gives #include <curses.h> lines, I suppose that my current zsh 4.3.4 version has been built using /usr/include/curses.h, but it is linked with /opt/local/lib/libncurses.5.dylib: prunille:~> otool -L =zsh /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.10) /opt/local/lib/libncurses.5.dylib (compatibility version 5.0.0, current version 5.0.0) I wonder if this can explain the crashes I get. -- 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] 8+ messages in thread
* Re: zsh-4.3.4-dev-2.tar.gz 2007-11-21 9:40 ` zsh-4.3.4-dev-2.tar.gz Vincent Lefevre @ 2007-11-21 9:49 ` Peter Stephenson 0 siblings, 0 replies; 8+ messages in thread From: Peter Stephenson @ 2007-11-21 9:49 UTC (permalink / raw) To: Zsh Hackers' List Vincent Lefevre wrote: > Shouldn't HAVE_NCURSES_NCURSES_H and HAVE_NCURSES_H be reversed, > in case both are defined? Indeed I assume that <ncurses/ncurses.h> > should have the precedence over <ncurses.h> since the former is > the canonical place, isn't it? On the assumption that (i) only the original system packages are likely to put the header in /usr/include (ii) added packages will put it in some local subdirectory as ncurses/ncurses.h (iii) the added packages should take preference and some attempt with include paths and library paths has been made for this, then you're right. That's a little too complicated for me to have much faith that it's always going to work, but at least you've provided one example where it does. Index: Src/Modules/curses.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/Modules/curses.c,v retrieving revision 1.41 diff -u -r1.41 curses.c --- Src/Modules/curses.c 20 Nov 2007 15:48:51 -0000 1.41 +++ Src/Modules/curses.c 21 Nov 2007 09:45:37 -0000 @@ -49,11 +49,11 @@ # ifdef HAVE_NCURSESW_NCURSES_H # include <ncursesw/ncurses.h> # else -# ifdef HAVE_NCURSES_H -# include <ncurses.h> +# ifdef HAVE_NCURSES_NCURSES_H +# include <ncurses/ncurses.h> # else -# ifdef HAVE_NCURSES_NCURSES_H -# include <ncurses/ncurses.h> +# ifdef HAVE_NCURSES_H +# include <ncurses.h> # else # ifdef HAVE_CURSES_H # 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 ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2007-11-21 9:50 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <11649.1195558694@csr.com> [not found] ` <4742E805.5030402@math.technion.ac.il> 2007-11-20 14:08 ` zsh-4.3.4-dev-2.tar.gz Peter Stephenson [not found] ` <4742DC87.5030901@math.technion.ac.il> 2007-11-20 14:14 ` zsh-4.3.4-dev-2.tar.gz Peter Stephenson 2007-11-20 15:03 ` zsh-4.3.4-dev-2.tar.gz Zvi Har'El 2007-11-20 15:11 ` zsh-4.3.4-dev-2.tar.gz Zvi Har'El 2007-11-20 15:42 ` zsh-4.3.4-dev-2.tar.gz Peter Stephenson 2007-11-20 15:59 ` zsh-4.3.4-dev-2.tar.gz Peter Stephenson 2007-11-21 9:40 ` zsh-4.3.4-dev-2.tar.gz Vincent Lefevre 2007-11-21 9:49 ` zsh-4.3.4-dev-2.tar.gz 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).