aboutsummaryrefslogtreecommitdiff
path: root/gdb/configure
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
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')
-rwxr-xr-xgdb/configure33
1 files changed, 33 insertions, 0 deletions
diff --git a/gdb/configure b/gdb/configure
index 99acc2f..40fb803 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -8431,6 +8431,39 @@ 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.
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline_echoing_p" >&5
+$as_echo_n "checking for readline_echoing_p... " >&6; }
+ save_LIBS=$LIBS
+ LIBS="$LIBS $READLINE"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+extern int readline_echoing_p;
+ return readline_echoing_p;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ READLINE_ECHOING_P=yes
+else
+ READLINE_ECHOING_P=no
+
+$as_echo "#define readline_echoing_p _rl_echoing_p" >>confdefs.h
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS="$save_LIBS"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_ECHOING_P" >&5
+$as_echo "$READLINE_ECHOING_P" >&6; }
else
READLINE='$(READLINE_DIR)/libreadline.a'
READLINE_DEPS='$(READLINE)'