add pkg-config support #10

pull genjix wants to merge 1 commits into bitcoin-core:master from genjix:master changing 3 files +20 −1
  1. genjix commented at 6:18 am on May 7, 2014: none

    congrats on taking the initiative to create such a useful and needed library that can enable the migration away from openssl.

    this patch adds pkg-config support which is useful if you say install to non-standard locations (like when installing as a non-root user), and enables easy detection in other configure files using the macro:

    PKG_CHECK_MODULES([libsecp256k1], [libsecp256k1])

  2. add pkg-config support f7ab258699
  3. laanwj commented at 7:01 am on May 8, 2014: member
    Seems like something we’ll need, too, when we want to detect/use secp256k1 from autotools. @theuni can you also take a look at this?
  4. theuni commented at 4:23 pm on May 8, 2014: contributor

    @genjix Thanks for this, I’d been meaning to get to it.

    I don’t see any need for the configure option. Installing to ${libdir}/pkgconfig is standard. If that needs to be overridden, it’s going to be handled via distro packaging scripts anyway.

    Also, the dependencies are missing, could you please add them in?

  5. sipa commented at 4:26 pm on May 8, 2014: contributor
    @genjix I’m totally autotools/packaging oblivious, but I’m fine with merging if @theuni likes it :)
  6. genjix commented at 4:40 pm on May 8, 2014: none

    feel free to take out the pkg path configure option, although it doesn’t harm to leave it.

    not sure what you mean about dependencies? it works for me as is.

  7. theuni commented at 4:54 pm on May 8, 2014: contributor

    @genjix When a program links against libsecp256k1 statically, it doesn’t know how the lib has been configured. It could have a dependency on openssl, bignum, etc. For that reason, the .pc needs to include its own dependencies in the private sections.

    See the faqs here: http://people.freedesktop.org/~dbn/pkg-config-guide.html

    Also, the Libs section is missing the -lsecp256k1 ;)

  8. genjix commented at 8:07 pm on May 13, 2014: none
    feel free to make your changes and resubmit the pull request
  9. theuni cross-referenced this on May 21, 2014 from issue pkg-config support (continued) by theuni
  10. sipa commented at 7:54 pm on June 3, 2014: contributor
    Superceded by #18.
  11. sipa closed this on Jun 3, 2014


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/secp256k1. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-22 10:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me