From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26277 invoked from network); 20 Nov 2007 15:03:40 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,HTML_MESSAGE autolearn=ham version=3.2.3 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 20 Nov 2007 15:03:40 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 12045 invoked from network); 20 Nov 2007 15:03:31 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 20 Nov 2007 15:03:31 -0000 Received: (qmail 4703 invoked by alias); 20 Nov 2007 15:03:26 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 24105 Received: (qmail 4686 invoked from network); 20 Nov 2007 15:03:25 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 20 Nov 2007 15:03:25 -0000 Received: (qmail 11705 invoked from network); 20 Nov 2007 15:03:25 -0000 Received: from mailgw10.technion.ac.il (132.68.225.10) by a.mx.sunsite.dk with SMTP; 20 Nov 2007 15:03:19 -0000 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ah4FAPOFQkeERHMC/2dsb2JhbACCcyk X-IronPort-AV: E=Sophos;i="4.21,442,1188766800"; d="scan'208,217";a="68895258" Received: from leeor.math.technion.ac.il ([132.68.115.2]) by mailgw10.technion.ac.il with ESMTP; 20 Nov 2007 17:03:17 +0200 Received: from [127.0.0.1] (localhost [127.0.0.1]) by leeor.math.technion.ac.il (8.12.11/8.12.11) with ESMTP id lAKF3Fve014124; Tue, 20 Nov 2007 17:03:15 +0200 (IST) Message-ID: <4742F733.4030908@math.technion.ac.il> Date: Tue, 20 Nov 2007 17:03:15 +0200 From: "Zvi Har'El" Organization: Technion--Israel Institute of Technology User-Agent: Thunderbird 2.0.0.9 (X11/20071031) MIME-Version: 1.0 To: Peter Stephenson CC: "Zsh Hackers' List" Subject: Re: zsh-4.3.4-dev-2.tar.gz References: <11649.1195558694@csr.com> <4742DC87.5030901@math.technion.ac.il> <20071120141442.55f7ac28@news01> In-Reply-To: <20071120141442.55f7ac28@news01> X-Enigmail-Version: 0.95.5 OpenPGP: id=AF1F5245; url=http://www.math.technion.ac.il/~rl/etc/pubkey.html Content-Type: multipart/alternative; boundary="------------030508010703000508060407" This is a multi-part message in MIME format. --------------030508010703000508060407 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 Src/Modules/curses.c:# include Src/Modules/curses.c:#include "curses_keys.h" Src/Modules/termcap.c:# include Src/Modules/terminfo.c:# include /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 rather than #include 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" 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) --------------030508010703000508060407 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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)
--------------030508010703000508060407--