about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--Src/Modules/termcap.c2
-rw-r--r--Src/Modules/terminfo.c2
-rw-r--r--configure.in14
4 files changed, 16 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 6890fb9a1..6d60a2406 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2001-04-23  Bart Schaefer  <schaefer@brasslantern.com>
 
+	* 14081: configure.in, Src/termcap.c, Src/terminfo.c: Fix linking
+	yet again in the wake of 14077.  Disables echoti and the terminfo
+	parameter on systems that have the old termcap, because otherwise
+	the main zsh may be unnecessarily linked with curses even when the
+	zsh/terminfo module is not in use.
+
 	* 14080: Src/glob.c, Src/params.c, Src/subst.c, Src/zsh.h,
 	Test/D06subscript.ztst: Optimize subscript parsing slightly by
 	passing down an indication of whether the expression is in double
diff --git a/Src/Modules/termcap.c b/Src/Modules/termcap.c
index 1b4107248..845d29f6d 100644
--- a/Src/Modules/termcap.c
+++ b/Src/Modules/termcap.c
@@ -362,7 +362,7 @@ int
 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 --git a/Src/Modules/terminfo.c b/Src/Modules/terminfo.c
index 3e70bf279..5b9d0bdbd 100644
--- a/Src/Modules/terminfo.c
+++ b/Src/Modules/terminfo.c
@@ -347,7 +347,9 @@ int
 boot_(Module m)
 {
 #ifdef HAVE_TIGETSTR
+# ifdef HAVE_SETUPTERM
     setupterm((char *)0, 1, (int *)0);
+# endif
 
     if (!createtihash())
     	return 1;
diff --git a/configure.in b/configure.in
index 8e9f58629..7837fae2b 100644
--- a/configure.in
+++ b/configure.in
@@ -516,32 +516,32 @@ esac
 
 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 @@ AC_CHECK_FUNCS(strftime difftime gettimeofday \
 	       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)