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

Re: [Xen-devel] [PATCH 1 of 5] remus: add libnl3 dependency to autoconf scripts



On Sun, 2013-08-25 at 16:45 -0700, rshriram@xxxxxxxxx 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.



_______________________________________________
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®.