Felix:
> On Tue, Feb 01, 2022 at 10:48:15PM +0100, [email protected] wrote:
> > even though libtermcap is there:
> > 
> > $ ls -l /usr/lib64/libtermcap.so.2*
> > lrwxrwxrwx 1 root root    19 Feb  1 20:17 /usr/lib64/libtermcap.so.2 -> 
> > libtermcap.so.2.0.8
> > -rwxr-xr-x 1 root root 18384 Feb  1 20:17 /usr/lib64/libtermcap.so.2.0.8
> 
> The linker should be looking for libtermcap.so, not libtermcap.so.2. Are
> you sure it is there?

You are right, ln -s libtermcap.so.2 libtermcap.so solved it.

> > Is it there so gnucap compiles on historic unixes or what ?
> 
> Linking termcap does not seem to be neccessary these days. But it
> probably was, and it does not seem to hurt much.

Termcap, last update to termcap was in -96 here, and terminfo has
replaced it. How old systems do gnucap support ?

I have an old debian woody system here, and libtermcap-compat only has 
libtermcap.so.2, but libncurses5-dev has libtermcap.so.

Some history is available here:
 https://invisible-island.net/ncurses/tctest.html

> NB: the autotools build system [1] does not try -ltermcap (anymore), and
> will probably fail on older systems. Not sure if this is a good
> solution. Maybe pkg-config is?

I think termcap is to old for pkg-config (which started in 2000),
e.g. gentoos libtermcap-compat doesn't have pkg-config files.

///

One could possible do something like:

c++ test_readline.cc -lreadline -ltermcap 2> /dev/null
if [ ! -f a.out ]; then
    c++ test_readline.cc -lreadline
fi

 or 

c++ test_readline.cc -lreadline -ltermcap ||
c++ test_readline.cc -lreadline

Regards,
/Karl Hammar


Reply via email to