Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libcurl.pc: Merge Libs.private into Libs for static-only builds #5373

Closed
wants to merge 1 commit into from
Closed

libcurl.pc: Merge Libs.private into Libs for static-only builds #5373

wants to merge 1 commit into from

Conversation

chewi
Copy link
Contributor

@chewi chewi commented May 11, 2020

A project being built entirely statically will call pkg-config with --static, which utilises the Libs.private field. Conversely it will not use --static when not being built entirely statically, even if there is only a static build of libcurl available. This will most likely cause the build to fail due to underlinking unless we merge the Libs fields.

Consider that this is what the Meson build system does when it generates pkg-config files.

I have also reflected this in the --libs argument of curl-config even though REQUIRE_LIB_DEPS always seems to be yes anyway.

@bagder bagder added the build label May 11, 2020
@chewi
Copy link
Contributor Author

chewi commented May 11, 2020

Sorry, I've screwed this up. The newline character is mishandled up by Automake. I didn't notice because parallel builds somewhat hid the breakage. I also didn't hit this when I did the same for SDL2 as they don't use Automake. There is AM_SUBST_NOTMAKE but you're supporting Automake versions older than 1.11. I'll have a think…

A project being built entirely statically will call pkg-config with
--static, which utilises the Libs.private field. Conversely it will
not use --static when not being built entirely statically, even if
there is only a static build of libcurl available. This will most
likely cause the build to fail due to underlinking unless we merge the
Libs fields.

Consider that this is what the Meson build system does when it
generates pkg-config files.

I have also reflected this in the --libs argument of curl-config even
though REQUIRE_LIB_DEPS always seems to be "yes" anyway.
@chewi
Copy link
Contributor Author

chewi commented May 11, 2020

Should be good now. Without AM_SUBST_NOTMAKE, I had to rework it in a slightly less clever way but it does the job.

bagder
bagder approved these changes May 12, 2020
@bagder
Copy link
Member

bagder commented May 12, 2020

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants