Re: [PATCH] Fix libnl/libnl-3 logic in configure script
"Ryan O'Hara" <[email protected]>
| Newsgroups | gmane.linux.keepalived.devel |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Jan 07, 2014 at 08:58:12AM -0600, Ryan O'Hara wrote: > On Tue, Jan 07, 2014 at 08:14:47AM +0100, Alexandre Cassen wrote: > > On 06/01/2014 18:13, Ryan O'Hara wrote: > > > On Mon, Jan 06, 2014 at 11:08:37AM -0600, Ryan O'Hara wrote: > > >> This patch causes the configure script to prefer libnl-3 over > > >> libnl(1). The configure script will first check for libnl-3 and > > >> libnl-genl-3. If both are found, use them. If not, check for > > >> libnl(1). This is useful when building on systems that have both > > >> libnl-3 and libnl(1) installed. It also fixes some redundant libraries > > >> in LIBS. > > > > > > By the way, there is probably a better way to do this. I know that > > > AC_CHECK_LIB will add -l<lib> to LIBS automatically and set a > > > variable, but this is a quick fix. > > > > > > Also note that it might be possible to simply check for libnl-genl-3 > > > since it requires libnl-3. For now, check for both. > > > > > > I will submit a pull request over on github with an udpated configure > > > script. > > > > Well, I merged the request... but will not compile now on my ubuntu env > > since libnl-3 is locating include files in /usr/include/libnl3/ and not > > in /usr/include/netlink > > That seems strange. Could you check what cflags you get from > pkg-config for both libnl-3 and libnl-genl-3? Happy to revise the > patch, but I don't have an Ubuntu system handy to test it. I just saw that you have a commit to address the include directory. Appears that Ubuntu may have different include dir for libnl-genl-3.0 and linbl-3.0. Is that correct? For what its worth, my Fedora machine give same cflags for both libs: $ pkg-config --cflags libnl-3.0 -I/usr/include/libnl3 $ pkg-config --cflags libnl-genl-3.0 -I/usr/include/libnl3 I think could be solved having the configure script retrieve the cflags and libs for both libnl-3.0 and libnl-genl-3.0. In my original patch I didn't do this because I wanted to avoid having duplicates in LIBS and CFLAGS, but that is quite harmless. Ryan ------------------------------------------------------------------------------ Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk