From: Ian Campbell Subject: Re: [PATCH 1 of 5] remus: add libnl3 dependency to autoconf scripts Date: Tue, 27 Aug 2013 11:56:29 +0100 Message-ID: <1377600989.29147.22.camel@kazak.uk.xensource.com> References: <0ae8b121b67b3cb3a6b0.1377474314@athos.nss.cs.ubc.ca> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <0ae8b121b67b3cb3a6b0.1377474314@athos.nss.cs.ubc.ca> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: rshriram@cs.ubc.ca Cc: stefano.stabellini@eu.citrix.com, ian.jackson@eu.citrix.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Sun, 2013-08-25 at 16:45 -0700, rshriram@cs.ubc.ca wrote: > +AS_IF([test "x$remusnetbuf" = "xy"], [ > + > +dnl Need libnl version 3.2.8 or higher for plug qdisc support > + AS_IF( > + [ pkg-config --exists 'libnl-3.0 >= 3.2.8 libnl-route-3.0 >= 3.2.8 libnl-cli-3.0 >= 3.2.8' ], > + [], [ > + AC_MSG_ERROR([Need libnl3, libnl-route-3 and libnl-cli-3 (>= 3.2.8) for Remus network buffering]) > + ]) At least on Debian pkg-config ships pkg.m4 which contains handy looking autoconf macros for doing pkg-config stuff. Better to use them, gets you free cross compile support and general consistency with other projects. > + > + AC_CHECK_HEADER([netlink/route/qdisc/plug.h], [ > + AC_CHECK_LIB(nl-3, nl_socket_alloc, [ > + AC_CHECK_LIB(nl-route-3, rtnl_qdisc_alloc, [ > + LIBNL3_LIBS="-lnl-3 -lnl-route-3" > + AC_SUBST(LIBNL3_LIBS) > + ], [ > + AC_MSG_ERROR([Could not find libnl-route-3]) > + ]) > + ], [ > + AC_MSG_ERROR([Could not find libnl3]) > + ]) > + ], [ > + AC_MSG_ERROR([Could not find libnl3 dev headers (esp. plug.h)]) Is there any chance of this failing if pkg-config says it exists? IOW isn't this test redundant? Ian.