lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Lynx-dev] ncurses configure test needs to include term.h or termcap.h t


From: Ryan Schmidt
Subject: [Lynx-dev] ncurses configure test needs to include term.h or termcap.h too
Date: Thu, 27 Aug 2020 17:17:42 -0500

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:


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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]