summaryrefslogtreecommitdiff
path: root/m4
Commit message (Collapse)AuthorAgeFilesLines
* autotools: sync up clang picky warnings with cmakeViktor Szakats2023-04-171-3/+20
| | | | | | | | | | Bringing missing options over from CMake. Move around existing `-Wno-pointer-bool-conversion` option to come _after_ `-Wconversion`. Reviewed-by: Marcel Raad Closes #10974
* openssl: interop with AWS-LCJim King2023-03-301-0/+18
| | | | | | | | | | | | | * 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
* build: drop the use of XC_AMEND_DISTCLEANJan Engelhardt2023-03-031-169/+0
| | | | | | | | | | | | | | | | | | | | Because automake used to delete depdirs at once (.deps) and there was an issue with portability, curl's XC_AMEND_DISTCLEAN greps the Makefiles in an attempt to build a list of all depfiles and delete them individually instead. Since commit 08849db866b44510f6b8fd49e313c91a43a3dfd3, automake switched from deleting directories to individual files. curl's custom logic now finds a lot more results with the grep (the filtering of these results isn't great), which causes a massive bloating of the Makefile in the order of O(n^2). Also remove now-unused XC_AMEND_DISTCLEAN macro group References: https://github.com/curl/curl/issues/9843 References: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=59288 Reported-by: Ilmari Lauhakangas Fixes #9843 Closes #10661
* curl_setup: Suppress OpenSSL 3 deprecation warningsJay Satiro2023-02-182-10/+0
| | | | | | | | | | | - Define OPENSSL_SUPPRESS_DEPRECATED. OpenSSL 3 has deprecated some of the functions libcurl uses such as those with DES, MD5 and ENGINE prefix. We don't have replacements for those functions so the warnings were disabled in autotools and cmake builds, but still showed in other builds. Closes https://github.com/curl/curl/pull/10543
* copyright: update all copyright lines and remove year rangesDaniel Stenberg2023-01-0325-25/+25
| | | | | | | | | | | | - they are mostly pointless in all major jurisdictions - many big corporations and projects already don't use them - saves us from pointless churn - git keeps history for us - the year range is kept in COPYING checksrc is updated to allow non-year using copyright statements Closes #10205
* curl-openssl.m4: do not add $prefix/include/openssl to CPPFLAGSDaniel Stenberg2022-11-281-2/+1
| | | | | | | | | As OpenSSL's include files are all included using <openssl/*.h> in curl source code, we just risk that existing openssl files will "shadow" include files without path if that path is provided. Fixes #9989 Closes #9988
* tls: backends use connection filters for IO, enabling HTTPS-proxyStefan Eissing2022-11-281-0/+9
| | | | | | | | | | | | | | | | | | - OpenSSL (and compatible) - BearSSL - gnutls - mbedtls - rustls - schannel - secure-transport - wolfSSL (v5.0.0 and newer) This leaves only the following without HTTPS-proxy support: - gskit - nss - wolfSSL (versions earlier than v5.0.0) Closes #9962
* curl-rustls.m4: on macOS, rustls also needs the Security frameworkStefan Eissing2022-11-101-0/+8
| | | | Closes #9883
* configure: require fork for NTLM-WBDaniel Stenberg2022-11-061-0/+3
| | | | | | | Reported-by: ウさん Fixes #9847 Closes #9856
* curl-wolfssl.m4: error out if wolfSSL is not usablePetr Štetiar2022-10-101-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When I explicitly declare, that I would like to have curl built with wolfSSL support using `--with-wolfssl` configure option, then I would expect, that either I endup with curl having that support, for example in form of https support or it wouldn't be available at all. Downstream projects like for example OpenWrt build curl wolfSSL variant with `--with-wolfssl` already, but in certain corner cases it does fail: configure:25299: checking for wolfSSL_Init in -lwolfssl configure:25321: x86_64-openwrt-linux-musl-gcc -o conftest [snip] In file included from target-x86_64_musl/usr/include/wolfssl/wolfcrypt/dsa.h:33, from target-x86_64_musl/usr/include/wolfssl/wolfcrypt/asn_public.h:35, from target-x86_64_musl/usr/include/wolfssl/ssl.h:35, from conftest.c:47: target-x86_64_musl/usr/include/wolfssl/wolfcrypt/integer.h:37:14: fatal error: wolfssl/wolfcrypt/sp_int.h: No such file or directory #include <wolfssl/wolfcrypt/sp_int.h> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. and in the end thus produces curl without https support: curl: (1) Protocol "https" not supported or disabled in libcurl So fix it, by making the working wolfSSL mandatory and error out in configure step when that's not the case: checking for wolfSSL_Init in -lwolfssl... no configure: error: --with-wolfssl but wolfSSL was not found or doesn't work References: https://github.com/openwrt/packages/issues/19005 References: https://github.com/openwrt/packages/issues/19547 Signed-off-by: Petr Štetiar <ynezz@true.cz> Closes #9682
* autotools: allow --enable-symbol-hiding with windowsViktor Szakats2022-09-251-2/+1
| | | | | | | | | | | | | This local autotools logic was put in place in 9e24b9c7afbcb81120af4cf3f6cdee49a06d8224 (in 2012) which disabled it for Windows unconditionally. Testing reveals that it actually works with tested toolchains (mingw-w64 and CI ones), so let's allow this build feature on that platform. Bringing this in sync with CMake, which already supported this. Reviewed-by: Jay Satiro Closes #9586
* curl-compilers.m4: for gcc + want warnings, set gnu89 standardDaniel Stenberg2022-09-231-0/+1
| | | | | | To better verify that the code is C89 Closes #9542
* curl-compilers.m4: use -O2 as default optimize for clangDaniel Stenberg2022-09-061-1/+1
| | | | | | Not -Os Closes #9444
* misc: spelling fixesViktor Szakats2022-08-313-4/+4
| | | | | | | | | Found using codespell 2.2.1. Also delete the redundant protocol designator from an archive.org URL. Reviewed-by: Daniel Stenberg Closes #9403
* configure: introduce CURL_SIZEOFDaniel Stenberg2022-08-113-118/+60
| | | | | | | | | This is a rewrite of the previously used GPLv3+exception licensed file. With this change, there is no more reference to GPL so we can remove that from LICENSES/. Ref: #9220 Closes #9291
* configure: fixup bsdsocket detection code for AmigaOS 4.xFutaura2022-08-081-24/+40
| | | | | | | | | The code that detects bsdsocket.library for AmigaOS did not work for AmigaOS 4.x. This has been fixed and also cleaned up a little to reduce duplication. Wasn't technically necessary before, but is required when building with AmiSSL instead of OpenSSL. Closes #9268
* amissl: make AmiSSL v5 a minimum requirementFutaura2022-08-081-7/+32
| | | | | | | | | | AmiSSL v5 is the latest version, featuring a port of OpenSSL 3.0. Support for previous OpenSSL 1.1.x versions has been dropped, so makes sense to enforce v5 as the minimum requirement. This also allows all the AmiSSL stub workarounds to be removed as they are now provided in a link library in the AmiSSL SDK. Closes #9267
* curl-compilers.m4: make icc use -diag* options and disable two warningsDaniel Stenberg2022-07-231-2/+4
| | | | | | | | -wd and -we are deprecated and are now -diag-disable and -diag-error Disable warning 1024 and 2259 Closes #9179
* curl-functions.m4: check whether atomics can link rather than just compileDaniel Katz2022-07-211-1/+2
| | | | | | | | | | | | | | | Some build toolchains support C11 atomics (i.e., _Atomic types), but will not link the associated atomics runtime unless a flag is passed. In such an environment, linking an application with libcurl.a can fail due to undefined symbols for atomic load/store functions. I encountered this behavior when upgrading curl to 7.84.0 and attempting to build with Solaris Studio 12.6. Solaris provides the flag -xatomic=[gcc | studio], allowing users to link to one of two atomics runtime implementations. However, if the user does not provide this flag, then neither runtime is linked. This led to builds failing in CI. Closes #9190
* curl-wolfssl.m4: add options header when building test codeRosen Penev2022-07-201-0/+1
| | | | | | | | | Needed for certain configurations of wolfSSL. Otherwise, missing header error may occur. Tested with OpenWrt. Closes #9187
* curl-confopts: remove leftover AC_REQUIREsDaniel Stenberg2022-07-191-2/+0
| | | | | | | | | configure.ac:3488: warning: CURL_CHECK_FUNC_IOCTL is m4_require'd but not m4_defun'd configure.ac:3488: warning: CURL_CHECK_FUNC_SETSOCKOPT is m4_require'd but not m4_defun'd follow-up from 4d73854462f30 Closes #9183
* tidy-up: delete unused build configuration macrosViktor Szakats2022-07-191-674/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most of them feature guards: - `CURL_INCLUDES_SYS_UIO` [1] - `HAVE_ALLOCA_H` [2] - `HAVE_CRYPTO_CLEANUP_ALL_EX_DATA` (unused since de71e68000c8624ea13f90b136f8734dd0fb1bdc) - `HAVE_DLFCN_H` - `HAVE_DLOPEN` - `HAVE_DOPRNT` - `HAVE_FCNTL` - `HAVE_GETHOSTBYNAME` [3] - `HAVE_GETOPT_H` - `HAVE_GETPASS` - `HAVE_GETPROTOBYNAME` - `HAVE_GETSERVBYNAME` - `HAVE_IDN_FREE*` - `HAVE_INET_ADDR` - `HAVE_IOCTL` - `HAVE_KRB4` - `HAVE_KRB_GET_OUR_IP_FOR_REALM` - `HAVE_KRB_H` - `HAVE_LDAPSSL_H` - `HAVE_LDAP_INIT_FD` - `HAVE_LIBDL` - `HAVE_LIBNSL` - `HAVE_LIBRESOLV*` - `HAVE_LIBUCB` - `HAVE_LL` - `HAVE_LOCALTIME_R` - `HAVE_MALLOC_H` - `HAVE_MEMCPY` - `HAVE_MEMORY_H` - `HAVE_NETINET_IF_ETHER_H` - `HAVE_NI_WITHSCOPEID` - `HAVE_OPENSSL_CRYPTO_H` - `HAVE_OPENSSL_ERR_H` - `HAVE_OPENSSL_PEM_H` - `HAVE_OPENSSL_PKCS12_H` - `HAVE_OPENSSL_RAND_H` - `HAVE_OPENSSL_RSA_H` - `HAVE_OPENSSL_SSL_H` - `HAVE_OPENSSL_X509_H` - `HAVE_PEM_H` - `HAVE_POLL` - `HAVE_RAND_SCREEN` - `HAVE_RAND_STATUS` - `HAVE_RECVFROM` - `HAVE_SETSOCKOPT` - `HAVE_SETVBUF` - `HAVE_SIZEOF_LONG_DOUBLE` - `HAVE_SOCKIO_H` - `HAVE_SOCK_OPTS` - `HAVE_STDIO_H` - `HAVE_STRCASESTR` - `HAVE_STRFTIME` - `HAVE_STRLCAT` - `HAVE_STRNCMPI` - `HAVE_STRNICMP` - `HAVE_STRSTR` - `HAVE_STRUCT_IN6_ADDR` - `HAVE_TLD_H` - `HAVE_TLD_STRERROR` - `HAVE_UNAME` - `HAVE_USLEEP` - `HAVE_WINBER_H` - `HAVE_WRITEV` - `HAVE_X509_H` - `LT_OBJDIR` - `NEED_BASENAME_PROTO` - `NOT_NEED_LIBNSL` - `OPENSSL_NO_KRB5` - `RECVFROM_TYPE*` - `SIZEOF_LONG_DOUBLE` - `STRERROR_R_TYPE_ARG3` - `USE_YASSLEMUL` - `_USRDLL` (from CMake) [4] [1] Related parts in `m4/curl-functions.m4` and `configure.ac` might also be deleted. [2] Related comment can possibly be deleted in `packages/vms/generate_config_vms_h_curl.com`. [3] There are more instances of this in autotools, but I did not dare to touch those. Looked like it's used to detect socket support. [4] This is necessary for MFC (Microsoft Foundation Class) DLLs to force linking MFC components statically to the DLL. `libcurl.dll` does not use MFC, so we can delete this define. Ref: https://docs.microsoft.com/cpp/build/regular-dlls-statically-linked-to-mfc Script that can help finding unused settings like above: ```shell autoheader configure.ac # generate lib/curl_config.h.in { grep -o -E 'set\([A-Z][A-Z0-9_]{3,}' CMake/Platforms/WindowsCache.cmake | sed -E 's|set\(||g' grep -o -E -h '#define +[A-Z][A-Z0-9_]{3,}' lib/config-*.h | sed -E 's|#define +||g' grep -o -E '#cmakedefine +[A-Z][A-Z0-9_]{3,}' lib/curl_config.h.cmake | sed -E 's|#cmakedefine +||g' grep -o -E '#undef +[A-Z][A-Z0-9_]{3,}' lib/curl_config.h.in | sed -E 's|#undef +||g' } | sort -u | grep -v -F 'HEADER_CURL_' | while read -r def; do c="$(git grep -w -F "${def}" | grep -v -E -c '(/libcurl\.tmpl|^lib/config-|^lib/curl_config\.h\.cmake|^CMakeLists\.txt|^CMake/Platforms/WindowsCache\.cmake|^packages/vms/config_h\.com|^m4/curl-functions\.m4|^acinclude\.m4|^configure\.ac)')" if [ "${c}" = '0' ]; then echo "${def}" fi done ``` Reviewed-by: Daniel Stenberg Closes #9044
* configure: check for the stdatomic.h header in configureDaniel Stenberg2022-06-281-17/+19
| | | | | | | | | ... and only set HAVE_ATOMIC if that header exists since we use typedefes set in it. Reported-by: Ryan Schmidt Fixes #9059 Closes #9060
* copyright: make repository REUSE compliantmax.mehl2022-06-1326-20/+74
| | | | | | | | | | | Add licensing and copyright information for all files in this repository. This either happens in the file itself as a comment header or in the file `.reuse/dep5`. This commit also adds a Github workflow to check pull requests and adapts copyright.pl to the changes. Closes #8869
* lib: make curl_global_init() threadsafe when possibleThomas Guillem2022-06-071-0/+23
| | | | | | | Use a posix pthread or a Windows SRWLOCK to lock curl_global_init*() and curl_global_cleanup(). Closes #8680
* wolfSSL: explicitly use compatibility layerElms2022-05-171-13/+0
| | | | | | | | | | This change removes adding an include `$prefix/wolfssl` or similar to allow for openssl include aliasing. Include paths of `wolfssl/openssl/` are used to explicitly use wolfSSL includes. This fixes cmake builds as well as avoiding potentially using openSSL headers since include path order is not guaranteed. Closes #8864
* configure: fix '--enable-code-coverage' typogaoxingwang on github2022-02-101-1/+1
| | | | | Fixes #8425 Closes #8426
* configure: remove support for "embedded ares"Daniel Stenberg2022-02-071-57/+42
| | | | | | | | | | In March 2010 (commit 4259d2df7dd) we removed the embedded 'ares' directory from the curl source tree but we have since supported especially detecting and using that build directory. The time has come to remove that kludge and ask users to specify the c-ares dir correctly with --enable-ares. Closes #8397
* curl-openssl: fix SRP check for OpenSSL 3.0Marcel Raad2022-02-071-5/+15
| | | | | | | | | | | | When OpenSSL 3.0 is built with `--api=3.0` and `no-deprecated`, the SRP functions exist in the library, but are disabled for user code. Check if they are actually usable instead of only if they exist. Also, check for the functions actually required for TLS-SRP. TLS-SRP support is still enabled if OpenSSL is configured with just `--api=3.0` or with `--api=1.1.1 no-deprecated`. Closes https://github.com/curl/curl/pull/8394
* misc: remove the final watcom referencesDaniel Stenberg2022-01-171-58/+1
| | | | | | | | | Follow-up to bbf8cae44dedc495e6 We removed support for the watcom builds files back in September 2020. This removes all remaining watcom references and ifdefs. Closes #8287
* misc: remove BeOS code and referencesDaniel Stenberg2022-01-171-1/+1
| | | | | | | There has not been a mention of this OS in any commit since December 2004 (58f4af7973e3d2). The OS is also long gone. Closes #8288
* curl-openssl: remove the OpenSSL headers and library versions checkDaniel Stenberg2022-01-151-280/+1
| | | | | | | | | It is more work to maintain that check than the (any?) benefit it brings. Fixes #8279 Reported-by: Satadru Pramanik Closes #8280
* build: enable -Warith-conversionMarcel Raad2022-01-131-0/+1
| | | | | | This makes the behavior consistent between GCC 10 and earlier versions. Closes https://github.com/curl/curl/pull/8271
* build: fix -Wenum-conversion handlingMarcel Raad2022-01-131-4/+5
| | | | | | | Don't enable that warning when warnings are disabled. Also add it to CMake. Closes https://github.com/curl/curl/pull/8271
* curl-functions.m4: revert DYLD_LIBRARY_PATH tricks in CURL_RUN_IFELSEDaniel Stenberg2022-01-121-5/+1
| | | | | | | | | | Mostly reverts ba0657c343f, but now instead just run the plain macro on darwin. The approach as used on other platforms is simply not necessary on macOS. Fixes #8229 Reported-by: Ryan Schmidt Closes #8247
* mesalink: remove supportDaniel Stenberg2022-01-101-107/+0
| | | | | | | | | Mesalink has ceased development. We can no longer encourage use of it. It seems to be continued under the name TabbySSL, but no attempts have (yet) been to make curl support it. Fixes #8188 Closes #8191
* curl-functions.m4: fix LIBRARY_PATH adjustment to avoid evalSatadru Pramanik2022-01-051-9/+14
| | | | | | | | $$ usage in a m4 file introduces the PID in linux. Instead, just duplicate previous working code with a case switch. Fixes #8229 Closes #8230
* m4/curl-compilers: tell clang -Wno-pointer-bool-conversionDaniel Stenberg2021-12-291-0/+3
| | | | | | | | To hush compiler warnings we don't care for: error: address of function 'X' will always evaluate to 'true' Fixes #8197 Closes #8198
* openssl: define HAVE_OPENSSL_VERSION for OpenSSL 1.1.0+Jay Satiro2021-12-161-4/+1
| | | | | | | | | | | | | | | | | | | | | Prior to this change OpenSSL_version was only detected in configure builds. For other builds the old version parsing code was used which would result in incorrect versioning for OpenSSL 3: Before: curl 7.80.0 (i386-pc-win32) libcurl/7.80.0 OpenSSL/3.0.0a zlib/1.2.11 WinIDN libssh2/1.9.0 After: curl 7.80.0 (i386-pc-win32) libcurl/7.80.0 OpenSSL/3.0.1 zlib/1.2.11 WinIDN libssh2/1.9.0 Reported-by: lllaffer@users.noreply.github.com Fixes https://github.com/curl/curl/issues/8154 Closes https://github.com/curl/curl/pull/8155
* configure: fix runtime-lib detection on macOSBernhard Walle2021-11-181-4/+10
| | | | | | | | | | | | With a non-standard installation of openssl we get this error: checking run-time libs availability... failed configure: error: one or more libs available at link-time are not available run-time. Libs used at link-time: -lnghttp2 -lssl -lcrypto -lssl -lcrypto -lz There's already code to set LD_LIBRARY_PATH on Linux, so set DYLD_LIBRARY_PATH equivalent on macOS. Closes #8028
* configure: add -lm to configure for rustls build.Jacob Hoffman-Andrews2021-11-131-8/+3
| | | | | | | | | Note: The list of libraries that rustc tells us we need to include is longer, but also includes some more platform-specific libraries that I am not sure how to effectively incorporate. Adding just -lm seems to solve an immediate problem, so I'm adding just that. Closes #8002
* vtls/rustls: update to compile with rustls-ffi v0.8.0Kevin Burke2021-11-111-4/+4
| | | | | | | | | | | | Some method names, as well as the generated library name, were changed in a recent refactoring. Further, change the default configuration instructions to check for Hyper in either "target/debug" or "target/release" - the latter contains an optimized build configuration. Fixes #7947 Closes #7948
* curl-confopts.m4: remove --enable/disable-hidden-symbolsDaniel Stenberg2021-10-221-4/+0
| | | | | | | These configure options have been saying "deprecated" since 9e24b9c7af (April 2012). It was about time we remove them. Closes #7891
* misc: update copyright yearsDaniel Stenberg2021-10-151-1/+1
|
* curl-openssl.m4: modify library order for openssl linkingMichael Afanasiev2021-10-081-2/+2
| | | | | | | | lcrypto may depend on lz, and configure corrently fails with when statically linking as the order is "-lz -lcrypto". This commit switches the order to "-lcrypto -lz". Closes #7826
* misc: fix a few issues on MidnightBSDLucas Holt2021-10-052-1/+5
| | | | Closes #7812
* configure: remove `HAVE_WINSOCK_H` definitionMarcel Raad2021-09-291-6/+1
| | | | | | It's not used anymore. Closes https://github.com/curl/curl/pull/7795
* Revert "build: remove checks for WinSock 1"Daniel Stenberg2021-09-291-1/+6
| | | | | | | | Due to CI issues This reverts commit c2ea04f92b00b6271627cb218647527b5a50f2fc. Closes #7790
* build: remove checks for WinSock 1Marcel Raad2021-09-281-6/+1
| | | | | | It's not supported anymore. Closes https://github.com/curl/curl/pull/7778
* curl-openssl: pass argument to sed single-quotedDaniel Stenberg2021-09-231-1/+1
| | | | | | | | | | ... instead of using an escaped double-quote. This is an attempt to make this work better with ksh that otherwise would insist on a double escape! Reported-by: Randall S. Becker Fixes #7758 Closes #7764