xiaoyin0208 / lz4

Automatically exported from code.google.com/p/lz4
0 stars 0 forks source link

[PATCH] add pkg-config file #135

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
It makes the detection of version and paths easier, especially for projects 
using autoconf to detect their libraries.

Original issue reported on code.google.com by zbys...@in.waw.pl on 6 Jul 2014 at 3:49

Attachments:

GoogleCodeExporter commented 8 years ago
I've no experience of autoconf yet.
I could integrate your proposal, since it's very clean.
But I'm a bit puzzled if I can't check anything.
Is there a way to quickly test the benefits of your proposed patch ?

Original comment by yann.col...@gmail.com on 6 Jul 2014 at 8:19

GoogleCodeExporter commented 8 years ago

Original comment by yann.col...@gmail.com on 6 Jul 2014 at 8:19

GoogleCodeExporter commented 8 years ago
I guess that my comment was a bit misleading. pkg-config is not tied to 
autoconf, it is usable (and used) independently.

To test: after installation, pkg-config should "know" about liblz4:

$ pkg-config liblz4 || echo error
$ pkg-config 'liblz4 >= 119' || echo error
$ pkg-config 'liblz4 >= 120' || echo error
error
$ pkg-config --libs liblz4
-llz4 
$ pkg-config --cflags liblz4

(--cflags doesn't output anything, because the include path is already in the 
standard set. Likewise, --libs does not output the -L argument because it's 
unnecessary.)

(In a project using autoconf, PKG_CHECK_MODULES macro would be used. See 
https://www.flameeyes.eu/autotools-mythbuster/pkgconfig/pkg_check_modules.html 
for some examples.)

Original comment by zbys...@in.waw.pl on 6 Jul 2014 at 9:14

GoogleCodeExporter commented 8 years ago
Thanks for the detailed explanations. I'll look into it.

Original comment by yann.col...@gmail.com on 6 Jul 2014 at 9:15

GoogleCodeExporter commented 8 years ago
I've added your proposed pkg-config patch
to the "dev" branch on github :

https://github.com/Cyan4973/lz4/tree/dev

As far as I can tell, it seems to work exactly as you intended, and all 
verification tests passed so far. So it seems good to go to r120.

This is probably the last change before r120, so expect a release in the next 
few days.

Original comment by yann.col...@gmail.com on 20 Jul 2014 at 3:23

GoogleCodeExporter commented 8 years ago

Original comment by yann.col...@gmail.com on 21 Jul 2014 at 7:12

GoogleCodeExporter commented 8 years ago
Added into r120

Original comment by yann.col...@gmail.com on 24 Jul 2014 at 3:31