aboutsummaryrefslogtreecommitdiff
path: root/gdb/configure.ac
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2009-10-02 16:02:34 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2009-10-02 16:02:34 +0000
commita71e0887e3568d4e38601402d00f40493e696601 (patch)
treed1ef87e8e46460b1ccf75974a98d77ddac8e7c84 /gdb/configure.ac
parent1428dcedf39c2104f5fa2b600decd1ad50a9470d (diff)
downloadgdb-a71e0887e3568d4e38601402d00f40493e696601.zip
gdb-a71e0887e3568d4e38601402d00f40493e696601.tar.gz
gdb-a71e0887e3568d4e38601402d00f40493e696601.tar.bz2
gdb/
Fix compatibility of --with-system-readline and readline-6.0+. * configure.ac <--with-system-readline> (for readline_echoing_p): New test. * config.in: Regenerate. * configure: Regenerate.
Diffstat (limited to 'gdb/configure.ac')
-rw-r--r--gdb/configure.ac15
1 files changed, 15 insertions, 0 deletions
diff --git a/gdb/configure.ac b/gdb/configure.ac
index b31d9b7..f9c17fd 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -534,6 +534,21 @@ if test "$with_system_readline" = yes; then
READLINE=-lreadline
READLINE_DEPS=
READLINE_CFLAGS=
+
+ # readline-6.0 started to use the name `_rl_echoing_p'.
+ # `$(READLINE_DIR)/' of bundled readline would not resolve in configure.
+
+ AC_MSG_CHECKING([for readline_echoing_p])
+ save_LIBS=$LIBS
+ LIBS="$LIBS $READLINE"
+ AC_LINK_IFELSE(AC_LANG_PROGRAM(,[[extern int readline_echoing_p;
+ return readline_echoing_p;]]),
+ [READLINE_ECHOING_P=yes],
+ [READLINE_ECHOING_P=no
+ AC_DEFINE([readline_echoing_p], [_rl_echoing_p],
+ [readline-6.0 started to use different name.])])
+ LIBS="$save_LIBS"
+ AC_MSG_RESULT([$READLINE_ECHOING_P])
else
READLINE='$(READLINE_DIR)/libreadline.a'
READLINE_DEPS='$(READLINE)'