[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 Tue, Aug 27, 2013 at 6:56 AM, Ian Campbell <Ian.Campbell@xxxxxxxxxx> wrote:
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.


Yeah, that is redundant. [my autoconf naiveté ]. I was under the impression that the ac_check_lib
would automatically add the linker flags when compiling code, only to realize later that it didnt work
for libxenlight.so. So I ended up explicitly using LIBNL3_LIBS (in the libxl makefile)

will fix this and the other suggestions: I was thinking of getting rid of that config option altogether.
Compile in libnl3 if available (and enable libxl_netbuffer.c). If not, issue a warning and compile libxl_nonetbuffer.c.

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