Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Mark Kettenis <kettenis@chello.nl>
To: mec.gnu@mindspring.com
Cc: gdb-patches@sources.redhat.com
Subject: Re: [patch] configure.in: revert osf5.1 no-noncurses special case
Date: Fri, 07 May 2004 13:50:00 -0000	[thread overview]
Message-ID: <200405071349.i47Dnq29019350@elgar.kettenis.dyndns.org> (raw)
In-Reply-To: <20040501222714.00E7D4B104@berman.michael-chastain.com> (mec.gnu@mindspring.com)

   Date: Sat,  1 May 2004 18:27:14 -0400 (EDT)
   From: mec.gnu@mindspring.com (Michael Elizabeth Chastain)

Thanks, Michael, we really should avoid special casing in configure.in
as much as we can.

   There's a problem with any platform where a local sysadmin has installed
   ncurses.  The autoconf test looks for the existence of a library, but it
   does not do anything to add a matching "-I ...." option to $CFLAGS to
   find the matching header files.  There's an additional problem on
   osf5.1, where the ncurses on some systems requires an additional
   libtinfo.a library.

Indeed.  Let's think about a proper way to fix this.  The problem here
is that the compiler finds certain header files, but the linker
doesn't find the associated library, or the other way around.
Arguably this is a problem with the configuration of the system.
Unfortunately it is a common misconfiguration that we probably can't
ignore.  GCC searches /usr/local/include by default, but the linker
usually doesn't look at /usr/local/lib.  The *BSDs modify GCC such
that it doesn't do this exactly for that reason.  In that case one
will have to excplicitly tell configure to look in /usr/local by
specifying CPPFLAGS and LDFLAGS.  Anyway, we have a couple of options:

1. Prefer a system's native curses library over ncurses.

2. Only use ncurses if we can find both the headers and the associated
   library.

   a. Error out if one of the parts if missing.

   b. Fall back on the system's native curses library if something is
   missing.

3. Try harder to find all ncurses components by fiddling with CPPFLAGS
   and LDFLAGS.

4. Unly use ncurses if the user passes --with-ncurses to configure.

All solutions have its drawbacks.  The system's native curses library
may not have all the features that we need/want.  So option 1 could
lead to build problems, or a non-functional gdbtui where before things
would just work if ncurses was available.  Option 2a isn't too
helpful.  If the ncurses is properly installed and fully functional
the user should be able to add the right CPPFLAGS and/or LDFLAGS.  If
not, the only solution would be to remove ncurses.  Option 2b is
difficult to implement.  Option 3 is dangerous.  By tweaking CPPFLAGS
and LDFLAGS we might invalidate checks for libraries and headers that
were done eralier on in the configure script, because we might
encounter different versions of the detected components when compiling
GDB.  Option 4 requires an action by the user.

Personally I think we should either go for option 1 or option 4.

Mark


  reply	other threads:[~2004-05-07 13:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-01 22:27 Michael Elizabeth Chastain
2004-05-07 13:50 ` Mark Kettenis [this message]
2004-05-07 15:10 Michael Elizabeth Chastain
2004-05-07 15:33 ` Daniel Jacobowitz
2004-05-07 16:19   ` Mark Kettenis
2004-05-07 16:49     ` Daniel Jacobowitz
2004-05-07 15:51 ` Andrew Cagney
2004-05-07 15:52 Michael Elizabeth Chastain
2004-05-07 16:23 ` Mark Kettenis
2004-05-07 16:45   ` Daniel Jacobowitz
2004-05-07 17:05 Michael Elizabeth Chastain
2004-05-08  0:11 Michael Elizabeth Chastain
2004-05-08 15:58 ` Daniel Jacobowitz

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=200405071349.i47Dnq29019350@elgar.kettenis.dyndns.org \
    --to=kettenis@chello.nl \
    --cc=gdb-patches@sources.redhat.com \
    --cc=mec.gnu@mindspring.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