AC_REQUIRE means "if this macro hasn't been executed already, execute
it". So in a wrapper around AC_RUN_IFELSE, AC_REQUIRE(AC_RUN_IFELSE)
isn't correct at that will execute AC_RUN_IFELSE without any arguments.
With autoconf 2.69 this is basically a no-op, but with autoconf 2.70,
AC_RUN_IFELSE without a default value when cross-compiling is fatal.
The result is that curl with autoconf 2.70 cannot cross-compile.
Fixes https://github.com/curl/curl/issues/5126
Closes https://github.com/curl/curl/pull/5130
This fixes the case when --disable-code-coverage supplied to ./configure
would result in coverage="yes" being set.
Closes#4099
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
Made detection macros for these two functions in the same style as other
functions possibly in winsock in the hope this will work better to
detect these functions when cross-compiling for Windows.
Follow-up to e91e481612Fixes#3913Closes#3915
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
... only set it when we actually have to run tests to reduce its impact
on for example build commands etc.
Fixes#2490Closes#2492
Reported-by: Dmitry Mikhirev
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_*.
These configure vars are modified in a curl-specific way and modified by
the configure process, but are never loaded from cache, even though they
are designated as _cv_. We should implement proper AC_CACHE_CHECKs for
them eventually.
This function was only used twice, both in places where performance
isn't crucial (socks + if2ip). Removing the use of this function removes
the need to have our private version for systems without it == reduced
amount of code.
Also, in the SOCKS case it is clearly better to fail gracefully rather
than to truncate the results.
This work was triggered by a bug report on the strcal prototype in
strequal.h.
strlcat was added in commit db70cd28 in February 2001!
Bug: http://curl.haxx.se/bug/view.cgi?id=1192
Reported by: Jeremy Huddleston
Take in account that POSIX standard Issue 7 drops h_errno support. Now, we also
consider getaddrinfo() to be thread-safe when (_POSIX_C_SOURCE >= 200809L) or
(_XOPEN_SOURCE >= 700) independently of whether h_errno exists or not.
Now use gai_strerror() to get proper error messages when getaddrinfo()
has failed. Detect the function in configure.
Code based on work and suggestions by Jeff Pohlmeyer and Guenter Knauf
Instead of reopening the downloaded file, fsetxattr uses the (already
open) file descriptor to attach extended attributes. This makes the
procedure more robust against errors caused by moved or deleted files.
setxattr is a glibc call to set extended attributes, so configure now
checks for it and the code is adapted to only build when the
functionality is present.
implement the function even when h_errno is not a macro.
The h_errno macro test now only done on systems for which there
is no hard coded knowledge about getaddrinfo's thread safeness.
- Constantine Sapuntzakis reported that Darwin 6.0 a.k.a. MAC OS X 10.2
and newer have a threadsafe getaddrinfo.
- Fix Dragonfly BSD triplet detection.
- In case the hard-coded knowledge says that getaddrinfo is threadsafe,
an additional check is done to verify that h_errno is also defined.
If h_errno isn't defined, we finally assume that it isn't threadsafe.
Jamie Lokier provided the inspiration for this extra check.