From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25258 invoked by alias); 25 Feb 2004 18:59:49 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 25237 invoked from network); 25 Feb 2004 18:59:46 -0000 Received: from unknown (HELO takamaka.act-europe.fr) (142.179.108.108) by sources.redhat.com with SMTP; 25 Feb 2004 18:59:46 -0000 Received: by takamaka.act-europe.fr (Postfix, from userid 507) id A540947D62; Wed, 25 Feb 2004 10:59:46 -0800 (PST) Date: Wed, 25 Feb 2004 18:59:00 -0000 From: Joel Brobecker To: Andrew Cagney , gdb-patches@sources.redhat.com Subject: Re: [RFA/RFC] (hppa/tui) Fix build failure due to missing wborder Message-ID: <20040225185946.GI1105@gnat.com> References: <20040223220334.GH1273@gnat.com> <403BDFA0.5000504@gnu.org> <20040225011811.GG542@gnat.com> <20040225020942.GA23098@nevyn.them.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="7iMSBzlTiPOCCT2k" Content-Disposition: inline In-Reply-To: <20040225020942.GA23098@nevyn.them.org> User-Agent: Mutt/1.4i X-SW-Source: 2004-02/txt/msg00732.txt.bz2 --7iMSBzlTiPOCCT2k Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 903 On Tue, Feb 24, 2004 at 09:09:42PM -0500, Daniel Jacobowitz wrote: > Try this instead: > AC_CHECK_FUNC(wborder, [], > [AC_SEARCH_LIBS(wborder, [cur_colr], [], > [AC_MSG_WARN([...])])]) Very clever! I didn't know that AC_CHECK_FUNC was using $LIBS to link its test program... Attach is a new suggested patch. 2004-02-25 J. Brobecker * configure.in: Make sure that the wborder function is available. Otherwise, search for it in the cur_colr library. * configure: Regenerate. On HP/UX, configure outputs: checking for library containing initscr... -lHcurses checking for wborder... no checking for library containing wborder... -lcur_colr On Linux, configure says: checking for library containing initscr... -lncurses checking for wborder... yes In both cases, I verified that TUI was linked in. -- Joel --7iMSBzlTiPOCCT2k Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="configure.in.diff" Content-length: 1470 Index: configure.in =================================================================== RCS file: /cvs/src/src/gdb/configure.in,v retrieving revision 1.147 diff -u -p -r1.147 configure.in --- configure.in 18 Feb 2004 19:01:36 -0000 1.147 +++ configure.in 25 Feb 2004 18:57:33 -0000 @@ -146,6 +146,16 @@ fi AC_SEARCH_LIBS(initscr, [ncurses Hcurses curses pdcurses], [], [AC_MSG_WARN([no curses library found])]) +# Check whether the wborder function is provided by the curses +# library detected above. In certain implementations such as +# the HP/UX Hcurses for instance, this function is provided by an +# additional library. So if we did not find this function inside +# the curses library, try some alternate libraries we know might +# provide it. +AC_CHECK_FUNC(wborder, [wborder_available=yes], + [AC_SEARCH_LIBS(wborder, [cur_colr], [wborder_available=yes], + [AC_MSG_WARN([no wborder function found])])]) + # Enable TUI. AC_ARG_ENABLE(tui, [ --enable-tui enable full-screen terminal user interface (TUI)], @@ -157,7 +167,7 @@ AC_ARG_ENABLE(tui, esac],enable_tui=yes) if test x"$enable_tui" = xyes; then if test -d $srcdir/tui; then - if test "$ac_cv_search_initscr" != no; then + if test "$ac_cv_search_initscr" != no -a "$wborder_available" = "yes"; then CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)" CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)" CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)" --7iMSBzlTiPOCCT2k--