about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--configure.in12
2 files changed, 14 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 62f9828bd..9d22b91a7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2001-05-02  Bart Schaefer  <schaefer@zsh.org>
+
+	* 14206: configure.in: Fix bug introduced by 14177; also, only
+	check for curses headers when linking against the curses library.
+
 2001-05-02  Clint Adams  <clint@zsh.org>
 
 	* 14208: Completion/User/Command/_loadkeys: support Solaris
diff --git a/configure.in b/configure.in
index 715523ec6..053502142 100644
--- a/configure.in
+++ b/configure.in
@@ -425,7 +425,6 @@ AC_ARG_ENABLE(max-jobtable-size,
 
 [if test x$enableval = xyes; then
 
-  if test $ac_cv_header_linux_tasks_h = yes; then
    AC_EGREP_CPP(yes,
    [#include <linux/tasks.h>
     #ifdef MAX_TASKS_PER_USER
@@ -433,7 +432,6 @@ AC_ARG_ENABLE(max-jobtable-size,
     #endif
    ],
    maxj=max)
-  fi
 
    if test x$maxj = xmax; then
     AC_DEFINE(MAXJOB, MAX_TASKS_PER_USER)
@@ -478,7 +476,7 @@ AC_CHECK_HEADERS(sys/time.h sys/times.h sys/select.h termcap.h termio.h \
 		 limits.h fcntl.h libc.h sys/utsname.h sys/resource.h \
 		 locale.h errno.h stdlib.h unistd.h sys/capability.h \
 		 utmp.h utmpx.h sys/types.h pwd.h grp.h poll.h sys/mman.h \
-		 linux/tasks.h netinet/in_systm.h curses.h term.h)
+		 netinet/in_systm.h)
 if test $dynamic = yes; then
   AC_CHECK_HEADERS(dlfcn.h)
   AC_CHECK_HEADERS(dl.h)
@@ -562,6 +560,11 @@ fi],
 esac])dnl
 
 AC_SEARCH_LIBS(tgetent, [$termcap_curses_order])
+case "$LIBS" in
+*curses*)
+AC_CHECK_HEADERS(curses.h term.h)
+if test x$ac_cv_header_term_h = xyes; then
+
 AC_MSG_CHECKING(if term.h needs curses.h)
 AC_TRY_COMPILE([#include <term.h>], [char **test = boolcodes;], boolcodes_with_only_term_h=yes,
 boolcodes_with_only_term_h=no)
@@ -613,6 +616,9 @@ AC_TRY_LINK([#include <curses.h>
 AC_DEFINE(HAVE_STRNAMES) strnames=yes, strnames=no)
 AC_MSG_RESULT($strnames)
 
+fi;;
+esac
+
 dnl Some systems (Solaris 2.x, Linux Redhat 5.x) require
 dnl libnsl (Network Services Library) to find yp_all