From 789326544fdc4a4fad5b711d55d5fdb4b49c7ed6 Mon Sep 17 00:00:00 2001
From: "Yury V. Zaytsev" <yury@shurup.com>
Date: Mon, 3 Jun 2024 17:51:02 +0200
Subject: [PATCH] buildsys: fix broken detection for termcap libraries when
using slang
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
---
m4.include/mc-use-termcap.m4 | 8 +++++++-
m4.include/mc-with-screen-slang.m4 | 3 ---
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/m4.include/mc-use-termcap.m4 b/m4.include/mc-use-termcap.m4
index 4ae695780..6781815fd 100644
a
|
b
|
AC_DEFUN([mc_USE_TERMCAP], [ |
5 | 5 | screen_msg="$screen_msg with termcap database" |
6 | 6 | AC_MSG_NOTICE([using S-Lang screen library with termcap]) |
7 | 7 | 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" |
9 | 15 | ]) |
10 | 16 | |
11 | 17 | dnl |
diff --git a/m4.include/mc-with-screen-slang.m4 b/m4.include/mc-with-screen-slang.m4
index c76de6e6f..1a74f3012 100644
a
|
b
|
AC_DEFUN([mc_WITH_SLANG], [ |
16 | 16 | dnl Check if termcap is needed. |
17 | 17 | if test x"$found_slang" = x"yes"; then |
18 | 18 | mc_SLANG_TERMCAP |
19 | | if test x"$mc_cv_slang_termcap" = x"yes"; then |
20 | | MCLIBS="$MCLIBS -ltermcap" |
21 | | fi |
22 | 19 | fi |
23 | 20 | |
24 | 21 | screen_type=slang |