[Libguestfs] [PATCH] Use -ltinfo instead of -lncurses.

Pino Toscano ptoscano at redhat.com
Thu Nov 6 16:45:26 UTC 2014


On Thursday 06 November 2014 14:10:50 Richard W.M. Jones wrote:
> On Thu, Nov 06, 2014 at 01:34:24PM +0100, Pino Toscano wrote:
> > Given that three AC_CHECK_LIB checking for ncurses are now gone,
> > wouldn't it better to explicitly search for it prior to searching
> > for
> > readline?
> 
> According to https://bugzilla.redhat.com/show_bug.cgi?id=499837
> readline can be linked against either ncurses or termcap.
> 
> No modern system would prefer termcap, and I'll assume any system
> ancient/strange enough to only provide termcap and not ncurses would
> not be able to run libguestfs.
> 
> In Fedora, the readline-devel package requires ncurses-devel, so if
> our test for readline succeeds, we can assume ncurses-devel is
> installed and '-lreadline -lncurses' will just work.
> 
> On Debian/Ubuntu, they've ditched the nonsense of allowing alternate
> backend implementations, and they link readline to ncurses properly
> (so on Debian, '-lreadline' on its own works, whereas on Fedora we
> still need '-lreadline -lncurses' for no useful reason).
> 
> It would be nice if readline itself shipped with a pkgconfig file, or
> even any useful documentation on linking.  It does neither.
> 
> So ..  I think I'll leave this alone.

Makes sense then, thanks for the explanation.

-- 
Pino Toscano




More information about the Libguestfs mailing list