]> git.alsa-project.org Git - alsa-utils.git/commitdiff
alsamixer: Improve set_escdelay() function availability detection v1.0.21
authorJaroslav Kysela <perex@perex.cz>
Mon, 31 Aug 2009 15:03:04 +0000 (17:03 +0200)
committerJaroslav Kysela <perex@perex.cz>
Mon, 31 Aug 2009 15:13:36 +0000 (17:13 +0200)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
alsamixer/mainloop.c
configure.in

index 7a5ffdc8dc9021a1afde6b3cfc1fae4b3d97e7b0..eddaf3be44f21119d80703f93e6db3702c177eca 100644 (file)
@@ -44,7 +44,7 @@ void initialize_curses(bool use_color)
        curses_initialized = initscr();
        cbreak();
        noecho();
-#ifdef NCURSES_VERSION
+#ifdef HAVE_CURSES_ESCDELAY
        set_escdelay(100);
 #endif
        window_size_changed(); /* update screen_lines/cols */
index ec2a8bca4e31c9e7af5fb04efa2ca2fcd71a22bb..931d034da6b8bb15aa5dbd6572f10c670f257030 100644 (file)
@@ -171,6 +171,11 @@ if test x$alsamixer = xtrue; then
   fi
   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
     AC_MSG_CHECKING([for curses NLS support])
     dnl In theory, a single-byte curses works just fine in ISO 8859-* locales.