--- configure.old 2011-12-11 16:22:11.000000000 +0000 +++ configure 2011-12-19 21:01:07.000000000 +0000 @@ -16591,6 +16595,58 @@ $as_echo "$ac_cv_lib_readline_readline" >&6; } if test "x$ac_cv_lib_readline_readline" = xyes; then : HAVE_LIB_READLINE=1 +else + ac_fn_c_check_func "$LINENO" "tputs" "ac_cv_func_tputs" +if test "x$ac_cv_func_tputs" = xyes; then : + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tputs in -lcurses" >&5 +$as_echo_n "checking for tputs in -lcurses... " >&6; } +if ${ac_cv_lib_curses_tputs+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcurses $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char tputs (); +int +main () +{ +return tputs (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_curses_tputs=yes +else + ac_cv_lib_curses_tputs=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_tputs" >&5 +$as_echo "$ac_cv_lib_curses_tputs" >&6; } +if test "x$ac_cv_lib_curses_tputs" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBCURSES 1 +_ACEOF + + LIBS="-lcurses $LIBS" + +fi + +fi + fi