Skip to content
This repository was archived by the owner on Feb 28, 2025. It is now read-only.

Commit 57dddea

Browse files
committed
buildsys: fix broken detection for termcap libraries when using slang
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
1 parent 61b22eb commit 57dddea

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

m4.include/mc-use-termcap.m4

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,13 @@ AC_DEFUN([mc_USE_TERMCAP], [
55
screen_msg="$screen_msg with termcap database"
66
AC_MSG_NOTICE([using S-Lang screen library with termcap])
77
AC_DEFINE(USE_TERMCAP, 1, [Define to use termcap database])
8-
AC_CHECK_LIB(termcap, tgoto, [MCLIBS="$MCLIBS -ltermcap"], , [$LIBS])
8+
9+
ac_save_LIBS="$LIBS"
10+
AC_SEARCH_LIBS([tgoto], [termcap xcurses curses],
11+
[MCLIBS="$MCLIBS $ac_cv_search_tgoto"],
12+
[AC_MSG_ERROR([Could not find a library providing tgoto])]
13+
)
14+
LIBS="$ac_save_LIBS"
915
])
1016

1117
dnl

m4.include/mc-with-screen-slang.m4

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ AC_DEFUN([mc_WITH_SLANG], [
1616
dnl Check if termcap is needed.
1717
if test x"$found_slang" = x"yes"; then
1818
mc_SLANG_TERMCAP
19-
if test x"$mc_cv_slang_termcap" = x"yes"; then
20-
MCLIBS="$MCLIBS -ltermcap"
21-
fi
2219
fi
2320
2421
screen_type=slang

0 commit comments

Comments
 (0)