Add test to see if curses has keypad(). May break on Solaris - we'll see.

Fix from discussion with Steve Schultz
This commit is contained in:
rocky
2005-04-22 01:54:13 +00:00
parent c825b6af5e
commit a691a9a1b1
2 changed files with 14 additions and 6 deletions

View File

@@ -19,7 +19,7 @@ define(RELEASE_NUM, 73)
define(CDIO_VERSION_STR, 0.$1)
AC_PREREQ(2.52)
AC_REVISION([$Id: configure.ac,v 1.153 2005/04/14 00:35:03 rocky Exp $])dnl
AC_REVISION([$Id: configure.ac,v 1.154 2005/04/22 01:54:13 rocky Exp $])dnl
AC_INIT(libcdio, CDIO_VERSION_STR(RELEASE_NUM))
AC_CONFIG_SRCDIR(src/cd-info.c)
@@ -509,11 +509,17 @@ fi
AC_SUBST(CDDB_LIBS)
AC_DEFINE(HAVE_KEYPAD, [], [Define this if your libcurses has keypad])
if test x$enable_cdda_player = xyes; then
AC_CHECK_LIB(curses, mvprintw, [CDDA_PLAYER_LIBS="$CDDA_PLAYER_LIBS -lcurses"],
AC_CHECK_LIB(ncurses, mvprintw, [CDDA_PLAYER_LIBS="$CDDA_PLAYER_LIBS -lncurses"],
[AC_MSG_WARN([Will not build cdda-player - did not find libcurses or libncurses])
enable_cdda_player=no]))
AC_CHECK_LIB(ncurses, mvprintw,
[LIBCURSES=ncurses; CDDA_PLAYER_LIBS="$CDDA_PLAYER_LIBS -lncurses"],
AC_CHECK_LIB(curses, mvprintw,
[LIBCURSES=curses; CDDA_PLAYER_LIBS="$CDDA_PLAYER_LIBS -lcurses"],
[AC_MSG_WARN([Will not build cdda-player - did not find libcurses or libncurses])
enable_cdda_player=no]))
if test x$enable_cdda_player = xyes; then
AC_CHECK_LIB($LIBCURSES, keypad, [HAVE_KEYPAD=yes])
fi
fi
AC_SUBST(CDDA_PLAYER_LIBS)

View File

@@ -1,5 +1,5 @@
/*
$Id: cdda-player.c,v 1.33 2005/04/17 06:19:48 rocky Exp $
$Id: cdda-player.c,v 1.34 2005/04/22 01:54:13 rocky Exp $
Copyright (C) 2005 Rocky Bernstein <rocky@panix.com>
@@ -203,7 +203,9 @@ tty_raw()
initscr();
cbreak();
noecho();
#ifdef HAVE_KEYPAD
keypad(stdscr,1);
#endif
refresh();
}