[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Lynx-dev] ncurses configure test needs to include term.h or termcap
From: |
Thomas Dickey |
Subject: |
Re: [Lynx-dev] ncurses configure test needs to include term.h or termcap.h too |
Date: |
Thu, 27 Aug 2020 18:39:33 -0400 |
User-agent: |
NeoMutt/20170113 (1.7.2) |
On Thu, Aug 27, 2020 at 05:17:42PM -0500, Ryan Schmidt wrote:
> Hi, I'm a developer with MacPorts, and it was reported to us that if you try
> to configure lynx (I verified the issue with 2.8.9rel.1 and 2.9.0dev.5) with
> CFLAGS containing -Werror -Wimplicit-function-declaration then it fails to
> find ncurses:
I'll keep this in mind, but the port file here needs some work:
https://github.com/macports/macports-ports/blob/master/www/lynx/Portfile
(it helps to add "--with-screen=ncursesw" or "--with-screen=ncurses"
if the ncurses port doesn't distinguish the two).
Any fixes/improvements that I make will assume that the port does that.
> checking if we have identified curses headers... none
> configure: error: No curses header-files found
>
>
> The config.log shows that the test failed because:
>
> configure:18951:12: error: implicit declaration of function 'tgoto' is
> invalid in C99 [-Werror,-Wimplicit-function-declaration]
> initscr(); tgoto("?", 0,0)
> ^
> 1 error generated.
>
>
> The reason appears to be that your configure test (from aclocal.m4) includes
> only ncurses.h and/or curses.h:
>
> for cf_header in \
> ncurses.h ifelse($1,,,[$1/ncurses.h]) \
> curses.h ifelse($1,,,[$1/curses.h]) ifelse($1,,[ncurses/ncurses.h
> ncurses/curses.h])
> do
>
> but then it tries to compile a test program using tgoto:
>
> AC_TRY_COMPILE([#include <${cf_header}>],
> [initscr(); tgoto("?", 0,0)],
> [cf_cv_ncurses_header=$cf_header; break],[])
> done
>
> At least in ncurses 6.2, tgoto is not defined in those headers; it's defined
> in term.h and termcap.h, so you should include one of those headers too.
If I were only configuring with ncurses, it would be simple.
For everything else, the configure script has to try different
combinations to see what works.
The --with-screen option gives it a head start along that path.
--
Thomas E. Dickey <dickey@invisible-island.net>
https://invisible-island.net
ftp://ftp.invisible-island.net
signature.asc
Description: PGP signature
- [Lynx-dev] ncurses configure test needs to include term.h or termcap.h too, Ryan Schmidt, 2020/08/27
- Re: [Lynx-dev] ncurses configure test needs to include term.h or termcap.h too,
Thomas Dickey <=
- Re: [Lynx-dev] ncurses configure test needs to include term.h or termcap.h too, Ryan Schmidt, 2020/08/27
- [Lynx-dev] autotools vs. prototypes (was Re: ncurses configure test needs to include term.h or termcap.h too), Thorsten Glaser, 2020/08/27
- Re: [Lynx-dev] autotools vs. prototypes, Ryan Schmidt, 2020/08/27
- Re: [Lynx-dev] autotools vs. prototypes, Thomas Dickey, 2020/08/27
- Re: [Lynx-dev] autotools vs. prototypes, Ryan Schmidt, 2020/08/27
- Re: [Lynx-dev] autotools vs. prototypes, Thomas Dickey, 2020/08/27
- Re: [Lynx-dev] autotools vs. prototypes, Thomas Dickey, 2020/08/27
- Re: [Lynx-dev] autotools vs. prototypes, Ryan Schmidt, 2020/08/27
- Re: [Lynx-dev] autotools vs. prototypes, Mouse, 2020/08/27