updated: [master] [57dddea] buildsys: fix broken detection for termcap libraries when using slang

1 view
Skip to first unread message

Yury V. Zaytsev

unread,
Jun 15, 2024, 4:41:43 AM6/15/24
to mc-co...@googlegroups.com
The following commit has been merged in the master branch:
commit 57dddea47c08411384eaa6dd6a220fec0c933417
Author: Yury V. Zaytsev <yu...@shurup.com>
Date: Mon Jun 3 17:51:02 2024 +0200

buildsys: fix broken detection for termcap libraries when using slang

Signed-off-by: Yury V. Zaytsev <yu...@shurup.com>

diff --git a/m4.include/mc-use-termcap.m4 b/m4.include/mc-use-termcap.m4
index 4ae6957..6781815 100644
--- a/m4.include/mc-use-termcap.m4
+++ b/m4.include/mc-use-termcap.m4
@@ -5,7 +5,13 @@ AC_DEFUN([mc_USE_TERMCAP], [
screen_msg="$screen_msg with termcap database"
AC_MSG_NOTICE([using S-Lang screen library with termcap])
AC_DEFINE(USE_TERMCAP, 1, [Define to use termcap database])
- AC_CHECK_LIB(termcap, tgoto, [MCLIBS="$MCLIBS -ltermcap"], , [$LIBS])
+
+ ac_save_LIBS="$LIBS"
+ AC_SEARCH_LIBS([tgoto], [termcap xcurses curses],
+ [MCLIBS="$MCLIBS $ac_cv_search_tgoto"],
+ [AC_MSG_ERROR([Could not find a library providing tgoto])]
+ )
+ LIBS="$ac_save_LIBS"
])

dnl
diff --git a/m4.include/mc-with-screen-slang.m4 b/m4.include/mc-with-screen-slang.m4
index c76de6e..1a74f30 100644
--- a/m4.include/mc-with-screen-slang.m4
+++ b/m4.include/mc-with-screen-slang.m4
@@ -16,9 +16,6 @@ AC_DEFUN([mc_WITH_SLANG], [
dnl Check if termcap is needed.
if test x"$found_slang" = x"yes"; then
mc_SLANG_TERMCAP
- if test x"$mc_cv_slang_termcap" = x"yes"; then
- MCLIBS="$MCLIBS -ltermcap"
- fi
fi

screen_type=slang

--
Midnight Commander Development
Reply all
Reply to author
Forward
0 new messages