mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-25 17:20:25 +02:00
14123: don't include curses.h in termcap.c if term.h doesn't need it
This commit is contained in:
parent
b4b6d57e2c
commit
6dc04f1329
4 changed files with 34 additions and 4 deletions
|
|
@ -1,3 +1,8 @@
|
||||||
|
2001-04-26 Clint Adams <clint@zsh.org>
|
||||||
|
|
||||||
|
* 14123: acconfig.h, configure.in, Src/Modules/termcap.c:
|
||||||
|
don't include curses.h in termcap.c if term.h doesn't need it.
|
||||||
|
|
||||||
2001-04-26 Sven Wischnowsky <wischnow@zsh.org>
|
2001-04-26 Sven Wischnowsky <wischnow@zsh.org>
|
||||||
|
|
||||||
* 14117: Completion/Base/Utility/_arguments, Doc/Zsh/compsys.yo:
|
* 14117: Completion/Base/Utility/_arguments, Doc/Zsh/compsys.yo:
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,9 @@ static char termcap_nam[] = "termcap";
|
||||||
# ifdef HAVE_TERMIO_H
|
# ifdef HAVE_TERMIO_H
|
||||||
# include <termio.h>
|
# include <termio.h>
|
||||||
# endif
|
# endif
|
||||||
|
# ifdef TERM_H_NEEDS_CURSES_H
|
||||||
# include <curses.h>
|
# include <curses.h>
|
||||||
|
# endif
|
||||||
# include <term.h>
|
# include <term.h>
|
||||||
# else
|
# else
|
||||||
# ifdef USES_TERMCAP_H
|
# ifdef USES_TERMCAP_H
|
||||||
|
|
|
||||||
|
|
@ -317,3 +317,6 @@
|
||||||
|
|
||||||
/* Define if you have the terminfo strnames symbol. */
|
/* Define if you have the terminfo strnames symbol. */
|
||||||
#undef HAVE_STRNAMES
|
#undef HAVE_STRNAMES
|
||||||
|
|
||||||
|
/* Define if term.h chokes without curses.h */
|
||||||
|
#undef TERM_H_NEEDS_CURSES_H
|
||||||
|
|
|
||||||
26
configure.in
26
configure.in
|
|
@ -515,18 +515,38 @@ case "$host_os" in
|
||||||
esac
|
esac
|
||||||
|
|
||||||
AC_SEARCH_LIBS(tgetent, [$termcap_curses_order])
|
AC_SEARCH_LIBS(tgetent, [$termcap_curses_order])
|
||||||
|
AC_MSG_CHECKING(if term.h needs curses.h)
|
||||||
|
AC_TRY_COMPILE([#include <term.h>], [char **test = boolcodes;], boolcodes_with_only_term_h=yes,
|
||||||
|
boolcodes_with_only_term_h=no)
|
||||||
|
AC_TRY_COMPILE([#include <curses.h>
|
||||||
|
#include <term.h>], [char **test = boolcodes;], boolcodes_with_curses_h_and_term_h=yes,
|
||||||
|
boolcodes_with_curses_h_and_term_h=no)
|
||||||
|
if test "x$boolcodes_with_curses_h_and_term_h" = xyes && test "x$boolcodes_with_only_term_h" = xno;
|
||||||
|
then
|
||||||
|
AC_DEFINE(TERM_H_NEEDS_CURSES_H)
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
fi
|
||||||
|
|
||||||
AC_MSG_CHECKING(if boolcodes is available)
|
AC_MSG_CHECKING(if boolcodes is available)
|
||||||
AC_TRY_LINK([#include <curses.h>
|
AC_TRY_LINK([#ifdef TERM_H_NEEDS_CURSES_H
|
||||||
|
#include <curses.h>
|
||||||
|
#endif
|
||||||
#include <term.h>], [char **test = boolcodes;],
|
#include <term.h>], [char **test = boolcodes;],
|
||||||
AC_DEFINE(HAVE_BOOLCODES) boolcodes=yes, boolcodes=no)
|
AC_DEFINE(HAVE_BOOLCODES) boolcodes=yes, boolcodes=no)
|
||||||
AC_MSG_RESULT($boolcodes)
|
AC_MSG_RESULT($boolcodes)
|
||||||
AC_MSG_CHECKING(if numcodes is available)
|
AC_MSG_CHECKING(if numcodes is available)
|
||||||
AC_TRY_LINK([#include <curses.h>
|
AC_TRY_LINK([#ifdef TERM_H_NEEDS_CURSES_H
|
||||||
|
#include <curses.h>
|
||||||
|
#endif
|
||||||
#include <term.h>], [char **test = numcodes;],
|
#include <term.h>], [char **test = numcodes;],
|
||||||
AC_DEFINE(HAVE_NUMCODES) numcodes=yes, numcodes=no)
|
AC_DEFINE(HAVE_NUMCODES) numcodes=yes, numcodes=no)
|
||||||
AC_MSG_RESULT($numcodes)
|
AC_MSG_RESULT($numcodes)
|
||||||
AC_MSG_CHECKING(if strcodes is available)
|
AC_MSG_CHECKING(if strcodes is available)
|
||||||
AC_TRY_LINK([#include <curses.h>
|
AC_TRY_LINK([#ifdef TERM_H_NEEDS_CURSES_H
|
||||||
|
#include <curses.h>
|
||||||
|
#endif
|
||||||
#include <term.h>], [char **test = strcodes;],
|
#include <term.h>], [char **test = strcodes;],
|
||||||
AC_DEFINE(HAVE_STRCODES) strcodes=yes, strcodes=no)
|
AC_DEFINE(HAVE_STRCODES) strcodes=yes, strcodes=no)
|
||||||
AC_MSG_RESULT($strcodes)
|
AC_MSG_RESULT($strcodes)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue