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
Find a file
Viktor Szakats 98f419172b
cmake/FindLibpsl: protect against pkg-config "half-detection"
Same issue as seen before with libssh2: `libpsl`'s pkg-config module
depends on another module, but that's not found. CMake ends up reporting
`LIBPSL_FOUND=YES`, while leaving `LIBPSL_INCLUDE_DIRS` empty. Then
the build fails to find `psl.h`.

The missing dependency in this case is `icu4c`, which is "keg-only",
meaning it's not exposed in the default Homebrew header, pkg-config,
lib, etc locations. It must be added to the `PKG_CONFIG_PATH` env, as
suggested by the warnings messages of `pkgconf`.

To avoid this fallout, let's ensure that `LIBPSL_INCLUDE_DIRS` is
non-empty when detecting via `pkg-config` and fall back to the CMake
detection method otherwise.

This was an issue till Homebrew libpsl 0.21.5_1, fixed in 0.21.5_2, that
no longer depends on `icu4c`.

Example log:
```
-- Checking for module 'libpsl'
--   Found libpsl, version 0.21.5
Package icu-uc was not found in the pkg-config search path.
Perhaps you should add the directory containing `icu-uc.pc'
to the PKG_CONFIG_PATH environment variable
Package 'icu-uc', required by 'libpsl', not found
[...]
-- Found Libpsl (via pkg-config):  (found version "0.21.5")
[...]
In file included from curl/_bld/lib/CMakeFiles/libcurl_static.dir/Unity/unity_0_c.c:4:
In file included from curl/lib/altsvc.c:32:
In file included from curl/lib/urldata.h:145:
curl/lib/psl.h:28:10: fatal error: 'libpsl.h' file not found
         ^~~~~~~~~~
1 error generated.
```

Follow-up to 39c741b7b0 #15408
Closes #15827
2024-12-25 21:46:55 +01:00
.circleci ci: update dependency wolfSSL/wolfssh to v1.4.19 2024-11-04 08:44:33 +01:00
.github GHA: drop codeql 2024-12-23 08:51:21 +01:00
CMake cmake/FindLibpsl: protect against pkg-config "half-detection" 2024-12-25 21:46:55 +01:00
docs tidy-up: misc 2024-12-24 01:27:26 +01:00
include getinfo: provide info which auth was used for HTTP and proxy 2024-12-23 23:03:54 +01:00
lib tidy-up: misc 2024-12-24 01:27:26 +01:00
LICENSES copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
m4 build: drop -Winline picky warning 2024-12-23 22:13:23 +01:00
packages binmode: convert to macro and use it from tests 2024-12-21 13:29:24 +01:00
plan9 copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
projects projects/Windows: remove wolfSSL from legacy projects 2024-12-22 03:10:35 -05:00
scripts tool_formparse.c: make curlx_uztoso a static in here 2024-12-21 13:59:05 +01:00
src tidy-up: misc 2024-12-24 01:27:26 +01:00
tests tidy-up: misc 2024-12-24 01:27:26 +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 gitignore: ignore output files created by mk-ca-bundle.pl 2024-12-22 03:11:51 -05:00
.mailmap dmaketgz: use --no-cache when building docker image 2024-12-05 15:41:53 +01:00
acinclude.m4 Makefile.mk: drop in favour of autotools and cmake (MS-DOS, AmigaOS3) 2024-12-16 23:20:55 +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 cmake/FindLDAP: avoid empty 'Requires' item when omitting pkg-config module 2024-12-24 11:59:02 +01:00
configure.ac src: add CURL_STRICMP() macro, use _stricmp() on Windows 2024-12-23 22:06:07 +01:00
COPYING COPYING: update copyright year 2024-01-08 18:40:06 +01:00
curl-config.in curl-config: tidy up, optimize 2024-12-24 01:21:38 +01:00
Dockerfile Dockerfile: Update debian:bookworm-slim Docker digest to b73bf02 2024-12-03 09:25:09 +01: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 projects/Windows: remove wolfSSL from legacy projects 2024-12-22 03:10:35 -05:00
Makefile.dist Makefile.mk: drop in favour of autotools and cmake (MS-DOS, AmigaOS3) 2024-12-16 23:20:55 +01: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-12-23 23:06:36 +01:00
renovate.json GHA: drop "3" from openssl names and keys 2024-10-23 19:36:03 +02:00
REUSE.toml projects/Windows: remove wolfSSL from legacy projects 2024-12-22 03:10:35 -05: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.