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

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.

Closes #5373
This commit is contained in:
James Le Cuirot 2020-05-11 20:50:02 +01:00 committed by Daniel Stenberg
parent ad64169867
commit 98e5904165
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
4 changed files with 18 additions and 9 deletions

View file

@ -34,6 +34,6 @@ Name: libcurl
URL: https://curl.haxx.se/
Description: Library to transfer files with ftp, http, etc.
Version: @CURLVERSION@
Libs: -L${libdir} -lcurl
Libs: -L${libdir} -lcurl @LIBCURL_NO_SHARED@
Libs.private: @LIBCURL_LIBS@
Cflags: -I${includedir} @CPPFLAG_CURL_STATICLIB@