Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: revert Clint's build patches
- X-seq: zsh-workers 14081
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxxxxx>
- Subject: Re: PATCH: revert Clint's build patches
- Date: Tue, 24 Apr 2001 06:40:44 +0000
- In-reply-to: <Pine.SV4.4.33.0104232341490.18873-200000@xxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <Pine.SV4.4.33.0104232341490.18873-200000@xxxxxxxxxxxxxxxxxxxxx>
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 <curses.h>
+AC_TRY_LINK([#include <curses.h>
#include <term.h>], [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 <curses.h>
+AC_TRY_LINK([#include <curses.h>
#include <term.h>], [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 <curses.h>
+AC_TRY_LINK([#include <curses.h>
#include <term.h>], [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 <curses.h>
+AC_TRY_LINK([#include <curses.h>
#include <term.h>], [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 <curses.h>
+AC_TRY_LINK([#include <curses.h>
#include <term.h>], [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 <curses.h>
+AC_TRY_LINK([#include <curses.h>
#include <term.h>], [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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author