Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [patch] Fix --with-system-readline vs. readline-6.0+
@ 2009-07-31 14:36 Jan Kratochvil
  2009-07-31 14:37 ` Andreas Schwab
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Kratochvil @ 2009-07-31 14:36 UTC (permalink / raw)
  To: gdb-patches

Hi,

configure --with-system-readline with system readline-6.0 do cause:
.../gdb/tui/tui-io.c:567: undefined reference to `readline_echoing_p'
.../gdb/tui/tui-io.c:525: undefined reference to `readline_echoing_p'
.../gdb/tui/tui-io.c:530: undefined reference to `readline_echoing_p'
	http://koji.fedoraproject.org/koji/getfile?taskID=1515524&name=build.log

There are now various vendor patches out there
	http://www.mail-archive.com/pld-cvs-commit@lists.pld-linux.org/msg174978.html
	http://lists.opensuse.org/opensuse-commit/2009-03/msg00362.html
	http://osdir.com/ml/fedora-extras-commits/2009-07/msg05039.html

After bundled readline gets upgraded to 6.0 this AC_DEFINE should be reversed
and tui/tui-io.c to be updated to use _rl_echoing_p of the bundled version.


Thanks,
Jan


gdb/
2009-07-31  Jan Kratochvil  <jan.kratochvil@redhat.com>

	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.

--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -536,6 +536,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)'


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-08-05  8:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-31 14:36 [patch] Fix --with-system-readline vs. readline-6.0+ Jan Kratochvil
2009-07-31 14:37 ` Andreas Schwab
2009-08-04 17:42   ` Tom Tromey
2009-08-05  8:03     ` Andreas Schwab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox