From: Christophe Lyon <christophe.lyon@arm.com>
To: <gdb-patches@sourceware.org>
Subject: [PATCH] configure: exit with an error if no termcap lib is installed
Date: Thu, 21 Jul 2022 10:51:24 +0200 [thread overview]
Message-ID: <20220721085124.76878-1-christophe.lyon@arm.com> (raw)
The termcap detection code in aclocal.m4 (BASH_CHECK_LIB_TERMCAP)
defaults to "gnutermcap" if none of the usual libraries is available
(termcap, tinfo, curses, ncurses, ncursesw).
Then it sets TERMCAP_LIB to "./lib/termcap/libtermcap.a", so it
expects that libtermcap.a is present under lib/termcap in the build
directory.
In fact, this is generally not the case (we do not manually install
libtermcap in the build tree), so it's better to stop with an error
message.
---
readline/README | 3 +++
readline/readline/configure | 2 +-
readline/readline/configure.ac | 3 +--
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/readline/README b/readline/README
index 54e1c72b197..20b12b6d8a9 100644
--- a/readline/README
+++ b/readline/README
@@ -16,3 +16,6 @@ update this file.
Individual upstream readline patches can be directly imported using
"git am". You can see the current patch level by looking at
readline/patchlevel.
+
+Local patches:
+- configure: exit with an error if no termcap lib is installed
diff --git a/readline/readline/configure b/readline/readline/configure
index 6ea4545e26f..b162eb374a1 100755
--- a/readline/readline/configure
+++ b/readline/readline/configure
@@ -6367,7 +6367,7 @@ if test "$TERMCAP_LIB" = "./lib/termcap/libtermcap.a"; then
if test "$prefer_curses" = yes; then
TERMCAP_LIB=-lcurses
else
- TERMCAP_LIB=-ltermcap #default
+ as_fn_error $? "missing required termcap lib or equivalent" "$LINENO" 5
fi
fi
# Windows ncurses installation
diff --git a/readline/readline/configure.ac b/readline/readline/configure.ac
index 912c99b6575..4e2102e8198 100644
--- a/readline/readline/configure.ac
+++ b/readline/readline/configure.ac
@@ -207,8 +207,7 @@ if test "$TERMCAP_LIB" = "./lib/termcap/libtermcap.a"; then
if test "$prefer_curses" = yes; then
TERMCAP_LIB=-lcurses
else
- TERMCAP_LIB=-ltermcap #default
- fi
+ AC_MSG_ERROR(missing required termcap lib or equivalent) fi
fi
# Windows ncurses installation
if test "$TERMCAP_LIB" = "-lncurses"; then
--
2.25.1
next reply other threads:[~2022-07-21 8:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-21 8:51 Christophe Lyon [this message]
2022-07-22 20:35 ` Keith Seitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220721085124.76878-1-christophe.lyon@arm.com \
--to=christophe.lyon@arm.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).