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

Re: [Xen-devel] [PATCH] use ncurses-config to find all curses related libs



On Thu, Nov 24, Ian Jackson wrote:

> Olaf Hering writes ("Re: [Xen-devel] [PATCH] use ncurses-config to find all 
> curses related libs"):
> > On Thu, Nov 24, Ian Jackson wrote:
> > > Olaf Hering writes ("[Xen-devel] [PATCH] use ncurses-config to find all 
> > > curses related libs"):
> > > > -CURSES_LIBS = -lncurses
> > > > +CURSES_LIBS = $(shell if ! ncurses5-config --libs 2>/dev/null ; then 
> > > > ncurses-config --libs ; fi)
> > > 
> > > In the case where ncurses5-config is not provided, this will fail.
> 
> Sorry, I wasn't sufficiently clear.  The case that fails is if neither
> ncurses5-config nor ncurses-config is provided.  The default should be
> to use -lncurses as before.

I see. Another if construct, or a check_ncurses script which looks for
ncurses5-config or ncurses-config. After some digging in old SuSE
releases, ncurses5-config appeared in 11.0 (2008), SLES10 does not have
it yes . So blindly relying on -config scripts will likely break
building on old distributions.

This should work:

if ! ncurses5-config --libs 2>/dev/null;then if ! ncurses-config --libs ; then 
echo '-lncurses' ; fi ; fi

Olaf

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.