about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Src/Modules/curses.c15
-rw-r--r--configure.ac2
3 files changed, 17 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index bb8dc1ce1..9f6e2d0c3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-10-24  Peter Stephenson  <pws@csr.com>
+
+	* 24016: configure.ac, Src/Modules/curses.c: compilation with
+	curses and not ncurses.
+
 2007-10-23  Clint Adams  <clint@zsh.org>
 
 	* 24012: Src/Modules/curses.c: rename "endwin", "c", and "s" to
diff --git a/Src/Modules/curses.c b/Src/Modules/curses.c
index 8c9fed4ad..dd38b5e95 100644
--- a/Src/Modules/curses.c
+++ b/Src/Modules/curses.c
@@ -29,7 +29,17 @@
 
 #define _XOPEN_SOURCE_EXTENDED 1
 
-#include <ncurses.h>
+#include "curses.mdh"
+#include "curses.pro"
+
+#ifdef HAVE_NCURSES_H
+# include <ncurses.h>
+#else
+# ifdef HAVE_CURSES_H
+#  include <curses.h>
+# endif
+#endif
+
 #ifndef MULTIBYTE_SUPPORT
 # undef HAVE_SETCCHAR
 # undef HAVE_WADDWSTR
@@ -41,9 +51,6 @@
 
 #include <stdio.h>
 
-#include "curses.mdh"
-#include "curses.pro"
-
 typedef struct zc_win {
     WINDOW *win;
     char *name;
diff --git a/configure.ac b/configure.ac
index e79060d20..d7483e1fb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -557,7 +557,7 @@ AC_CHECK_HEADERS(sys/time.h sys/times.h sys/select.h termcap.h termio.h \
 		 unistd.h sys/capability.h \
 		 utmp.h utmpx.h sys/types.h pwd.h grp.h poll.h sys/mman.h \
 		 netinet/in_systm.h pcre.h langinfo.h wchar.h stddef.h \
-		 sys/stropts.h iconv.h)
+		 sys/stropts.h iconv.h ncurses.h)
 if test x$dynamic = xyes; then
   AC_CHECK_HEADERS(dlfcn.h)
   AC_CHECK_HEADERS(dl.h)