Return to BASH_CHECK_LIB_TERMCAP CVS log | Up to [ELWIX - Embedded LightWeight unIX -] / embedaddon / readline / examples / autoconf |
1.1 ! misho 1: AC_DEFUN([BASH_CHECK_LIB_TERMCAP], ! 2: [ ! 3: if test "X$bash_cv_termcap_lib" = "X"; then ! 4: _bash_needmsg=yes ! 5: else ! 6: AC_MSG_CHECKING(which library has the termcap functions) ! 7: _bash_needmsg= ! 8: fi ! 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) ! 18: fi ! 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 ! 25: TERMCAP_LIB=-ltermcap ! 26: TERMCAP_DEP= ! 27: elif test $bash_cv_termcap_lib = libtinfo; then ! 28: TERMCAP_LIB=-ltinfo ! 29: TERMCAP_DEP= ! 30: elif test $bash_cv_termcap_lib = libncurses; then ! 31: TERMCAP_LIB=-lncurses ! 32: TERMCAP_DEP= ! 33: elif test $bash_cv_termcap_lib = libc; then ! 34: TERMCAP_LIB= ! 35: TERMCAP_DEP= ! 36: else ! 37: TERMCAP_LIB=-lcurses ! 38: TERMCAP_DEP= ! 39: fi ! 40: ])