From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28730 invoked from network); 24 Apr 2001 06:41:29 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 24 Apr 2001 06:41:29 -0000 Received: (qmail 514 invoked by alias); 24 Apr 2001 06:41:19 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 14081 Received: (qmail 498 invoked from network); 24 Apr 2001 06:41:19 -0000 From: "Bart Schaefer" Message-Id: <1010424064044.ZM32389@candle.brasslantern.com> Date: Tue, 24 Apr 2001 06:40:44 +0000 In-Reply-To: Comments: In reply to Andrej Borsenkow "PATCH: revert Clint's build patches" (Apr 23, 11:44pm) References: X-Mailer: Z-Mail (5.0.0 30July97) To: Zsh hackers list Subject: Re: PATCH: revert Clint's build patches MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Apr 23, 11:44pm, Andrej Borsenkow wrote: } } O.K., so here is diff against current CVS that reverts } Clint's patches (sorry). I commit it when I have article number. Unfortunately, I'm now able to compile zsh but not link it: Modules/termcap.o: In function `scantermcap': /usr/src/local/zsh/zsh-4.0-build/Src/Modules/../../../zsh-4.0/Src/Modules/termcap.c:320: undefined reference to `boolcodes' /usr/src/local/zsh/zsh-4.0-build/Src/Modules/../../../zsh-4.0/Src/Modules/termcap.c:329: undefined reference to `numcodes' /usr/src/local/zsh/zsh-4.0-build/Src/Modules/../../../zsh-4.0/Src/Modules/termcap.c:338: undefined reference to `strcodes' Modules/termcap.o: In function `boot_zshQstermcap': /usr/src/local/zsh/zsh-4.0-build/Src/Modules/../../../zsh-4.0/Src/Modules/termcap.c:366: undefined reference to `setupterm' This appears to happen because the checks to add the library containing boolcodes, et al. to LIBS were removed, but the checks for whether those variables are defined and which headers define them were NOT removed. In any case AC_TRY_COMPILE is the wrong way to detect boolcodes, etc. AC_TRY_LINK is better; that way even if the header happens to be there, but the library is not, they won't be marked as available. The following patch gets my compile and link going, but of course does not enable $terminfo or echoti on my system, and uses the fallback lists of capcodes for $termcap. However, I don't know whether to add AC_SEARCH_LIBS(setupterm, ...) or AC_SEARCH_LIBS(tigetstr, ...) or both. diff -ru -x CVS zsh-forge/current/Src/Modules/termcap.c zsh-4.0/Src/Modules/termcap.c --- zsh-forge/current/Src/Modules/termcap.c Sun Apr 22 09:35:16 2001 +++ zsh-4.0/Src/Modules/termcap.c Mon Apr 23 23:28:56 2001 @@ -362,7 +362,7 @@ boot_(Module m) { #ifdef HAVE_TGETENT -# if defined(HAVE_CURSES_H) && defined(HAVE_TERM_H) +# ifdef HAVE_SETUPTERM setupterm((char *)0, 1, (int *)0); # endif diff -ru -x CVS zsh-forge/current/Src/Modules/terminfo.c zsh-4.0/Src/Modules/terminfo.c --- zsh-forge/current/Src/Modules/terminfo.c Sun Apr 22 09:35:16 2001 +++ zsh-4.0/Src/Modules/terminfo.c Mon Apr 23 23:29:19 2001 @@ -347,7 +347,9 @@ boot_(Module m) { #ifdef HAVE_TIGETSTR +# ifdef HAVE_SETUPTERM setupterm((char *)0, 1, (int *)0); +# endif if (!createtihash()) return 1; diff -ru -x CVS zsh-forge/current/configure.in zsh-4.0/configure.in --- zsh-forge/current/configure.in Mon Apr 23 22:33:56 2001 +++ zsh-4.0/configure.in Mon Apr 23 23:28:42 2001 @@ -516,32 +516,32 @@ AC_SEARCH_LIBS(tgetent, [$termcap_curses_order]) AC_MSG_CHECKING(if boolcodes is available) -AC_TRY_COMPILE([#include +AC_TRY_LINK([#include #include ], [char **test = boolcodes;], AC_DEFINE(HAVE_BOOLCODES) boolcodes=yes, boolcodes=no) AC_MSG_RESULT($boolcodes) AC_MSG_CHECKING(if numcodes is available) -AC_TRY_COMPILE([#include +AC_TRY_LINK([#include #include ], [char **test = numcodes;], AC_DEFINE(HAVE_NUMCODES) numcodes=yes, numcodes=no) AC_MSG_RESULT($numcodes) AC_MSG_CHECKING(if strcodes is available) -AC_TRY_COMPILE([#include +AC_TRY_LINK([#include #include ], [char **test = strcodes;], AC_DEFINE(HAVE_STRCODES) strcodes=yes, strcodes=no) AC_MSG_RESULT($strcodes) AC_MSG_CHECKING(if boolnames is available) -AC_TRY_COMPILE([#include +AC_TRY_LINK([#include #include ], [char **test = boolnames;], AC_DEFINE(HAVE_BOOLNAMES) boolnames=yes, boolnames=no) AC_MSG_RESULT($boolnames) AC_MSG_CHECKING(if numnames is available) -AC_TRY_COMPILE([#include +AC_TRY_LINK([#include #include ], [char **test = numnames;], AC_DEFINE(HAVE_NUMNAMES) numnames=yes, numnames=no) AC_MSG_RESULT($numnames) AC_MSG_CHECKING(if strnames is available) -AC_TRY_COMPILE([#include +AC_TRY_LINK([#include #include ], [char **test = strnames;], AC_DEFINE(HAVE_STRNAMES) strnames=yes, strnames=no) AC_MSG_RESULT($strnames) @@ -853,7 +853,7 @@ putenv getenv \ brk sbrk \ pathconf sysconf \ - tgetent tigetflag tigetnum tigetstr) + tgetent tigetflag tigetnum tigetstr setupterm) AC_FUNC_STRCOLL dnl Check if tgetent accepts NULL (and will allocate its own termcap buffer) -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net