From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4997 invoked by alias); 31 Jul 2009 08:53:06 -0000 Received: (qmail 4989 invoked by uid 22791); 31 Jul 2009 08:53:05 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_92,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 31 Jul 2009 08:52:59 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n6V8qwC6002671 for ; Fri, 31 Jul 2009 04:52:58 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n6V8qvFa006800 for ; Fri, 31 Jul 2009 04:52:57 -0400 Received: from host0.dyn.jankratochvil.net (sebastian-int.corp.redhat.com [172.16.52.221]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n6V8qtXE007528 for ; Fri, 31 Jul 2009 04:52:56 -0400 Received: from host0.dyn.jankratochvil.net (localhost [127.0.0.1]) by host0.dyn.jankratochvil.net (8.14.3/8.14.3) with ESMTP id n6V8qsNc006091 for ; Fri, 31 Jul 2009 10:52:54 +0200 Received: (from jkratoch@localhost) by host0.dyn.jankratochvil.net (8.14.3/8.14.3/Submit) id n6V8qrju006087 for gdb-patches@sourceware.org; Fri, 31 Jul 2009 10:52:53 +0200 Date: Fri, 31 Jul 2009 14:36:00 -0000 From: Jan Kratochvil To: gdb-patches@sourceware.org Subject: [patch] Fix --with-system-readline vs. readline-6.0+ Message-ID: <20090731085253.GA5744@host0.dyn.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.19 (2009-01-05) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-07/txt/msg00758.txt.bz2 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 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)'