From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1510 invoked by alias); 22 Jan 2015 16:26:31 -0000 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 Received: (qmail 1479 invoked by uid 89); 22 Jan 2015 16:26:27 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_SOFTFAIL autolearn=no version=3.3.2 X-HELO: mtaout27.012.net.il Received: from mtaout27.012.net.il (HELO mtaout27.012.net.il) (80.179.55.183) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 22 Jan 2015 16:26:25 +0000 Received: from conversion-daemon.mtaout27.012.net.il by mtaout27.012.net.il (HyperSendmail v2007.08) id <0NIL00N006F6A300@mtaout27.012.net.il> for gdb-patches@sourceware.org; Thu, 22 Jan 2015 18:19:17 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout27.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NIL00MT76O46410@mtaout27.012.net.il>; Thu, 22 Jan 2015 18:19:17 +0200 (IST) Date: Thu, 22 Jan 2015 16:26:00 -0000 From: Eli Zaretskii Subject: Re: [PATCHSET] [4/4] Fix various issue in TUI In-reply-to: <54C0E7FE.4020401@redhat.com> To: Pedro Alves Cc: gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: <83lhkuvl1v.fsf@gnu.org> References: <83vbkrbt4d.fsf@gnu.org> <54AAEC02.7020500@redhat.com> <83bnmd8028.fsf@gnu.org> <83y4p1zq7k.fsf@gnu.org> <54C0E7FE.4020401@redhat.com> X-IsSubscribed: yes X-SW-Source: 2015-01/txt/msg00595.txt.bz2 > Date: Thu, 22 Jan 2015 12:07:26 +0000 > From: Pedro Alves > CC: gdb-patches@sourceware.org > > >>> > > On 12/31/2014 05:56 PM, Eli Zaretskii wrote: > >>>> > > > Well, one patch is Windows-specific after all. This patch makes sure > >>>> > > > windows-termcap is not compiled when GDB is linked against ncurses, > >>> > > > >>> > > ... > >>> > > > >>>> > > > and also makes the file a no-op should it compile in that > >>>> > > > configuration. > >>> > > > >>> > > With the configure.ac change, how can that happen? > >> > > >> > It shouldn't. > > I'd have preferred to drop that hunk then. It just seems to > be either pointless or hiding some problem with the > configure.ac check. At the very least how about an #error in those conditions? Otherwise, any bit-rot (something that happens now and then with the MinGW build) will silently do the wrong thing. > "This patch makes sure windows-termcap is not compiled > when GDB is linked against ncurses". > > But that doesn't look to be what the patch does. > > I asked about $curses_found before because AFAICS, it's quite > possible for $prefer_curses to be set, but $curses_found > to be "no". By default, we try configuring the TUI: > > # Enable TUI. > AC_ARG_ENABLE(tui, > AS_HELP_STRING([--enable-tui], [enable full-screen terminal user interface (TUI)]), > [case $enableval in > yes | no | auto) > ;; > *) > AC_MSG_ERROR([bad value $enableval for --enable-tui]) ;; > esac],enable_tui=auto) > > And that always results in $prefer_curses set to yes: > > # For the TUI, we need enhanced curses functionality. > if test x"$enable_tui" != xno; then > prefer_curses=yes > fi > > > But then we check if curses is really found: > > curses_found=no > if test x"$prefer_curses" = xyes; then > ... > AC_SEARCH_LIBS(waddstr, [ncurses cursesX curses]) > > if test "$ac_cv_search_waddstr" != no; then > curses_found=yes > fi > fi > > > And then it's $curses_found that we check: > > # Check whether we should enable the TUI, but only do so if we really > # can. > if test x"$enable_tui" != xno; then > if test -d $srcdir/tui; then > if test "$curses_found" != no; then > ... > else > if test x"$enable_tui" = xyes; then > AC_MSG_ERROR([no enhanced curses library found; disable TUI]) > else > AC_MSG_WARN([no enhanced curses library found; disabling TUI]) > fi > fi > fi > fi > > > So shouldn't the right check be this: > > if test x"$curses_found" != xyes; then > ac_cv_search_tgetent="none required" > CONFIG_OBS="$CONFIG_OBS windows-termcap.o" > fi ;; > > ? I'm not sure. GDB can be configured --without-tui --with-curses. Does your logic work then?