about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--configure.ac15
2 files changed, 12 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 1c515507e..07e34abb4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2007-12-07  Clint Adams  <clint@zsh.org>
 
+	* 24172: configure.ac: check ncurses.h, ncurses/ncurses.h, and
+	ncursesw/ncurses.h for curses keys.
+
 	* 24171: Src/Modules/terminfo.c: define USE_TERMINFO_MODULE when
 	ncurses.h, ncurses/ncurses.h, or ncursesw/ncurses.h is present.
 
diff --git a/configure.ac b/configure.ac
index 11a74f55a..39906167f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1390,15 +1390,18 @@ dnl Where are curses key definitions located?  Need for keypad() mode.
 AC_CACHE_CHECK(where curses key definitions are located, zsh_cv_path_curses_keys_h,
 [dnl This is an identical trick to errno.h, except we use ncurses.h
 dnl if we can.
-if test x$ac_cv_header_ncurses_h = xyes || test x$ac_cv_header_ncurses_ncurses_h = xyes || test x$ac_cv_header_ncursesw_ncurses_h = xyes; then
+if test x$ac_cv_header_ncurses_h = xyes; then
   echo "#include <ncurses.h>" >nametmp.c
+elif test x$ac_cv_header_ncurses_ncurses_h = xyes
+  echo "#include <ncurses/ncurses.h>" >nametmp.c
+elif test x$ac_cv_header_ncursesw_ncurses_h = xyes; then
+  echo "#include <ncursesw/ncurses.h>" >nametmp.c
+elif test x$ac_cv_header_curses_h = xyes; then
+  echo "#include <curses.h>" >nametmp.c
 else
-  if test x$ac_cv_header_curses_h = xyes; then
-    echo "#include <curses.h>" >nametmp.c
-  else
-    echo >nametmp.c
-  fi
+  echo >nametmp.c
 fi
+
 curses_list="`$CPP nametmp.c |
 sed -n -e 's/^#line[ 	].*\"\(.*\)\"/\1/p' \
        -e 's/^#[ 	0-9].*\"\(.*\)\"/\1/p' |