diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2004-02-26 12:40:53 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2004-02-26 12:40:53 +0000 |
commit | 8b8cc745d952bbeebb474d884b0a63e4ff08400f (patch) | |
tree | ed54171ba242d107e48f9cffe259641dc77ee501 /Src | |
parent | 67b03b2f2c3ee90b7c5fce5932aa5388e8c10d5f (diff) | |
download | zsh-8b8cc745d952bbeebb474d884b0a63e4ff08400f.tar.gz zsh-8b8cc745d952bbeebb474d884b0a63e4ff08400f.tar.xz zsh-8b8cc745d952bbeebb474d884b0a63e4ff08400f.zip |
19460: Another go at fixing the terminfo configuration problem
Diffstat (limited to 'Src')
-rw-r--r-- | Src/Modules/terminfo.c | 26 | ||||
-rw-r--r-- | Src/Modules/terminfo.mdd | 4 |
2 files changed, 17 insertions, 13 deletions
diff --git a/Src/Modules/terminfo.c b/Src/Modules/terminfo.c index f869e0e36..548e52bfb 100644 --- a/Src/Modules/terminfo.c +++ b/Src/Modules/terminfo.c @@ -29,12 +29,18 @@ #define USES_TERM_H 1 #include "terminfo.mdh" -#include "terminfo.pro" +#if defined(HAVE_TIGETFLAG) && defined(HAVE_CURSES_H) +# define USE_TERMINFO_MODULE 1 +#else +# undef USE_TERMINFO_MODULE +#endif + +#include "terminfo.pro" static char terminfo_nam[] = "terminfo"; /**/ -#ifdef HAVE_TIGETSTR +#ifdef USE_TERMINFO_MODULE /* The following two undefs are needed for Solaris 2.6 */ # ifdef VINTR @@ -44,9 +50,7 @@ static char terminfo_nam[] = "terminfo"; # undef offsetof # endif -# ifdef HAVE_CURSES_H -# include <curses.h> -# endif +# include <curses.h> # ifdef HAVE_TERM_H # include <term.h> # endif @@ -123,19 +127,19 @@ bin_echoti(char *name, char **argv, Options ops, int func) } /**/ -#else /* !HAVE_TIGETSTR */ +#else /* !USE_TERMINFO_MODULE */ #define bin_echoti bin_notavail /**/ -#endif /* !HAVE_TIGETSTR */ +#endif /* !USE_TERMINFO_MODULE */ static struct builtin bintab[] = { BUILTIN("echoti", 0, bin_echoti, 1, -1, 0, NULL, NULL), }; /**/ -#ifdef HAVE_TIGETSTR +#ifdef USE_TERMINFO_MODULE /* Empty dummy function for special hash parameters. */ @@ -361,7 +365,7 @@ scanterminfo(HashTable ht, ScanFunc func, int flags) } /**/ -#endif /* HAVE_TIGETSTR */ +#endif /* USE_TERMINOF_MODULE */ /**/ int @@ -374,7 +378,7 @@ setup_(Module m) int boot_(Module m) { -#ifdef HAVE_TIGETSTR +#ifdef USE_TERMINFO_MODULE # ifdef HAVE_SETUPTERM int errret; @@ -394,7 +398,7 @@ boot_(Module m) int cleanup_(Module m) { -#ifdef HAVE_TIGETSTR +#ifdef USE_TERMINFO_MODULE Param pm; if ((pm = (Param) paramtab->getnode(paramtab, terminfo_nam)) && diff --git a/Src/Modules/terminfo.mdd b/Src/Modules/terminfo.mdd index da79e9768..7d88dfb27 100644 --- a/Src/Modules/terminfo.mdd +++ b/Src/Modules/terminfo.mdd @@ -1,13 +1,13 @@ name=zsh/terminfo -link='if test "x$ac_cv_func_tigetstr" = xyes; then +link='if test "x$ac_cv_func_tigetflag" = xyes -a "x$ac_cv_header_curses_h" = xyes; then if test "x$zsh_cv_shared_tigetstr" = xyes; then echo either else echo static fi else - echo either; + echo no; fi ' load=yes |