From: Ian Jackson Subject: Re: [PATCH 04/20] autoconf: New test for openpty et al. Date: Mon, 16 Apr 2012 11:32:19 +0100 Message-ID: <20363.62771.531826.469233@mariner.uk.xensource.com> References: <1334342414-10289-1-git-send-email-ian.jackson@eu.citrix.com> <1334342414-10289-5-git-send-email-ian.jackson@eu.citrix.com> <1334567346.14560.48.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1334567346.14560.48.camel@zakaz.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org 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 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.