From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wen Congyang Subject: Re: [PATCH 4 of 4 RFC] xl/remus: Add libnl3 dependency to autoconf scripts and libxl/Makefile Date: Mon, 29 Jul 2013 13:58:46 +0800 Message-ID: <51F60496.20208@cn.fujitsu.com> References: <51F247B6.6020407@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: 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: Ian Campbell , "xen-devel@lists.xen.org" , David Vrabel , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org At 07/26/2013 09:56 PM, Shriram Rajagopalan Wrote: > On Fri, Jul 26, 2013 at 5:56 AM, David Vrabel wrote: >> On 25/07/13 08:09, Shriram Rajagopalan wrote: >>> Add dependency on libnl3 version 3.2.17 or higher to autoconf. >>> Add include flags and link to relevant libraries in tools/libxl/Makefile. >>> >>> Signed-off-by: Shriram Rajagopalan >>> >>> diff -r bef729fc4336 -r c4c05e4e4e02 tools/configure.ac >>> --- a/tools/configure.ac Thu Jul 25 00:02:22 2013 -0700 >>> +++ b/tools/configure.ac Thu Jul 25 00:02:33 2013 -0700 >>> @@ -171,4 +171,12 @@ AC_SUBST(libiconv) >>> # Checks for header files. >>> AC_CHECK_HEADERS([yajl/yajl_version.h sys/eventfd.h]) >>> >>> +# Checks for libnl3 libraries and headers. >>> +PKG_CHECK_MODULES(LIBNL3, libnl-3.0 >= 3.2.17 libnl-route-3.0 >= 3.2.17, [have_libnl3=yes], [have_libnl3=no]) >>> +if (test "${have_libnl3}" = "yes"); then >>> + CFLAGS+="-I$LIBNL3_CFLAGS" >>> +else >>> + AC_MSG_ERROR([Need libnl version 3.2.17 or higher]) >>> +fi >> >> Using pkg-config here... >> > > The pkg-config idea was based on the suggestion here > http://www.carisma.slowglass.com/~tgr/libnl/doc/core.html#_linking_to_this_library > > If I use AC_CHECK_LIB and AC_CHECK_HEADERS, would it automatically add the > include path to CFLAGS, such that I wouldnt have to manually specify > -I flags in libxl/Makefile ? No. AC_CHECK_HEADERS can check if the header file is under the default directory. If the header file is under the directory /usr/include, you can use it. But why your header file is under the directory /usr/local/include? Thanks Wen Congyang > >>> AC_OUTPUT() >>> diff -r bef729fc4336 -r c4c05e4e4e02 tools/libxl/Makefile >>> --- a/tools/libxl/Makefile Thu Jul 25 00:02:22 2013 -0700 >>> +++ b/tools/libxl/Makefile Thu Jul 25 00:02:33 2013 -0700 >>> @@ -13,7 +13,7 @@ XLUMINOR = 0 >>> >>> CFLAGS += -Werror -Wno-format-zero-length -Wmissing-declarations \ >>> -Wno-declaration-after-statement -Wformat-nonliteral >>> -CFLAGS += -I. -fPIC >>> +CFLAGS += -I. -fPIC -I /usr/local/include/libnl3/ >> >> Means you should need to include the -I option here. >> >> David >> > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel >