]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
build: add LIBNL_CFLAGS to build of libvirt_lxc
authorLaine Stump <laine@laine.org>
Sat, 25 Aug 2012 18:09:55 +0000 (14:09 -0400)
committerLaine Stump <laine@laine.org>
Sat, 25 Aug 2012 18:47:04 +0000 (14:47 -0400)
When libvirt_lxc is built, it uses the utility library and #includes
virnetdev.h, which #includes virnetlink.h, which includes
<netlink/msg.h>.

Normally, the netlink include directory would be just off
/usr/include, so that wouldn't create a problem, but on Fedora and
RHEL systems using libnl3, the libnl includes have been moved into
/usr/include/libnl3 (to allow concurrent installation of libnl-1.1).

All other binaries that need it have added $(LIBNL_CFLAGS) to their
CFLAGS, but not libvirt_lxc, so it fails to build on Fedora and RHEL
that have only libnl3-devel installed. This was previously unnoticed
because everyone was building with libnl headers in
/usr/include/netlink (even on systems with the headers in
/usr/include/libnl3/netlink, many people (like me) usually also have
the libnl1.1 headers in /usr/include/netlink).

This patch adds the necessary CFLAGS for libvirt_lxc.

Note that we don't need to add $(LIBNL_LIBS) to the LDADD for this
binary, because it never directly calls libnl functions, but only
calls them indirectly through the util library, which it's already
linking against.

src/Makefile.am

index 995e032d58358f992a88983fdc621e67e4e52923..95e1bea16774a3e6c62b08ccbd6ea249c6cf903f 100644 (file)
@@ -1650,7 +1650,8 @@ libvirt_lxc_LDADD += $(APPARMOR_LIBS)
 endif
 libvirt_lxc_CFLAGS =                           \
                -I$(top_srcdir)/src/conf        \
-               $(AM_CFLAGS)
+               $(AM_CFLAGS)                    \
+               $(LIBNL_CFLAGS)
 if HAVE_LIBBLKID
 libvirt_lxc_CFLAGS += $(BLKID_CFLAGS)
 libvirt_lxc_LDADD += $(BLKID_LIBS)