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 bash_cv_termcap_lib=gnutermcap)])])])])])
16 if test "X$_bash_needmsg" = "Xyes"; then
17 AC_MSG_CHECKING(which library has the termcap functions)
19 AC_MSG_RESULT(using $bash_cv_termcap_lib)
20 if test $bash_cv_termcap_lib = gnutermcap && test -z "$prefer_curses"; then
21 LDFLAGS="$LDFLAGS -L./lib/termcap"
22 TERMCAP_LIB="./lib/termcap/libtermcap.a"
23 TERMCAP_DEP="./lib/termcap/libtermcap.a"
24 elif test $bash_cv_termcap_lib = libtermcap && test -z "$prefer_curses"; then
27 elif test $bash_cv_termcap_lib = libtinfo; then
30 elif test $bash_cv_termcap_lib = libncurses; then
33 elif test $bash_cv_termcap_lib = libc; then