Opened 14 years ago

Closed 10 years ago

Last modified 10 years ago

#540 closed enhancement (fixed)

Add pkg-config support to libxapian

Reported by: MacSlow Owned by: Olly Betts
Priority: normal Milestone: 1.2.20
Component: Build system Version:
Severity: normal Keywords:
Cc: Blocked By:
Blocking: Operating System: All

Description

The summary-line already says it all. It would be very helpful to have direct pkgconfig support in libxapian, making it easier to check for it at configure-time for code written against libxapian and using autotools for their setup.

Change History (6)

comment:1 by Olly Betts, 14 years ago

Component: OtherBuild system

If you're using autotools, then see the XO_LIB_XAPIAN macro (in xapian.m4) which is provided for exactly that purpose.

Patches to add pkgconfig support are certainly welcome though if anybody wants to work on it.

comment:2 by Richard Boulton, 14 years ago

I'm not sure what "direct pkgconfig support" would actually consist of. Is it just a pkg-config configuration file that needs to be generated and distributed? I can't see clear documentation of how to add support to a library on http://pkg-config.freedesktop.org/wiki/

I confess that I thought pkg-config had pretty much died, but maybe I've just not been moving in the circles that use it recently. I'd be interested to know if there is some reason that pkg-config support better than the current xapian-config script (and associated xapian.m4 macro).

comment:3 by MacSlow, 14 years ago

A .pc file (generated from the libxapian build) would be just the thing needed. Here's an example (taken from zlib.pc):

prefix=/usr exec_prefix=${prefix} libdir=${exec_prefix}/lib includedir=${prefix}/include

Name: zlib Description: zlib compression library Version: 1.2.3.4

Requires: Libs: -L${libdir} -lz Cflags: -I${includedir}

With that the XO_LIB_XAPIAN-macro would not be needed afaik.

comment:4 by Olly Betts, 14 years ago

It would at least still be needed to avoid breaking the code of anyone currently using it. It might also still be needed to allow combined-tree builds to work, unless pkg-config can do that.

But there's no reason why we can't support both, if somebody's interested enough to add support for generating a suitable .pc file.

comment:5 by Olly Betts, 10 years ago

Milestone: 1.3.3
Resolution: fixed
Status: newclosed

Fixed in [57b4a910], [b251268e], [2d47e8aa], [28208877] thanks to Sébastien Debrard.

comment:6 by Olly Betts, 10 years ago

Milestone: 1.3.31.2.20

Backported to 1.2 branch, culminating with [854e8d2].

Note: See TracTickets for help on using tickets.