about summary refs log tree commit diff
path: root/configure.ac
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2007-11-20 15:48:51 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2007-11-20 15:48:51 +0000
commitbb70fc6fe6a4162f90ed88d5f1739a7cee1f2fde (patch)
treea61954acd6905f66f08511c9c040df63acbf4529 /configure.ac
parentc41324baa0a705a55e55a824b9e3bb9eda947e54 (diff)
downloadzsh-bb70fc6fe6a4162f90ed88d5f1739a7cee1f2fde.tar.gz
zsh-bb70fc6fe6a4162f90ed88d5f1739a7cee1f2fde.tar.xz
zsh-bb70fc6fe6a4162f90ed88d5f1739a7cee1f2fde.zip
24107: extra search for ncurses headers but dont use if library isnt ncurses
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac17
1 files changed, 14 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 394178117..fbbd76aca 100644
--- a/configure.ac
+++ b/configure.ac
@@ -557,7 +557,8 @@ 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 ncurses.h)
+		 sys/stropts.h iconv.h ncurses.h ncursesw/ncurses.h \
+		 ncurses/ncurses.h)
 if test x$dynamic = xyes; then
   AC_CHECK_HEADERS(dlfcn.h)
   AC_CHECK_HEADERS(dl.h)
@@ -639,7 +640,7 @@ AC_CHECK_LIB(m, pow)
 dnl Various features of ncurses depend on having the right header
 dnl (the system's own curses.h may well not be good enough).
 dnl So don't search for ncurses unless we found the header.
-if test x$ac_cv_header_ncurses_h = xyes; then
+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
   ncursesw_test=ncursesw
   ncurses_test=ncurses
 else
@@ -719,6 +720,16 @@ else
 AC_MSG_RESULT(no)
 fi
 
+dnl If our terminal library is not ncurses, don't try including
+dnl any ncurses headers.
+AH_TEMPLATE([ZSH_IGNORE_NCURSES],
+[Define to 1 to ignore any ncurses library headers found on the system.])
+case $LIBS in
+  ncurses*) ;;
+  *)
+  AC_DEFINE(ZSH_IGNORE_NCURSES) ;;
+esac
+
 AC_MSG_CHECKING(if boolcodes is available)
 AC_TRY_LINK([#ifdef TERM_H_NEEDS_CURSES_H
 #include <curses.h>
@@ -1381,7 +1392,7 @@ 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; then
+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
   echo "#include <ncurses.h>" >nametmp.c
 else
   if test x$ac_cv_header_curses_h = xyes; then