Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@gnat.com>
To: Andrew Cagney <cagney@gnu.org>, gdb-patches@sources.redhat.com
Subject: Re: [RFA/RFC] (hppa/tui) Fix build failure due to missing wborder
Date: Wed, 25 Feb 2004 18:59:00 -0000	[thread overview]
Message-ID: <20040225185946.GI1105@gnat.com> (raw)
In-Reply-To: <20040225020942.GA23098@nevyn.them.org>

[-- Attachment #1: Type: text/plain, Size: 903 bytes --]

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  <brobecker@gnat.com>

        * 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

[-- Attachment #2: configure.in.diff --]
[-- Type: text/plain, Size: 1470 bytes --]

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)"

  reply	other threads:[~2004-02-25 18:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-23 22:03 Joel Brobecker
2004-02-24 23:34 ` Andrew Cagney
2004-02-25  1:18   ` Joel Brobecker
2004-02-25  2:09     ` Daniel Jacobowitz
2004-02-25 18:59       ` Joel Brobecker [this message]
2004-02-25 19:55         ` Andrew Cagney
2004-02-25 20:11           ` Joel Brobecker
2004-02-25 20:30         ` Mark Kettenis
2004-02-26  0:43           ` Joel Brobecker

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=20040225185946.GI1105@gnat.com \
    --to=brobecker@gnat.com \
    --cc=cagney@gnu.org \
    --cc=gdb-patches@sources.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