about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2001-05-08 18:34:38 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2001-05-08 18:34:38 +0000
commit7548baf57b95f0e3083cf5074924f016dcff5f98 (patch)
tree0d83080eb91a8a956cc6d481fd22239fe299a026
parentb8fd7a31bdce7a6e426e661644c0be21723a2962 (diff)
downloadzsh-7548baf57b95f0e3083cf5074924f016dcff5f98.tar.gz
zsh-7548baf57b95f0e3083cf5074924f016dcff5f98.tar.xz
zsh-7548baf57b95f0e3083cf5074924f016dcff5f98.zip
Use AC_TRY_COMPILE for curses.h test because of SunOS 5.8
-rw-r--r--ChangeLog6
-rw-r--r--acconfig.h3
-rw-r--r--configure.in7
3 files changed, 15 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index f523c46a1..21a795676 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2001-05-08  Peter Stephenson  <pws@csr.com>
+
+	* probably 14268: configure.in, acconfig.h: use TRY_COMPILE
+	to check for curses.h because SunOS 5.8 produces warnings which
+	cause HAVE_CURSES_H not to be defined.
+
 2001-05-08  Bart Schaefer  <schaefer@zsh.org>
 
 	* unposted: Completion/Zsh/Context/_subscript: Remove unnecessary
diff --git a/acconfig.h b/acconfig.h
index 733782f8d..d05219ba7 100644
--- a/acconfig.h
+++ b/acconfig.h
@@ -318,5 +318,8 @@
 /* Define if you have the terminfo strnames symbol.  */
 #undef HAVE_STRNAMES
 
+/* Define if we have curses.h */
+#undef HAVE_CURSES_H
+
 /* Define if term.h chokes without curses.h */
 #undef TERM_H_NEEDS_CURSES_H
diff --git a/configure.in b/configure.in
index 053502142..e2130d166 100644
--- a/configure.in
+++ b/configure.in
@@ -562,7 +562,12 @@ esac])dnl
 AC_SEARCH_LIBS(tgetent, [$termcap_curses_order])
 case "$LIBS" in
 *curses*)
-AC_CHECK_HEADERS(curses.h term.h)
+AC_CACHE_CHECK(for curses.h, ac_cv_header_curses_h,
+AC_TRY_COMPILE([#include <curses.h>], [],
+[ac_cv_header_curses_h=yes
+AC_DEFINE(HAVE_CURSES_H)],
+ac_cv_header_curses_h=no))
+AC_CHECK_HEADERS(term.h)
 if test x$ac_cv_header_term_h = xyes; then
 
 AC_MSG_CHECKING(if term.h needs curses.h)