[Spread-users] [PATCH] pkgconfig file for libspread

Hisham H M hisham at gobolinux.org
Thu Feb 2 14:57:50 EST 2012


Hello,

I'm just getting started with Spread and I'm enjoying it so far.

As I approached integrating the client library with my autoconf
scripts, I found it simpler to add a .pc file to the Spread
distribution rather than diving in the autoconf macros for library
search.

The attached patch adds a libspread.pc to the Spread distribution,
which is generated at build time and installed along with libspread. I
put it in the libspread directory since I figured that for
installations that build only the client library, I could do "make -C
libspread install" instead of installing the whole thing. This way I
get only libraries, headers and the .pc file installed.

With this patch, using the client library in other autoconf-based
projects can be done somewhat like this:

#------------------------------------
AC_ARG_WITH([libspread], [  --with-libspread=PREFIX     Location of
libspread, the Spread client library],
            [PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$with_libspread/lib/pkgconfig],[])
export PKG_CONFIG_PATH

LIBSPREADFOUND=no
PKG_CHECK_MODULES(LIBSPREAD,libspread >= 4.1,LIBSPREADFOUND=yes)
if ! test x$LIBSPREADFOUND = xyes; then
        echo
        echo "Failed."
        echo "Libspread and its devel headers are required."
        exit 1
fi
#------------------------------------

Thanks,

-- Hisham
ps: I'm not currently subscribed to the list, so please cc: me on any replies.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: spread-4.1.0-pkgconfig_for_libspread.diff
Type: text/x-patch
Size: 2148 bytes
Desc: not available
Url : http://lists.spread.org/pipermail/spread-users/attachments/20120202/9788aa33/attachment.bin 


More information about the Spread-users mailing list