-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
configure: resolve conflict with AC_CHECK_HEADERS #766
Conversation
According to autoconf docs curl ought to use the There are 16 such variables, and an alternative to this patch would be to rename them all to |
Yes, I think they all should be renamed to use the |
I agree that fixing them all is the Right thing to do. On second analysis, there are 107 |
And yes, this fix would fix #603 and any other similar conflict. |
This was automated by: sed -b -i -f <(ack -A1 AC_CACHE_CHECK | \ ack -o 'ac_cv_.*?\b' | \ sort -u | xargs -n1 bash -c \ 'echo "s/$0/curl_cv_${0#ac_cv_}/g"') \ $(git ls-files) This only changed the prefix for 16 variables actually checked with AC_CACHE_CHECK.
The following 71 Note that some of the variables, like the #603's ac_cv_func_alarm |
This variable must not be cached in its current form, as any cached information will prevent the next configure run from determining the correct LIBS needed for the function. Thus, rename prefix `ac_cv_` to just `curl_`.
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.
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 curl#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 curl#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_*.
I have now renamed the variables, inspecting each single one to make sure it's correct to rename them. A few The other one is a major call to |
Thanks a bunch, this is now merged as of commit d9f3b36. |
AC_CHECK_HEADERS produces `ac_cv_header_*_h' cache variables, which
conflict with curl-specific header check for windows.h. By renaming the
variable used by curl, any conflict with other projects and shared
config.caches is resolved. The conflict occurs under CYGWIN, as
AC_CHECK_HEADERS (from a different project) will set
ac_cv_header_windows_h=1, while the expected value for curl is 0.