From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id F06B83858D28 for ; Wed, 15 Feb 2023 18:58:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org F06B83858D28 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark.ca Received: from [10.0.0.111] (modemcable162.249-56-74.mc.videotron.ca [74.56.249.162]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 7D7751E0D3; Wed, 15 Feb 2023 13:58:22 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1676487502; bh=ij7++MLjzCY0RjUmcvVg3qUmzLZRxqwGShFMfBmaQWM=; h=Date:Subject:To:References:From:In-Reply-To:From; b=NbPgMDHnTLUuIJvLlBjVD7Xc0pKmWPkdfLIzKHky8Zz1pGpfu2K+WRyhQuPypPyvQ sovJtQklVnsf8coGWegY8hso65SU74asJHYx8eKysz7XXRfjSxuSHEq0zKKuFbJehh XiADwaBtMfsQfX7HBdlZI5TJfQcO9AB+eDNMyK8A= Message-ID: <0b0c4556-4d34-671d-8632-eb5d44251cfa@simark.ca> Date: Wed, 15 Feb 2023 13:58:22 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.2 Subject: Re: [PATCH] gdb: add --with-curses to --configuration output Content-Language: fr To: Philippe Blain , gdb-patches@sourceware.org References: <20230211-configuration-show-curses-v1-1-ce1bc0c062ac@gmail.com> From: Simon Marchi In-Reply-To: <20230211-configuration-show-curses-v1-1-ce1bc0c062ac@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-10.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,NICE_REPLY_A,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: > diff --git a/gdb/configure.ac b/gdb/configure.ac > index 7c7bf88b3fb..eac1b8f1aba 100644 > --- a/gdb/configure.ac > +++ b/gdb/configure.ac > @@ -563,7 +563,10 @@ if test x"$prefer_curses" = xyes; then > # search /usr/local/include, if ncurses is installed in /usr/local. A > # default installation of ncurses on alpha*-dec-osf* will lead to such > # a situation. > - AC_SEARCH_LIBS(waddstr, [ncursesw ncurses cursesX curses]) > + AC_SEARCH_LIBS(waddstr, [ncursesw ncurses cursesX curses], > + [AC_DEFINE([HAVE_LIBCURSES], [1], > + [Define to 1 if curses is enabled.]) > + ]) So we now have: AC_SEARCH_LIBS(waddstr, [ncursesw ncurses cursesX curses], [AC_DEFINE([HAVE_LIBCURSES], [1], [Define to 1 if curses is enabled.]) ]) if test "$ac_cv_search_waddstr" != no; then curses_found=yes fi I think the `if test ...` serves the same purpose as the action-if-found you used. Perhaps consolidate both actions to use the same mechanism? Using the action-if-found parameter seems a bit nicer to me. Simon