configure.ac: Check for the readline.h explicitly

When readline development package is missing make fails with
"configure: error: system readline is not new enough" which
might be confusing. This patch checks for the readline.h explicitly
and makes make to warn about the missing package.
This commit is contained in:
Alexandra Hájková
2021-11-18 03:49:52 -05:00
parent b69c9d41e8
commit 7c26f8da3d
3 changed files with 24 additions and 0 deletions

17
gdb/configure vendored
View File

@@ -9224,6 +9224,23 @@ fi
if test "$with_system_readline" = yes; then
for ac_header in readline/readline.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
if test "x$ac_cv_header_readline_readline_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_READLINE_READLINE_H 1
_ACEOF
readline_h=yes
else
readline_h=no
fi
done
if test "$readline_h" = "no"; then
as_fn_error $? "readline development packages are probably missing" "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system readline is new enough" >&5
$as_echo_n "checking whether system readline is new enough... " >&6; }
if ${gdb_cv_readline_ok+:} false; then :