|
51
|
1 AC_DEFUN([MP_WITH_CURSES],
|
|
|
2 [AC_ARG_WITH(ncurses, [ --with-ncurses Force the use of ncurses over curses],,)
|
|
|
3 mp_save_LIBS="$LIBS"
|
|
|
4 CURSES_LIB=""
|
|
|
5 if test "$with_ncurses" != yes
|
|
|
6 then
|
|
|
7 AC_CACHE_CHECK([for working curses], mp_cv_curses,
|
|
|
8 [LIBS="$LIBS -lcurses"
|
|
|
9 AC_TRY_LINK(
|
|
|
10 [#include <curses.h>],
|
|
|
11 [chtype a; int b=A_STANDOUT, c=KEY_LEFT; initscr(); ],
|
|
|
12 mp_cv_curses=yes, mp_cv_curses=no)])
|
|
|
13 if test "$mp_cv_curses" = yes
|
|
|
14 then
|
|
|
15 AC_DEFINE(HAVE_CURSES_H, 1, [Define to 1 if libcurses is requested])
|
|
|
16 #AC_DEFINE(HAVE_CURSES_H)
|
|
|
17 CURSES_LIB="-lcurses"
|
|
|
18 fi
|
|
|
19 fi
|
|
|
20 if test ! "$CURSES_LIB"
|
|
|