summaryrefslogtreecommitdiff
path: root/gdb/configure.ac
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2019-04-21 13:58:49 -0600
committerTom Tromey <tom@tromey.com>2019-08-12 10:57:56 -0600
commit86c6b807f50ecec84e55007bf6cb6e54c159727b (patch)
tree1b3454909a376b369eecaf0df7d20b7558bf5bce /gdb/configure.ac
parent5db2718ce48c497e317787caebacd019da59c3b0 (diff)
downloadbinutils-gdb-86c6b807f50ecec84e55007bf6cb6e54c159727b.tar.gz
Require readline 7 or newer
This changes gdb to require readline 7 or newer at build time. gdb/ChangeLog 2019-08-12 Tom Tromey <tom@tromey.com> * configure: Rebuild. * configure.ac: Check for readline 7. * NEWS: Mention readline 7 requirement. * README: Update. gdb/doc/ChangeLog 2019-08-12 Tom Tromey <tom@tromey.com> * gdb.texinfo (Configure Options): Document minimum version of readline.
Diffstat (limited to 'gdb/configure.ac')
-rw-r--r--gdb/configure.ac14
1 files changed, 14 insertions, 0 deletions
diff --git a/gdb/configure.ac b/gdb/configure.ac
index 05b722b7f11..0979109d976 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -581,6 +581,20 @@ AC_ARG_WITH([system-readline],
[use installed readline library])])
if test "$with_system_readline" = yes; then
+ AC_CACHE_CHECK([whether system readline is new enough],
+ [gdb_cv_readline_ok],
+ [AC_TRY_COMPILE(
+ [#include <stdio.h>
+#include <readline/readline.h>],
+ [#if RL_VERSION_MAJOR < 7
+# error "readline version 7 required"
+#endif],
+ gdb_cv_readline_ok=yes,
+ gdb_cv_readline_ok=no)])
+ if test "$gdb_cv_readline_ok" != yes; then
+ AC_MSG_ERROR([system readline is not new enough])
+ fi
+
READLINE=-lreadline
READLINE_DEPS=
READLINE_CFLAGS=