Index: sim/erc32/configure.ac |
diff --git a/sim/erc32/configure.ac b/sim/erc32/configure.ac |
index 5a43b5eb50dc059a848332b20c822401645372db..bc460917784fbe50b021e041ad9762d1c9cffa7e 100644 |
--- a/sim/erc32/configure.ac |
+++ b/sim/erc32/configure.ac |
@@ -17,7 +17,9 @@ lose |
if test x$sim_cv_os_cygwin = xyes; then |
TERMCAP='`if test -r ../../libtermcap/libtermcap.a; then echo ../../libtermcap/libtermcap.a; else echo -ltermcap; fi` -luser32' |
else |
- AC_CHECK_LIB(termcap, main, TERMCAP=-ltermcap, TERMCAP="") |
+ # Keep in sync with gdb's configure.ac list. |
+ AC_SEARCH_LIBS(tgetent, [termcap tinfo curses ncurses], |
+ [TERMCAP=$ac_cv_search_tgetent], [TERMCAP=""]) |
fi |
AC_SUBST(TERMCAP) |