Commit f544507b authored by Michael Veksler's avatar Michael Veksler Committed by Alexandre Julliard

Added configure check for getbkgd and define HAVE_GETBKGD.

parent 40d9d3d0
...@@ -149,12 +149,14 @@ fi ...@@ -149,12 +149,14 @@ fi
if test "$ac_cv_lib_ncurses_waddch" = "yes" if test "$ac_cv_lib_ncurses_waddch" = "yes"
then then
AC_CHECK_LIB(ncurses,resizeterm,AC_DEFINE(HAVE_RESIZETERM)) AC_CHECK_LIB(ncurses,resizeterm,AC_DEFINE(HAVE_RESIZETERM))
AC_CHECK_LIB(ncurses,getbkgd,AC_DEFINE(HAVE_GETBKGD))
else else
AC_CHECK_HEADERS(curses.h) AC_CHECK_HEADERS(curses.h)
if test "$ac_cv_header_curses_h" = "yes" if test "$ac_cv_header_curses_h" = "yes"
then then
AC_CHECK_LIB(curses,waddch) AC_CHECK_LIB(curses,waddch)
AC_CHECK_LIB(curses,resizeterm,AC_DEFINE(HAVE_RESIZETERM)) AC_CHECK_LIB(curses,resizeterm,AC_DEFINE(HAVE_RESIZETERM))
AC_CHECK_LIB(curses,getbkgd,AC_DEFINE(HAVE_GETBKGD))
fi fi
fi fi
......
...@@ -57,7 +57,9 @@ void NCURSES_Start() ...@@ -57,7 +57,9 @@ void NCURSES_Start()
driver.getCharacterAtCursor = NCURSES_GetCharacterAtCursor; driver.getCharacterAtCursor = NCURSES_GetCharacterAtCursor;
driver.clearScreen = NCURSES_ClearScreen; driver.clearScreen = NCURSES_ClearScreen;
driver.allocColor = NCURSES_AllocColor; driver.allocColor = NCURSES_AllocColor;
#ifdef HAVE_GETBKGD
driver.setBackgroundColor = NCURSES_SetBackgroundColor; driver.setBackgroundColor = NCURSES_SetBackgroundColor;
#endif
#ifdef HAVE_RESIZETERM #ifdef HAVE_RESIZETERM
driver.notifyResizeScreen = NCURSES_NotifyResizeScreen; driver.notifyResizeScreen = NCURSES_NotifyResizeScreen;
#endif /* HAVE_RESIZETERM */ #endif /* HAVE_RESIZETERM */
...@@ -213,6 +215,7 @@ void NCURSES_SetBackgroundColor(int fg, int bg) ...@@ -213,6 +215,7 @@ void NCURSES_SetBackgroundColor(int fg, int bg)
wbkgd(stdscr, COLOR_PAIR(pair)); wbkgd(stdscr, COLOR_PAIR(pair));
} }
#ifdef HAVE_GETBKGD
void NCURSES_GetBackgroundColor(int *fg, int *bg) void NCURSES_GetBackgroundColor(int *fg, int *bg)
{ {
chtype background; chtype background;
...@@ -227,6 +230,7 @@ void NCURSES_GetBackgroundColor(int *fg, int *bg) ...@@ -227,6 +230,7 @@ void NCURSES_GetBackgroundColor(int *fg, int *bg)
*fg = sfg; *fg = sfg;
*bg = sbg; *bg = sbg;
} }
#endif /* HAVE_GETBKGD */
#ifdef HAVE_RESIZETERM #ifdef HAVE_RESIZETERM
......
...@@ -69,6 +69,9 @@ ...@@ -69,6 +69,9 @@
/* Define if ncurses have the new resizeterm function */ /* Define if ncurses have the new resizeterm function */
#undef HAVE_RESIZETERM #undef HAVE_RESIZETERM
/* Define if ncurses have the new getbkgd function */
#undef HAVE_GETBKGD
/* Define if we can a compatible xterm program */ /* Define if we can a compatible xterm program */
#undef XTERM_PROGRAM #undef XTERM_PROGRAM
......
...@@ -75,6 +75,9 @@ ...@@ -75,6 +75,9 @@
/* Define if ncurses have the new resizeterm function */ /* Define if ncurses have the new resizeterm function */
#undef HAVE_RESIZETERM #undef HAVE_RESIZETERM
/* Define if ncurses have the new getbkgd function */
#undef HAVE_GETBKGD
/* Define if IPX should use netipx/ipx.h from libc */ /* Define if IPX should use netipx/ipx.h from libc */
#undef HAVE_IPX_GNU #undef HAVE_IPX_GNU
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment