1 AC_DEFUN([BASH_CHECK_LIB_TERMCAP],
3 if test "X$bash_cv_termcap_lib" = "X"; then
6 AC_MSG_CHECKING(which library has the termcap functions)
9 AC_CACHE_VAL(bash_cv_termcap_lib,
10 [AC_CHECK_FUNC(tgetent, bash_cv_termcap_lib=libc,
11 [AC_CHECK_LIB(termcap, tgetent, bash_cv_termcap_lib=libtermcap,
12 [AC_CHECK_LIB(tinfo, tgetent, bash_cv_termcap_lib=libtinfo,
13 [AC_CHECK_LIB(curses, tgetent, bash_cv_termcap_lib=libcurses,
14 [AC_CHECK_LIB(ncurses, tgetent, bash_cv_termcap_lib=libncurses,
15 [AC_CHECK_LIB(ncursesw, tgetent, bash_cv_termcap_lib=libncursesw,
16 bash_cv_termcap_lib=gnutermcap)])])])])])])
17 if test "X$_bash_needmsg" = "Xyes"; then
18 AC_MSG_CHECKING(which library has the termcap functions)
20 AC_MSG_RESULT(using $bash_cv_termcap_lib)
21 if test $bash_cv_termcap_lib = gnutermcap && test -z "$prefer_curses"; then
22 LDFLAGS="$LDFLAGS -L./lib/termcap"
23 TERMCAP_LIB="./lib/termcap/libtermcap.a"
24 TERMCAP_DEP="./lib/termcap/libtermcap.a"
25 elif test $bash_cv_termcap_lib = libtermcap && test -z "$prefer_curses"; then
28 elif test $bash_cv_termcap_lib = libtinfo; then
31 elif test $bash_cv_termcap_lib = libncurses; then
34 elif test $bash_cv_termcap_lib = libc; then