alsamixer: Improve set_escdelay() function availability detection

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
Jaroslav Kysela 2009-08-31 17:03:04 +02:00
parent ca0ff77c7c
commit defee56c41
2 changed files with 6 additions and 1 deletions

View file

@ -44,7 +44,7 @@ void initialize_curses(bool use_color)
curses_initialized = initscr(); curses_initialized = initscr();
cbreak(); cbreak();
noecho(); noecho();
#ifdef NCURSES_VERSION #ifdef HAVE_CURSES_ESCDELAY
set_escdelay(100); set_escdelay(100);
#endif #endif
window_size_changed(); /* update screen_lines/cols */ window_size_changed(); /* update screen_lines/cols */

View file

@ -171,6 +171,11 @@ if test x$alsamixer = xtrue; then
fi fi
LIBS="$CURSESLIB $LIBS" LIBS="$CURSESLIB $LIBS"
AC_TRY_LINK([#include <panel.h>], [set_escdelay(100);],[HAVE_CURSES_ESCDELAY="yes"])
if test "$HAVE_CURSES_ESCDELAY" = "yes"; then
AC_DEFINE([HAVE_CURSES_ESCDELAY], 1, [Have curses set_escdelay])
fi
if test "$USE_NLS" = "yes"; then if test "$USE_NLS" = "yes"; then
AC_MSG_CHECKING([for curses NLS support]) AC_MSG_CHECKING([for curses NLS support])
dnl In theory, a single-byte curses works just fine in ISO 8859-* locales. dnl In theory, a single-byte curses works just fine in ISO 8859-* locales.