[ofa-general] [PATCH] add pkgconfig support to ibverbs library

Roland Dreier rdreier at cisco.com
Wed Jul 22 11:30:32 PDT 2009


Thanks.  I've been meaning to look at pkgconfig support for libibverbs
and I guess it might help a bit in some cases ... although really given
the fact that there's nothing tricky about libibverbs (in the sense that
you just need the include path and library path), are there any
real-world cases where this is a win?

Now, on the specific patch:

 > --- a/Makefile.am
 > +++ b/Makefile.am
 > @@ -66,6 +66,8 @@ EXTRA_DIST = include/infiniband/driver.h include/infiniband/kern-abi.h \
 >      src/ibverbs.h examples/pingpong.h \
 >      src/libibverbs.map libibverbs.spec.in $(man_MANS)
 >  
 > +SUBDIRS = pkgconfig

Is there a way to do this without introducing recursive make?  I really
like the fact that libibverbs currently builds non-recursively and I'd
prefer to keep that property.

 > +%.pc: ibverbs.pc.in Makefile
 > +	rm -f $@-t $@
 > +	sed \
 > +		-e 's#@''PREFIX@#$(exec_prefix)#g' \
 > +		-e 's#@''LIBDIR@#$(libdir)#g' \
 > +		-e 's#@''LIBVERSION@#$(VERSION)#g' \
 > +		-e 's#@''LIB@#'$(*:lib%=%)'#g' \
 > +	    $< > $@-t
 > +	chmod a-w $@-t
 > +	mv $@-t $@

seems strange to be doing this substitution with sed at build time --
isn't making a final file from a .in version exactly what autoconf
builds the configure script to do?  Can this be done just by adding the
.pc file to AC_CONFIG_FILES somehow?

 - R.



More information about the general mailing list