Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Pedro Alves <palves@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCHSET] [4/4] Fix various issue in TUI
Date: Thu, 22 Jan 2015 16:26:00 -0000	[thread overview]
Message-ID: <83lhkuvl1v.fsf@gnu.org> (raw)
In-Reply-To: <54C0E7FE.4020401@redhat.com>

> Date: Thu, 22 Jan 2015 12:07:26 +0000
> From: Pedro Alves <palves@redhat.com>
> 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?


  reply	other threads:[~2015-01-22 16:26 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-31 17:56 Eli Zaretskii
2015-01-05 19:55 ` Pedro Alves
2015-01-05 20:06   ` Eli Zaretskii
2015-01-17  9:55     ` Eli Zaretskii
2015-01-19 14:50       ` Joel Brobecker
2015-01-19 16:26         ` Eli Zaretskii
2015-01-19 16:54           ` Joel Brobecker
2015-01-19 15:43       ` Joel Brobecker
2015-01-19 17:31         ` Eli Zaretskii
2015-01-19 17:54           ` Joel Brobecker
2015-01-22 12:07       ` Pedro Alves
2015-01-22 16:26         ` Eli Zaretskii [this message]
2015-01-22 17:15           ` Pedro Alves
2015-01-22 17:30             ` Eli Zaretskii
2015-01-22 18:36               ` Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83lhkuvl1v.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox