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

Re: [Xen-devel] [PATCH 04/20] autoconf: New test for openpty et al.



Ian Campbell writes ("Re: [Xen-devel] [PATCH 04/20] autoconf: New test for 
openpty et al."):
> On Fri, 2012-04-13 at 19:39 +0100, Ian Jackson wrote:
> >  LIBXL_LIBS =
> > -LIBXL_LIBS = $(LDLIBS_libxenctrl) $(LDLIBS_libxenguest) 
> > $(LDLIBS_libxenstore) $(LDLIBS_libblktapctl) $(UTIL_LIBS) $(LIBUUID_LIBS)
> > +LIBXL_LIBS = $(LDLIBS_libxenctrl) $(LDLIBS_libxenguest) 
> > $(LDLIBS_libxenstore) $(LDLIBS_libblktapctl) $(PTYFUNCS_LIBS) 
> > $(LIBUUID_LIBS)
> 
> Did you intend to remove the definition of UTIL_LIBS? I don't see a hunk
> which does that.

It's also used by xenconsoled.

> > +AC_DEFUN([AX_CHECK_PTYFUNCS], [
> > +    AC_CHECK_HEADER([libutil.h],[
> > +      AC_DEFINE([INCLUDE_LIBUTIL_H],[<libutil.h>],[libutil header file 
> > name])
> > +    ])
> > +    AC_CACHE_CHECK([for openpty et al], [ax_cv_ptyfuncs_libs], [
> > +        ax_cv_ptyfuncs_libs=-lutil
> > +        AX_SAVEVAR_SAVE(LIBS)
> > +        LIBS="$LIBS $ax_cv_ptyfuncs_libs"
> > +        AC_LINK_IFELSE([
> > +#ifdef INCLUDE_LIBUTIL_H
> > +#include INCLUDE_LIBUTIL_H
> > +#endif
> > +int main(void) {
> > +  openpty(0,0,0,0,0);
> > +  login_tty(0);
> > +}
> > +])
> > +        AX_SAVEVAR_RESTORE(LIBS)],
> > +    [],[
> > +        AC_MSG_FAILURE([Unable to find -lutil for openpty and login_tty])
> > +    ])
> > +    PTYFUNCS_LIBS="$ax_cv_ptyfuncs_libs"
> > +    AC_SUBST(PTYFUNCS_LIBS)
> > +])
> 
> Does this fail if -lutil isn't available? My (perhaps mistaken) reading
> of the commit message was that -lutil was only needed on some platforms?

Yes, it will do.  Currently -lutil is used everywhere except Solaris
but surely Solaris support has rotted by now.  I could change the
patch to try both with and without, I guess.

> On the other hand the AC_MSG_FAILURE doesn't see to have appeared in the
> configure output -- so maybe I just understand what all these macros are
> actually doing.

Linux has -lutil.

Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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