summaryrefslogtreecommitdiff
path: root/acinclude.m4
Commit message (Collapse)AuthorAgeFilesLines
* copyright: update all copyright lines and remove year rangesDaniel Stenberg2023-01-031-1/+1
| | | | | | | | | | | | - 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
* functypes: provide the recv and send arg and return typesDaniel Stenberg2022-09-281-350/+7
| | | | | | | | | | | | This header is for providing the argument types for recv() and send() when built to not use a dedicated config-[platfor].h file. Remove the slow brute-force checks from configure and cmake. This change also removes the use of the types for select, as they were not used in code. Closes #9592
* autotools: reduce brute-force when detecting recv/send arg listViktor Szakats2022-09-251-8/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | autotools uses brute-force to detect `recv`/`send`/`select` argument lists, by interating through _all_ argument type combinations on each `./configure` run. This logic exists since 01fa02d0b545e1433dced2430561f8c0c72b74a9 (from 2006) and was a bit later extended with Windows support. This results in a worst-case number of compile + link cycles as below: - `recv`: 96 - `send`: 192 - `select`: 60 Total: 348 (the number of curl C source files is 195, for comparison) Notice that e.g. curl-for-win autotools builds require two `./configure` invocations, doubling these numbers. `recv` on Windows was especially unlucky because `SOCKET` (the correct choice there) was listed _last_ in one of the outer trial loops. This resulted in lengthy waits while autotools was trying all invalid combinations first, wasting cycles, disk writes and slowing down iteration. This patch reduces the amount of idle work by reordering the tests in a way to succeed first on a well-known platform such as Windows, and also on non-Windows by testing for POSIX prototypes first, on the assumption that these are the most likely candidates these days. (We do not touch `select`, where the order was already optimal for these platforms.) For non-Windows, this means to try a return value of `ssize_t` first, then `int`, reordering the buffer argument type to try `void *` first, then `byte *`, and prefer the `const` flavor with `send`. If we are here, also stop testing for `SOCKET` type in non-Windows builds. After the patch, detection on Windows is instantaneous. It should also be faster on popular platforms such as Linux and BSD-based ones. If there are known-good variations for other platforms, they can also be fast-tracked like above, given a way to check for that platform inside the autotools logic. Reviewed-by: Daniel Stenberg Closes #9591
* configure: fixup bsdsocket detection code for AmigaOS 4.xFutaura2022-08-081-30/+9
| | | | | | | | | 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
* tidy-up: delete unused build configuration macrosViktor Szakats2022-07-191-196/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* copyright: make repository REUSE compliantmax.mehl2022-06-131-1/+3
| | | | | | | | | | | 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
* misc: fix a few issues on MidnightBSDLucas Holt2021-10-051-2/+2
| | | | Closes #7812
* configure: remove `HAVE_WINSOCK_H` definitionMarcel Raad2021-09-291-80/+0
| | | | | | It's not used anymore. Closes https://github.com/curl/curl/pull/7795
* Revert "build: remove checks for WinSock 1"Daniel Stenberg2021-09-291-0/+78
| | | | | | | | Due to CI issues This reverts commit c2ea04f92b00b6271627cb218647527b5a50f2fc. Closes #7790
* build: remove checks for WinSock 1Marcel Raad2021-09-281-78/+0
| | | | | | It's not supported anymore. Closes https://github.com/curl/curl/pull/7778
* Get rid of the unused HAVE_SIG_ATOMIC_T et. al.Dan Fandrich2021-07-231-44/+0
| | | | It was added in 2006 but I see no evidence it was ever used.
* configure: include <time.h> unconditionallyMichael Forney2021-04-071-38/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | In 2682e5f5, several instances of AC_HEADER_TIME were removed since it is a deprecated autoconf macro. However, this was the macro that defined TIME_WITH_SYS_TIME, which was used to indicate that <time.h> can be included alongside <sys/time.h>. TIME_WITH_SYS_TIME is still used in the configure test body and since it is no longer defined, <time.h> is *not* included on systems that have <sys/time.h>. In particular, at least on musl libc and glibc, <sys/time.h> does not implicitly include <time.h> and does not declare clock_gettime, gmtime_r, or localtime_r. This causes configure to fail to detect those functions. The AC_HEADER_TIME macro deprecation text says > All current systems provide time.h; it need not be checked for. > Not all systems provide sys/time.h, but those that do, all allow > you to include it and time.h simultaneously. So, to fix this issue, simply include <time.h> unconditionally when testing for time-related functions and in libcurl, and don't bother checking for it. Closes #6859
* configure: disable min version set for DarwinMuhammed Yavuz Nuzumlalı2021-04-071-24/+5
| | | | | Fixes #6838 Closes #6860
* configure: remove use of deprecated macrosDaniel Stenberg2021-03-161-2/+0
| | | | AC_HEADER_TIME, AC_HEADER_STDC and AC_TYPE_SIGNAL
* configure: s/AC_HELP_STRING/AS_HELP_STRINGDaniel Stenberg2021-03-161-6/+6
| | | | | | | | | AC_HELP_STRING is deprecated in 2.70+ and I believe AS_HELP_STRING works already since 2.59 so bump the minimum required version to that. Reported-by: Emil Engler Fixes #6647 Closes #6748
* config: fix building SMB with configure using Win32 CryptoMarc Hoersken2021-03-151-0/+76
| | | | | | | | | | | | | | | | | | | Align conditions for NTLM features between CMake and configure builds by differentiating between USE_NTLM and USE_CURL_NTLM_CORE, just like curl_setup.h does internally to detect support of: - USE_NTLM: required for NTLM crypto authentication feature - USE_CURL_NTLM_CORE: required for SMB protocol Implement USE_WIN32_CRYPTO detection by checking for Crypt functions in wincrypt.h which are not available in the Windows App environment. Link advapi32 and crypt32 for Crypto API and Schannel SSL backend. Fix condition of Schannel SSL backend in CMake build accordingly. Reviewed-by: Marcel Raad Closes #6277
* language: s/behaviour/behavior/gEmil Engler2021-01-021-2/+2
| | | | | | | | We currently use both spellings the british "behaviour" and the american "behavior". However "behavior" is more used in the project so I think it's worth dropping the british name. Closes #6395
* curl: add compatibility for Amiga and GCC 6.5Oliver Urbann2020-11-201-10/+10
| | | | | | | Changes are mainly reordering and adding of includes required to compile with a more recent version of GCC. Closes #6220
* curl.se: new homeDaniel Stenberg2020-11-041-1/+1
| | | | Closes #6172
* acinclude: detect manually set minimum macos/ipod versionDaniel Stenberg2020-10-301-3/+9
| | | | | | | | | ... even if set in the CC or IPHONEOS/MACOSX_DEPLOYMENT_TARGET variables. Reported-by: hamstergene on github Fixes #6138 Closes #6140
* src: Consistently spell whitespace without whitespaceDaniel Gustafsson2020-09-301-2/+2
| | | | | | | | | Whitespace is spelled without a space between white and space, so make sure to consistently spell it that way across the codebase. Closes #6023 Reviewed-by: Daniel Stenberg <daniel@haxx.se> Reviewed-by: Emil Engler <me@emilengler.com>
* build: fixed build for systems with select() in unistd.hHarry Sintonen2020-03-311-0/+4
| | | | Closes #5169
* polarssl: remove more references and mentionsDaniel Stenberg2020-03-051-5/+5
| | | | | | Assisted-by: Jay Satiro Follow-up to 6357a19ff29dac04 Closes #5036
* configure: add --with-amisslChris Young2019-03-151-1/+39
| | | | | | | | | | AmiSSL is an Amiga native library which provides a wrapper over OpenSSL. It also requires all programs using it to use bsdsocket.library directly, rather than accessing socket functions through clib, which libcurl was not necessarily doing previously. Configure will now check for the headers and ensure they are included if found. Closes #3677
* acinclude: add additional libraries to check for LDAP supportMichael Felt2019-02-251-1/+3
| | | | | | | | - Add an additional check for LDAP that also checks for OpenSSL since on AIX those libraries may be required to link LDAP properly. Fixes https://github.com/curl/curl/issues/3595 Closes https://github.com/curl/curl/pull/3596
* configure: fix recv/send/select detection on Androidhhb2019-01-191-10/+1
| | | | | | | | | | | This reverts commit d4f25201fb7da03fc88f90d51101beb3d0026db9. The overloadable attribute is removed again starting from NDK17. Actually they only exist in two NDK versions (15 and 16). With overloadable, the first condition tried will succeed. Results in wrong detection result. Closes #3484
* configure: remove CURL_CONFIGURE_CURL_SOCKLEN_TDaniel Stenberg2018-10-251-124/+0
| | | | | | | Follow-up to #3166 which did the cmake part of this. This type/define is not used. Closes #3168
* configure: s/AC_RUN_IFELSE/CURL_RUN_IFELSEDaniel Stenberg2018-09-261-1/+1
| | | | | | | fix a few leftovers Fixes #3006 Closes #3049
* configure: conditionally enable pedantic-errorsMarcel Raad2018-08-211-1/+1
| | | | | | | | | | | | | | | Enable pedantic-errors for GCC >= 5 with --enable-werror. Before GCC 5, pedantic-errors was synonymous to -Werror=pedantic [0], which is still the case for clang [1]. With GCC 5, it became complementary [2]. Also fix a resulting error in acinclude.m4 as main's return type was missing, which is illegal in C99. [0] https://gcc.gnu.org/onlinedocs/gcc-4.9.0/gcc/Warning-Options.html [1] https://clang.llvm.org/docs/UsersManual.html#options-to-control-error-and-warning-messages [2] https://gcc.gnu.org/onlinedocs/gcc-5.1.0/gcc/Warning-Options.html Closes https://github.com/curl/curl/pull/2747
* configure: remove CURL_CHECK_NI_WITHSCOPEID tooDaniel Stenberg2018-06-271-101/+0
| | | | | | Since it isn't used either and requires the getnameinfo check Follow-up to 0aeca41702d2
* getnameinfo: not usedDaniel Stenberg2018-06-271-206/+0
| | | | Closes #2687
* configure: replace AC_TRY_RUN with CURL_RUN_IFELSEDaniel Stenberg2018-05-211-2/+2
| | | | | | | | ... and export LD_LIBRARY_PATH properly. This is a follow-up from 2d4c215. Fixes #2586 Reported-by: Bernhard Walle
* build: add picky compiler warning flags for gcc 6 and 7Eric Gallager2018-04-071-0/+0
|
* CURL_SIZEOF_LONG: removed, use only SIZEOF_LONGDaniel Stenberg2017-08-171-14/+0
|
* system.h: remove all CURL_SIZEOF_* definesDaniel Stenberg2017-08-171-285/+0
| | | | | | | ... as they're not used externally and internally we check for the sizes already in configure etc. Closes #1767
* configure: check for __builtin_available() availability (#1788)Nick Zitzmann2017-08-161-0/+26
| | | | | | | This change does two things: 1. It un-breaks the build in Xcode 9.0. (Xcode 9.0 is currently failing trying to compile connectx() in lib/connect.c.) 2. It finally weak-links the connectx() function, and falls back on connect() when run on older operating systems.
* configure: fix recv/send/select detection on AndroidDaniel Stenberg2017-08-081-6/+20
| | | | | | | | | | | ... since they now provide several functions as __attribute__((overloadable)), the argument detection logic need updates. Patched-by: destman at github Fixes #1738 Closes #1739
* build: remove WIN32_LEAN_AND_MEAN from individual build systemsMarcel Raad2017-07-111-2/+0
| | | | | | | | It's defined for all build systems in curl_setup.h since commit beb08481d01a07a8b10938b1078a5e298b1c2912. This caused macro redefinition warnings in the configure builds. Closes https://github.com/curl/curl/pull/1677
* configure: try ldap/lber in reversed order firstDaniel Stenberg2017-07-041-1/+1
| | | | | | | | | | When scanning for which LDAP libraries to use, try the -lldap -llber combination before the reversed order since it has a greater chance of working when linking with libcurl statically. Fixes #1619 Closes #1634 Reported-by: David E. Narváez
* includes: remove curl/curlbuild.h and curl/curlrules.hDaniel Stenberg2017-06-141-15/+3
| | | | | | | | Rely entirely on curl/system.h now. Introduced in Aug 2008 with commit 14240e9e109f. Now gone. Fixes #1456
* Revert "configure: prefer 'long long' to int64_t for curl_off_t"Daniel Stenberg2017-04-051-2/+2
| | | | | | This reverts commit 81284374bf3c670d2050f8562edeb69f060b07cc. Due to mingw32 brekage.
* configure: prefer 'long long' to int64_t for curl_off_tDaniel Stenberg2017-04-051-2/+2
| | | | | | | | | | Since it is a native type and it makes it less complicated to find a matching one in system.h Bug: https://curl.haxx.se/mail/lib-2017-04/0010.html Reported-by: Dan Fandrich Closes #1388
* configure: verify that compiler groks -Werror=partial-availabilityDaniel Stenberg2016-11-031-0/+7
| | | | | | Reported-by: bemoody Fixes #1104
* configure: raise the default minimum version for macos to 10.8Daniel Stenberg2016-10-311-1/+1
| | | | | follow-up to 4f8d0b6f02aa7043. Since the darwinssl code breaks otherwise. If you build without darwinssl 10.5 works fine.
* configure.in: Fix test syntaxMichael Osipov2016-10-271-1/+1
| | | | | | | | Some versions of test allow == for equality, but others (such as the HP-UX version) do not. Use a single = for correctness. Error output: checking for monotonic clock_gettime... ./configure[20445]: ==: A test command parameter is not valid.
* configure: Check for other variants of the -m*os*-version-min flagsMartin Storsjo2016-10-201-4/+4
| | | | | | In addition to -miphoneos-version-min, the same version can be set using -mios-version-min. And for WatchOS and TvOS, there's -mwatchos-version-min and -mtvos-version-min.
* configure: set min version flags for builds on macDaniel Stenberg2016-10-201-1/+38
| | | | | | | | This helps building binaries that can work on multiple macOS versions. Help-by: Martin Storsjö Fixes #1069
* configure: make the cpp -P detection not clobber CPPFLAGSCraig Davison2016-09-051-4/+7
| | | | | | CPPPFLAGS is now CPPPFLAG. Fixes CURL_CHECK_DEF. Fixes #958
* acinclude.m4: improve autodetection of CA bundle on FreeBSDMichael Osipov2016-06-271-3/+3
| | | | | | | | | | | | The FreeBSD Port security/ca_root_nss installs the Mozilla NSS CA bundle to /usr/local/share/certs/ca-root-nss.crt. Use this bundle in the discovery process. This change also removes the former FreeBSD path that has been obsolete for 8 years since this FreeBSD ports commit: https://svnweb.freebsd.org/ports/head/security/?view=revision&revision=215953 Closes #894
* configure: ac_cv_ -> curl_cv_ for write-only varsIrfan Adilovic2016-04-211-4/+4
| | | | | | | | | | | | | | | | | | | These configure vars are modified in a curl-specific way but never evaluated or loaded from cache, even though they are designated as _cv_. We could either implement proper AC_CACHE_CHECKs for them, or remove them completely. Fixes #603 as ac_cv_func_gethostbyname is no longer clobbered, and AC_CHECK_FUNC(gethostbyname...) will no longer spuriously succeed after the first configure run with caching. `ac_cv_func_strcasecmp` is curious, see #770. `eval "ac_cv_func_$func=yes"` can still cause problems as it works in tandem with AC_CHECK_FUNCS and then potentially modifies its result. It would be best to rewrite this test to use a new CURL_CHECK_FUNCS macro, which works the same as AC_CHECK_FUNCS but relies on caching the values of curl_cv_func_* variables, without modifiying ac_cv_func_*.