[ofa-general] [PATCH] add pkgconfig support to ibverbs library
Steven Dake
sdake at redhat.com
Mon Jul 20 12:07:19 PDT 2009
On Mon, 2009-07-20 at 12:43 -0600, Jason Gunthorpe wrote:
> On Mon, Jul 20, 2009 at 11:17:29AM -0700, Steven Dake wrote:
> > The attached patch adds support for pkgconfig to the ibverbs library.
> >
> > Cloned from Roland's kernel.org git tree.
>
> Erm, am I missing something? Shouldn't your patches include some use
> of the .pc files for libraries downstream of libibverbs, like
> librdmacm?
>
yes librdmacm should use PKG_CHECK_MODULES to determine cflags and
ldflags and I will submit a patch for this capability.
I was uncertain of project policy, however. One problem with using
PKG_CHECK_MODULES is that it only works properly in recent pkgconfig m4
files. In projects I maintain, we don't expect our users to
run ./autogen.sh to parse the configure.ac/in file. Instead we
distribute a already-autogenned version in our tarball (similar to the
output from make dist). Using the PKG_CHECK_MODULES then requires up to
date upstream packages of autotools for developers, but not for users
(which simply run configure where the m4 macro has already been
processed). Such a patch then won't also won't build on older distros
(if you have concerns about autogenning your library against older
versions of autotools). This issue caused significant problems in our
developer community (downstream user of ibverbs) as everyone had to
upgrade to recent autotools.
There are mechanisms to use pkg-config directly in the configure script
to avoid this defect, but I don't know how to do this (C jockey here,
not too experienced with autotools).
> I often install all this stuff in a prefix and it sure would be nice
> if the compilations didn't need as much hand holding beyond --prefix
> to get it all setup.
>
agree
> > diff --git a/configure.in b/configure.in
> > index 374aae7..c54ca4b 100644
> > +++ b/configure.in
> > @@ -6,6 +6,7 @@ AC_CONFIG_SRCDIR([src/ibverbs.h])
> > AC_CONFIG_AUX_DIR(config)
> > AM_CONFIG_HEADER(config.h)
> > AM_INIT_AUTOMAKE(libibverbs, 1.1.2)
> > +AC_CHECK_PROGS([PKGCONFIG], [pkg-config])
>
> Is that necessary, pkg-config is never called?
>
good catch
new patch attached
> Jason
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pkgconfig-ibverbs-take2.patch
Type: text/x-patch
Size: 2475 bytes
Desc: not available
URL: <http://lists.openfabrics.org/pipermail/general/attachments/20090720/e2745291/attachment.bin>
More information about the general
mailing list