A command line tool and library for transferring data with URL syntax, supporting DICT, FILE, FTP, FTPS, GOPHER, GOPHERS, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, MQTT, POP3, POP3S, RTMP, RTMPS, RTSP, SCP, SFTP, SMB, SMBS, SMTP, SMTPS, TELNET, TFTP, WS and WSS. libcurl offers a myriad of powerful features
Go to file
Viktor Szakats d511ec8b0a
build: omit certain deps from libcurl.pc unless found via pkg-config
The idea of linking dependencies found to `libcurl.pc` turns out not
to work in practice in some cases.

Specifically: gss, ldap, mbedtls, libmsh3, rustls

A `.pc` may not work or be missing for a couple of reasons:
- not all build methods generate it: mbedTLS, Rustls
- generated file is broken: msh3
  Ref: https://github.com/nibanks/msh3/pull/225
- installed package flavour isn't shipping with one:
  FreeBSD GSS, OmniOS LDAP, macOS LDAP

The effect of such issues shall be subtle in theory, because
`libcurl.pc` normally lists these dependencies in the `Requires.private`
section meant for static linking. But, e.g. `pkg-config --exists`
requires these to be present, and builds sometimes use this check
regardless of build type. This bug is not present in `pkgconf`; it only
checks for them when `--static` is also passed.

Fix these by adding affected `.pc` references to `libcurl.pc` only when
we detected the dependency via `pkg-config`.

There are a few side-effects of this solution:
- references are never added for dependencies where curl doesn't
  implement `pkg-config` detection. These are:
  - autotools: ldap, mbedtls, msh3
  - cmake: ldap (pending #15273)
- generated `libcurl.pc` depends on the build-time environment.
- generated `libcurl.pc` depends on curl build tool (cmake, autotools).
- generated `libcurl.pc` depends on curl build implementation details.

Make an exception for GNU GSS, where I blindly guess that `gss.pc` is
always available, as no issues were reported.

Other, not mentioned, dependencies continue to be added regardless
of the detection method.

Reported-by: Harmen Stoppels, Thomas, Daniel Engberg, Andy Fiddaman
Fixes #15469
Fixes #15507
Fixes #15535
Fixes https://github.com/curl/curl/pull/15163#issuecomment-2473358444
Closes #15573
2024-11-14 22:38:47 +01:00
.circleci ci: update dependency wolfSSL/wolfssh to v1.4.19 2024-11-04 08:44:33 +01:00
.github GHA/linux: fix pip3 install impacket breakage 2024-11-14 02:14:02 +01:00
CMake build: omit certain deps from libcurl.pc unless found via pkg-config 2024-11-14 22:38:47 +01:00
docs ECH: enable support for the AWS-LC backend 2024-11-08 13:59:39 +01:00
include RELEASE-NOTES: synced 2024-11-07 13:16:47 +01:00
lib strtok: use namespaced strtok_r macro instead of redefining it 2024-11-14 09:55:45 +01:00
LICENSES copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
m4 build: omit certain deps from libcurl.pc unless found via pkg-config 2024-11-14 22:38:47 +01:00
packages os400: Fix IBMi builds 2024-11-13 19:15:15 -05:00
plan9 copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
projects misc: general C style cleanups 2024-08-22 23:43:45 +02:00
scripts cmakelint: fix to check root CMakeLists.txt 2024-11-13 12:45:06 +01:00
src curl: --test-duphandle in debug builds runs "duphandled" 2024-11-08 13:22:47 +01:00
tests configure: do not echo most inherited LDFLAGS to config files 2024-11-14 09:55:45 +01:00
winbuild winbuild: drop gen_resp_file.bat 2024-11-01 11:36:54 +01:00
.dir-locals.el copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
.git-blame-ignore-revs copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
.gitattributes winbuild: MS-DOS batch tidy-ups 2024-07-02 19:26:15 +02:00
.gitignore build: buildinfo.txt improvements 2024-09-19 15:56:30 +02:00
.mailmap mprintf: treat %o as unsigned, add tests for %o, %x, %X 2024-10-24 10:17:24 +02:00
acinclude.m4 build: omit certain deps from libcurl.pc unless found via pkg-config 2024-11-14 22:38:47 +01:00
appveyor.sh build: fix clang-cl builds, add CI job 2024-10-30 23:15:32 +01:00
appveyor.yml build: fix clang-cl builds, add CI job 2024-10-30 23:15:32 +01:00
buildconf copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
buildconf.bat buildconf.bat: remove outdated groff/nroff use 2024-03-07 22:38:16 +01:00
CHANGES.md CHANGES: rename to CHANGES.md, no longer generated 2024-08-01 13:37:12 +02:00
CMakeLists.txt build: omit certain deps from libcurl.pc unless found via pkg-config 2024-11-14 22:38:47 +01:00
configure.ac build: omit certain deps from libcurl.pc unless found via pkg-config 2024-11-14 22:38:47 +01:00
COPYING COPYING: update copyright year 2024-01-08 18:40:06 +01:00
curl-config.in configure: do not echo most inherited LDFLAGS to config files 2024-11-14 09:55:45 +01:00
Dockerfile Dockerfile: update Docker digest to d830561 2024-10-18 16:39:26 +02:00
GIT-INFO.md GIT-INFO.md: remove version requirements 2024-07-08 23:06:05 +02:00
libcurl.pc.in configure: do not echo most inherited LDFLAGS to config files 2024-11-14 09:55:45 +01:00
Makefile.am winbuild: drop gen_resp_file.bat 2024-11-01 11:36:54 +01:00
Makefile.dist Makefile.dist: fix ca-firefox target 2024-09-06 21:46:05 +02:00
README docs: minor grammar fixes 2022-09-29 10:44:12 +02:00
README.md GHA: silence proselint warnings and an error 2024-10-15 16:44:17 +02:00
RELEASE-NOTES RELEASE-NOTES: synced 2024-11-08 23:24:50 +01:00
renovate.json GHA: drop "3" from openssl names and keys 2024-10-23 19:36:03 +02:00
REUSE.toml tests/server/util.c: remove use of strncpy 2024-10-10 07:47:01 +02:00
SECURITY.md docs: Clarify OpenSSF Best Practices vs Scorecard 2024-08-22 11:50:20 +02:00

curl logo

Curl is a command-line tool for transferring data specified with URL syntax. Learn how to use curl by reading the manpage or everything curl.

Find out how to install curl by reading the INSTALL document.

libcurl is the library curl is using to do its job. It is readily available to be used by your software. Read the libcurl manpage to learn how.

Open Source

curl is Open Source and is distributed under an MIT-like license.

Contact

Contact us on a suitable mailing list or use GitHub issues/ pull requests/ discussions.

All contributors to the project are listed in the THANKS document.

Commercial support

For commercial support, maybe private and dedicated help with your problems or applications using (lib)curl visit the support page.

Website

Visit the curl website for the latest news and downloads.

Source code

Download the latest source from the Git server:

git clone https://github.com/curl/curl.git

Security problems

Report suspected security problems via our HackerOne page and not in public.

Notice

Curl contains pieces of source code that is Copyright (c) 1998, 1999 Kungliga Tekniska Högskolan. This notice is included here to comply with the distribution terms.

Backers

Thank you to all our backers 🙏 Become a backer.

Sponsors

Support this project by becoming a sponsor.