From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19472 invoked by alias); 22 Jan 2015 17:15:11 -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 19426 invoked by uid 89); 22 Jan 2015 17:15:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 22 Jan 2015 17:15:05 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t0MHF28A002644 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 22 Jan 2015 12:15:02 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t0MHF1c4015775; Thu, 22 Jan 2015 12:15:01 -0500 Message-ID: <54C13014.6050306@redhat.com> Date: Thu, 22 Jan 2015 17:15:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Eli Zaretskii CC: gdb-patches@sourceware.org Subject: Re: [PATCHSET] [4/4] Fix various issue in TUI References: <83vbkrbt4d.fsf@gnu.org> <54AAEC02.7020500@redhat.com> <83bnmd8028.fsf@gnu.org> <83y4p1zq7k.fsf@gnu.org> <54C0E7FE.4020401@redhat.com> <83lhkuvl1v.fsf@gnu.org> In-Reply-To: <83lhkuvl1v.fsf@gnu.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2015-01/txt/msg00600.txt.bz2 On 01/22/2015 04:26 PM, Eli Zaretskii wrote: >> 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. Well, I fear that the #ifdefery can bit rot just as well. So having two places that can bitrot (configure and #ifdef) seems worse than one. >> >> 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? It's the same thing. That sets $prefer_curses: opt_curses=no AC_ARG_WITH(curses, AS_HELP_STRING([--with-curses], [use the curses library instead of the termcap library]), opt_curses=$withval) prefer_curses=no if test "$opt_curses" = "yes"; then prefer_curses=yes fi But that doesn't mean that curses will be used. We'll again fall here: 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 if waddstr is not found, meaning curses is not really available, even though it'd be preferred, $prefer_curses is yes, but $curses_found is no. Thanks, Pedro Alves