#
c90c7833 |
| 11-Aug-2023 |
Viktor Szakats |
build: streamline non-UWP wincrypt detections - with CMake, use the variable `WINDOWS_STORE` to detect an UWP build and disable our non-UWP-compatible use the Windows crypto API. This
build: streamline non-UWP wincrypt detections - with CMake, use the variable `WINDOWS_STORE` to detect an UWP build and disable our non-UWP-compatible use the Windows crypto API. This allows to drop two dynamic feature checks. `WINDOWS_STORE` is true when invoking CMake with `CMAKE_SYSTEM_NAME` == `WindowsStore`. Introduced in CMake v3.1. Ref: https://cmake.org/cmake/help/latest/variable/WINDOWS_STORE.html - with autotools, drop the separate feature check for `wincrypt.h`. On one hand this header has been present for long (even Borland C 5.5 had it from year 2000), on the other we used the check result solely to enable another check for certain crypto functions. This fails anyway with the header not present. We save one dynamic feature check at the configure stage. Reviewed-by: Marcel Raad Closes #11657
show more ...
|
#
fb722ec7 |
| 08-Aug-2023 |
Viktor Szakats |
cmake: assume `wldap32` availability on Windows This system library first shipped with Windows ME, available as an extra install for some older releases (according to [1]). The import li
cmake: assume `wldap32` availability on Windows This system library first shipped with Windows ME, available as an extra install for some older releases (according to [1]). The import library was present already in old MinGW 3.4.2 (year 2007). Drop the feature check and its associated `HAVE_WLDAP32` variable. To manually disable `wldap32`, you can use the `USE_WIN32_LDAP=OFF` CMake option, like before. [1]: https://dlcdn.apache.org/httpd/binaries/win32/LEGACY.html Reviewed-by: Jay Satiro Closes #11624
show more ...
|
#
762740f4 |
| 07-Aug-2023 |
Viktor Szakats |
cmake: drop `HAVE_LIBWINMM` and `HAVE_LIBWS2_32` feature checks - `HAVE_LIBWINMM` was detected but unused. The `winmm` system library is also not used by curl, but it is by its optiona
cmake: drop `HAVE_LIBWINMM` and `HAVE_LIBWS2_32` feature checks - `HAVE_LIBWINMM` was detected but unused. The `winmm` system library is also not used by curl, but it is by its optional dependency `librtmp`. Change the logic to always add `winmm` when `USE_LIBRTMP` is set. This library has been available since the early days of Windows. - `HAVE_LIBWS2_32` detected `ws2_32` lib on Windows. This lib is present since Windows 95 OSR2 (AFAIR). Winsock1 already wasn't supported and other existing logic already assumed this lib being present, so delete the check and replace the detection variable with `WIN32` and always add `ws2_32` on Windows. Closes #11612
show more ...
|
#
00f8f9c2 |
| 30-Jul-2023 |
Viktor Szakats |
cmake: cache more config and delete unused ones - cache more Windows config results for faster initialization. - delete unused config macros `HAVE_SYS_UTSNAME_H`, `HAVE_SSL_H`.
cmake: cache more config and delete unused ones - cache more Windows config results for faster initialization. - delete unused config macros `HAVE_SYS_UTSNAME_H`, `HAVE_SSL_H`. - delete dead references to `sys/utsname.h`. Closes #11551
show more ...
|
#
c09466ab |
| 31-Jul-2023 |
Viktor Szakats |
egd: delete feature detection and related source code EGD is Entropy Gathering Daemon, a socket-based entropy source supported by pre-OpenSSL v1.1 versions and now deprecated. curl also
egd: delete feature detection and related source code EGD is Entropy Gathering Daemon, a socket-based entropy source supported by pre-OpenSSL v1.1 versions and now deprecated. curl also deprecated it a while ago. Its detection in CMake was broken all along because OpenSSL libs were not linked at the point of feature check. Delete detection from both cmake and autotools, along with the related source snippet, and the `--with-egd-socket=` `./configure` option. Closes #11556
show more ...
|
#
dee310d5 |
| 31-Jul-2023 |
Viktor Szakats |
cmake: detect `SSL_set0_wbio` in OpenSSL Present in OpenSSL 1.1.0 and BoringSSL. Missing from LibreSSL 3.8.0. Follow-up to f39472ea9f4f4e12cfbc0500c4580a8d52ce4a59 Whil
cmake: detect `SSL_set0_wbio` in OpenSSL Present in OpenSSL 1.1.0 and BoringSSL. Missing from LibreSSL 3.8.0. Follow-up to f39472ea9f4f4e12cfbc0500c4580a8d52ce4a59 While here, also fix `RAND_egd()` detection which was broken, likely all along. This feature is probably broken with CMake builds and also requires a sufficiently obsolete OpenSSL version, so this part of the update was not tested. Closes #11555
show more ...
|
#
038c46f6 |
| 15-Nov-2022 |
Patrick Monnerat |
configure, cmake, lib: more form api deprecation Introduce a --enable-form-api configure option to control its inclusion in builds. The condition name defined for it is CURL_DISABLE_FORM
configure, cmake, lib: more form api deprecation Introduce a --enable-form-api configure option to control its inclusion in builds. The condition name defined for it is CURL_DISABLE_FORM_API. Form api code is dependent of MIME: configure and CMake handle this dependency automatically: CMake by making it a dependent option explicitly, configure by inheriting the MIME value by default and rejecting explicit incompatible values. "form-api" is now a new hidden test feature. Update libcurl modules to respect this option and adjust tests accordingly. Closes #9621
show more ...
|
#
86eff0b0 |
| 30-Jul-2023 |
Viktor Szakats |
nss: delete more NSS references Fix the distcheck CI failure and delete more NSS references. Follow-up to 7c8bae0d9c9b2dfeeb008b9a316117d7b9675175 Reviewed-by: Marcel Raad
nss: delete more NSS references Fix the distcheck CI failure and delete more NSS references. Follow-up to 7c8bae0d9c9b2dfeeb008b9a316117d7b9675175 Reviewed-by: Marcel Raad Reviewed-by: Daniel Stenberg Closes #11548
show more ...
|
#
7c8bae0d |
| 29-Jul-2023 |
Daniel Stenberg |
nss: remove support for this TLS library Closes #11459
|
#
1199308d |
| 22-Jun-2023 |
Viktor Szakats |
cmake: support building static and shared libcurl in one go This patch adds the ability to build a static and shared libcurl library in a single build session. It also adds an option to
cmake: support building static and shared libcurl in one go This patch adds the ability to build a static and shared libcurl library in a single build session. It also adds an option to select which one to use when building the curl executable. New build options: - `BUILD_STATIC_LIBS`. Default: `OFF`. Enabled automatically if `BUILD_SHARED_LIBS` is `OFF`. - `BUILD_STATIC_CURL`. Default: `OFF`. Requires `BUILD_STATIC_LIBS` enabled. Enabled automatically if building static libcurl only. - `STATIC_LIB_SUFFIX`. Default: empty. - `IMPORT_LIB_SUFFIX`. Default: `_imp` if implib filename would collide with static lib name (typically with MSVC) in Windows builds. Otherwise empty. Also: - Stop setting the `CURL_STATICLIB` macro via `curl_config.h`, and pass it directly to the compiler. This also allows to delete a condition from `tests/server/CMakeLists.txt`. - Complete a TODO by following the logic used in autotools (also for `LIBCURL_NO_SHARED`), and set `-DCURL_STATICLIB` in `Cflags:` of `libcurl.pc` for _static-only_ curl builds. - Convert an existing CI test to build both shared and static libcurl. Closes #11505
show more ...
|
#
a15ef19a |
| 24-Jul-2023 |
Viktor Szakats |
cmake: update ngtcp2 detection Replace `OpenSSL` with `quictls` to follow the same change in the v0.17.0 ngtcp2 release. Follow-up to e0093b4b732f6495b0fb1cd6747cbfedcdcf63ed
cmake: update ngtcp2 detection Replace `OpenSSL` with `quictls` to follow the same change in the v0.17.0 ngtcp2 release. Follow-up to e0093b4b732f6495b0fb1cd6747cbfedcdcf63ed Closes #11508
show more ...
|
#
4e115a19 |
| 22-Jun-2023 |
Michał Petryka <35800402+MichalPetryka@users.noreply.github.com> |
cmake: stop CMake from quietly ignoring missing Brotli The CMake project was set to `QUIET` for Brotli instead of `REQUIRED`. This makes builds unexpectedly ignore missing Brotli even
cmake: stop CMake from quietly ignoring missing Brotli The CMake project was set to `QUIET` for Brotli instead of `REQUIRED`. This makes builds unexpectedly ignore missing Brotli even when `CURL_BROTLI` is enabled. Closes #11376
show more ...
|
#
3f8fc257 |
| 09-May-2023 |
Viktor Szakats |
cmake: add support for "unity" builds Aka "jumbo" or "amalgamation" builds. It means to compile all sources per target as a single C source. This is experimental. You can enable
cmake: add support for "unity" builds Aka "jumbo" or "amalgamation" builds. It means to compile all sources per target as a single C source. This is experimental. You can enable it by passing `-DCMAKE_UNITY_BUILD=ON` to cmake. It requires CMake 3.16 or newer. It makes builds (much) faster, allows for better optimizations and tends to promote less ambiguous code. Also add a new AppVeyor CI job and convert an existing one to use "unity" mode (one MSVC, one MinGW), and enable it for one macOS CI job. Fix related issues: - add missing include guard to `easy_lock.h`. - rename static variables and functions (and a macro) with names reused across sources, or shadowed by local variables. - add an `#undef` after use. - add a missing `#undef` before use. - move internal definitions from `ftp.h` to `ftp.c`. - `curl_memory.h` fixes to make it work when included repeatedly. - stop building/linking curlx bits twice for a static-mode curl tool. These caused doubly defined symbols in unity builds. - silence missing extern declarations compiler warning for ` _CRT_glob`. - fix extern declarations for `tool_freq` and `tool_isVistaOrGreater`. - fix colliding static symbols in debug mode: `debugtime()` and `statename`. - rename `ssl_backend_data` structure to unique names for each TLS-backend, along with the `ssl_connect_data` struct member referencing them. This required adding casts for each access. - add workaround for missing `[P]UNICODE_STRING` types in certain Windows builds when compiling `lib/ldap.c`. To support "unity" builds, we had to enable `SCHANNEL_USE_BLACKLISTS` for Schannel (a Windows `schannel.h` option) _globally_. This caused an indirect inclusion of Windows `schannel.h` from `ldap.c` via `winldap.h` to have it enabled as well. This requires `[P]UNICODE_STRING` types, which is apperantly not defined automatically (as seen with both MSVS and mingw-w64). This patch includes `<subauth.h>` to fix it. Ref: https://github.com/curl/curl/runs/13987772013 Ref: https://dev.azure.com/daniel0244/curl/_build/results?buildId=15827&view=logs&jobId=2c9f582d-e278-56b6-4354-f38a4d851906&j=2c9f582d-e278-56b6-4354-f38a4d851906&t=90509b00-34fa-5a81-35d7-5ed9569d331c - tweak unity builds to compile `lib/memdebug.c` separately in memory trace builds to avoid PP confusion. - force-disable unity for test programs. - do not compile and link libcurl sources to libtests _twice_ when libcurl is built in static mode. KNOWN ISSUES: - running tests with unity builds may fail in cases. - some build configurations/env may not compile in unity mode. E.g.: https://ci.appveyor.com/project/curlorg/curl/builds/47230972/job/51wfesgnfuauwl8q#L250 Ref: https://github.com/libssh2/libssh2/issues/1034 Ref: https://cmake.org/cmake/help/latest/prop_tgt/UNITY_BUILD.html Ref: https://en.wikipedia.org/wiki/Unity_build Closes #11095
show more ...
|
#
c78a185d |
| 19-May-2023 |
Viktor Szakats |
build: drop unused/redundant `HAVE_WINLDAP_H` Sources did not use it. Autotools used it when checking for the `winldap` library, which is redundant. With CMake, detection was br
build: drop unused/redundant `HAVE_WINLDAP_H` Sources did not use it. Autotools used it when checking for the `winldap` library, which is redundant. With CMake, detection was broken: ``` Run Build Command(s):/usr/local/Cellar/cmake/3.26.3/bin/cmake -E env VERBOSE=1 /usr/bin/make -f Makefile cmTC_2d8fe/fast && /Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/cmTC_2d8fe.dir/build.make CMakeFiles/cmTC_2d8fe.dir/build Building C object CMakeFiles/cmTC_2d8fe.dir/HAVE_WINLDAP_H.c.obj /usr/local/opt/llvm/bin/clang --target=x86_64-w64-mingw32 --sysroot=/usr/local/opt/mingw-w64/toolchain-x86_64 -D_WINSOCKAPI_="" -I/my/quictls/x64-ucrt/usr/include -I/my/zlib/x64-ucrt/usr/include -I/my/brotli/x64-ucrt/usr/include -Wno-unused-command-line-argument -D_UCRT -DCURL_HIDDEN_SYMBOLS -DHAVE_SSL_SET0_WBIO -DHAS_ALPN -DNGHTTP2_STATICLIB -DNGHTTP3_STATICLIB -DNGTCP2_STATICLIB -DUSE_MANUAL=1 -fuse-ld=lld -Wl,-s -static-libgcc -lucrt -Wextra -Wall -pedantic -Wbad-function-cast -Wconversion -Winline -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wno-long-long -Wno-multichar -Wpointer-arith -Wshadow -Wsign-compare -Wundef -Wunused -Wwrite-strings -Wcast-align -Wdeclaration-after-statement -Wempty-body -Wendif-labels -Wfloat-equal -Wignored-qualifiers -Wno-format-nonliteral -Wno-sign-conversion -Wno-system-headers -Wstrict-prototypes -Wtype-limits -Wvla -Wshift-sign-overflow -Wshorten-64-to-32 -Wdouble-promotion -Wenum-conversion -Wunused-const-variable -Wcomma -Wmissing-variable-declarations -Wassign-enum -Wextra-semi-stmt -MD -MT CMakeFiles/cmTC_2d8fe.dir/HAVE_WINLDAP_H.c.obj -MF CMakeFiles/cmTC_2d8fe.dir/HAVE_WINLDAP_H.c.obj.d -o CMakeFiles/cmTC_2d8fe.dir/HAVE_WINLDAP_H.c.obj -c /my/curl/bld-cmake-llvm-x64-shared/CMakeFiles/CMakeScratch/TryCompile-3JP6dR/HAVE_WINLDAP_H.c In file included from /my/curl/bld-cmake-llvm-x64-shared/CMakeFiles/CMakeScratch/TryCompile-3JP6dR/HAVE_WINLDAP_H.c:2: In file included from /usr/local/opt/mingw-w64/toolchain-x86_64/x86_64-w64-mingw32/include/winldap.h:17: In file included from /usr/local/opt/mingw-w64/toolchain-x86_64/x86_64-w64-mingw32/include/schnlsp.h:9: In file included from /usr/local/opt/mingw-w64/toolchain-x86_64/x86_64-w64-mingw32/include/schannel.h:10: /usr/local/opt/mingw-w64/toolchain-x86_64/x86_64-w64-mingw32/include/wincrypt.h:5041:254: error: unknown type name 'PSYSTEMTIME' WINIMPM PCCERT_CONTEXT WINAPI CertCreateSelfSignCertificate (HCRYPTPROV_OR_NCRYPT_KEY_HANDLE hCryptProvOrNCryptKey, PCERT_NAME_BLOB pSubjectIssuerBlob, DWORD dwFlags, PCRYPT_KEY_PROV_INFO pKeyProvInfo, PCRYPT_ALGORITHM_IDENTIFIER pSignatureAlgorithm, PSYSTEMTIME pStartTime, PSYSTEMTIME pEndTime, PCERT_EXTENSIONS pExtensions); ^ /usr/local/opt/mingw-w64/toolchain-x86_64/x86_64-w64-mingw32/include/wincrypt.h:5041:278: error: unknown type name 'PSYSTEMTIME' WINIMPM PCCERT_CONTEXT WINAPI CertCreateSelfSignCertificate (HCRYPTPROV_OR_NCRYPT_KEY_HANDLE hCryptProvOrNCryptKey, PCERT_NAME_BLOB pSubjectIssuerBlob, DWORD dwFlags, PCRYPT_KEY_PROV_INFO pKeyProvInfo, PCRYPT_ALGORITHM_IDENTIFIER pSignatureAlgorithm, PSYSTEMTIME pStartTime, PSYSTEMTIME pEndTime, PCERT_EXTENSIONS pExtensions); ^ 2 errors generated. make[1]: *** [CMakeFiles/cmTC_2d8fe.dir/HAVE_WINLDAP_H.c.obj] Error 1 make: *** [cmTC_2d8fe/fast] Error 2 exitCode: 2 ``` Cherry-picked from #11095 88e4a21ff70ccef391cf99c8165281ff81374503 Reviewed-by: Daniel Stenberg Closes #11245
show more ...
|
#
36e998b1 |
| 18-May-2023 |
Viktor Szakats |
cmake: avoid `list(PREPEND)` for compatibility `list(PREPEND)` requires CMake v3.15, our minimum is v3.7. Ref: https://cmake.org/cmake/help/latest/command/list.html#prepend
cmake: avoid `list(PREPEND)` for compatibility `list(PREPEND)` requires CMake v3.15, our minimum is v3.7. Ref: https://cmake.org/cmake/help/latest/command/list.html#prepend Regression from 1e3319a167d2f32d295603167486e9e88af9bb4e Reported-by: Keitagit-kun on Github Fixes #11141 Closes #11144
show more ...
|
#
9c543de0 |
| 16-Apr-2023 |
Viktor Szakats |
cmake: speed up and extend picky clang/gcc options Extend existing picky compiler options with ones missing compared to autotools builds. Also sync options between clang and gcc.
cmake: speed up and extend picky clang/gcc options Extend existing picky compiler options with ones missing compared to autotools builds. Also sync options between clang and gcc. Redesign the way we enable these options to avoid the slow option detection almost completely. This reduces the number of detections from 35 to zero for clang and 3 for gcc, even after adding a bunch of new options. clang 3.0 (2011-11-29) and gcc 2.95 (1999-07-31) now required. Also show enabled picky options. Ref: https://github.com/libssh2/libssh2/pull/952 Reviewed-by: Daniel Stenberg Closes #10973
show more ...
|
#
fb08dd9c |
| 12-Apr-2023 |
Douglas R. Reno |
CMakeLists.txt: fix typo for Haiku detection Closes #10937
|
#
0409f633 |
| 31-Mar-2023 |
Viktor Szakats |
cmake: do not add zlib headers for openssl Logic copied earlier from wolfSSL. wolfSSL requires zlib headers for its public headers. OpenSSL does not, so stop adding zlib headers for it.
cmake: do not add zlib headers for openssl Logic copied earlier from wolfSSL. wolfSSL requires zlib headers for its public headers. OpenSSL does not, so stop adding zlib headers for it. Follow-up to 1e3319a167d2f32d295603167486e9e88af9bb4e Closes #10878
show more ...
|
#
34ef4fab |
| 18-Jan-2023 |
Jim King |
openssl: interop with AWS-LC * Configure changes to detect AWS-LC * CMakeLists.txt changes to detect AWS-LC * Compile-time branches needed to support AWS-LC * Correctly set OSSL_
openssl: interop with AWS-LC * Configure changes to detect AWS-LC * CMakeLists.txt changes to detect AWS-LC * Compile-time branches needed to support AWS-LC * Correctly set OSSL_VERSION and report AWS-LC release number * GitHub Actions script to build with autoconf and cmake against AWS-LC AWS-LC is a BoringSSL/OpenSSL derivative For more information see https://github.com/awslabs/aws-lc/ Closes #10320
show more ...
|
#
1e3319a1 |
| 30-Mar-2023 |
Viktor Szakats |
cmake: picky-linker fixes for openssl, ZLIB, H3 and more - fix HTTP/3 support detection with OpenSSL/quictls built with ZLIB. (Requires curl be built with ZLIB option also.) -
cmake: picky-linker fixes for openssl, ZLIB, H3 and more - fix HTTP/3 support detection with OpenSSL/quictls built with ZLIB. (Requires curl be built with ZLIB option also.) - fix HTTP/3 support detection with OpenSSL/quictls/LibreSSL and `ld` linker on Windows. - fix HTTP/3 support detection with wolfSSL to automatically add `ws2_32` to the lib list on Windows. For all linkers. - reposition ZLIB (and other compression) detection _after_ TLS detection, but before calling HTTP/3-support detection via `CheckQuicSupportInOpenSSL`. May be a regression from ebef55a61df0094b9790710a42f63c48e7de3c13 May fix #10832 (Reported-by: Micah Snyder) This also seems to fix an odd case, where OpenSSL/quictls is correctly detected, but its header path is not set while compiling, breaking build at `src/curl_ntlm_core.c`. Reason for this remains undiscovered. - satisfy "picky" linkers such as `ld` with MinGW, that are highly sensitive to lib order, by also adding brotli to the beginning of the lib list. - satisfy "picky" linkers by adding certain Windows systems libs to the lib list for OpenSSL/LibreSSL. (Might need additional ones for other forks, such as `pthread` for BoringSSL.) Note: It'd make sense to _always_ add `ws2_32`, `crypt32` (except Windows App targets perhaps?), `bcrypt` (except old-mingw!) on Windows at this point. They are almost always required, and if some aren't, they are ignored by the linker with no effect on final binaries. Closes #10857
show more ...
|
#
84550133 |
| 28-Mar-2023 |
Daniel Stenberg |
lib: use correct printf flags for sockets and timediffs Introduces CURL_FORMAT_SOCKET_T for outputting socket numbers. Fixes #10737 Reported-by: Gisle Vanem Closes #10855
|
#
2ffd787a |
| 22-Mar-2023 |
Kai Pastor |
CMake: make config version 8 compatible with 7 Reviewed-by: Jakub Zakrzewski Closes #10819
|
#
0c943964 |
| 19-Mar-2023 |
Douglas R. Reno |
cmake: bring in the network library on Haiku. When cross-compiling for Haiku, the networking library needs to be brought in. Without this, an unknown type of "Error" is reported in l
cmake: bring in the network library on Haiku. When cross-compiling for Haiku, the networking library needs to be brought in. Without this, an unknown type of "Error" is reported in lib/curl_setup_once.h. This is also needed when using CMake natively on Haiku to build libcurl. Fixes #10296 Closes #10792
show more ...
|
#
ebef55a6 |
| 14-Mar-2023 |
Viktor Szakats |
wolfssl: add quic/ngtcp2 detection in cmake, and fix builds - add QUIC/ngtcp2 detection in CMake with wolfSSL. Because wolfSSL uses zlib if available, move compression detection
wolfssl: add quic/ngtcp2 detection in cmake, and fix builds - add QUIC/ngtcp2 detection in CMake with wolfSSL. Because wolfSSL uses zlib if available, move compression detection before TLS detection. (OpenSSL might also need this in the future.) - wolfSSL 5.5.0 started using C99 types in its `quic.h` header, but it doesn't #include the necessary C99 header itself, breaking builds (unless another dependency pulled it by chance.) Add local workaround for it. For this to work with all build tools, we had to fix our header detection first. Ref: #10745 Ref: https://github.com/curl/curl-for-win/commit/6ad5f6ecc15620c15625fc443476b3a1ecef4f3f Closes #10739
show more ...
|
#
9f96537c |
| 13-Mar-2023 |
Viktor Szakats |
cmake: delete unused HAVE__STRTOI64 Also delete obsolete surrounding comments. Reviewed-by: Daniel Stenberg Closes #10756
|