Browse Source

* configure.ac src/graphics:

+ Check for resize_term and resizeterm in -lncurses.
tags/v0.99.beta14
Sam Hocevar sam 21 years ago
parent
commit
e80006de20
3 changed files with 12 additions and 1 deletions
  1. +6
    -1
      configure.ac
  2. +2
    -0
      msvc/config.h
  3. +4
    -0
      src/graphics.c

+ 6
- 1
configure.ac View File

@@ -127,7 +127,12 @@ if test "${enable_ncurses}" != "no"; then
[ac_cv_my_have_ncurses="yes"
AC_DEFINE(USE_NCURSES, 1, Define to activate the ncurses backend driver)
CACA_LIBS="${CACA_LIBS} -lncurses"
CACA_DRIVERS="${CACA_DRIVERS} ncurses"])])
CACA_DRIVERS="${CACA_DRIVERS} ncurses"
dnl Check for resizeterm or resize_term
SAVED_LIBS="${LIBS}"
LIBS="${LIBS} -lncurses"
AC_CHECK_FUNCS(resizeterm resize_term)
LIBS="${SAVED_LIBS}"])])
if test "${ac_cv_my_have_ncurses}" = "no" -a "${enable_ncurses}" = "yes"; then
AC_MSG_ERROR([cannot find ncurses development files])
fi


+ 2
- 0
msvc/config.h View File

@@ -12,6 +12,8 @@
#define HAVE_MEMORY_H 1
/* #undef HAVE_NCURSES_H */
#define HAVE_PUTENV 1
/* #undef HAVE_RESIZETERM */
/* #undef HAVE_RESIZE_TERM */
/* #undef HAVE_SIGNAL */
/* #undef HAVE_SIGNAL_H */
/* #undef HAVE_SLANG_H */


+ 4
- 0
src/graphics.c View File

@@ -1309,7 +1309,11 @@ static void caca_handle_resize(void)
{
_caca_width = size.ws_col;
_caca_height = size.ws_row;
#if defined(HAVE_RESIZE_TERM)
resize_term(_caca_height, _caca_width);
#else
resizeterm(_caca_height, _caca_width);
#endif
wrefresh(curscr);
}
}


Loading…
Cancel
Save