configure: ac_cv_ -> curl_cv_ for write-only vars

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_*.
This commit is contained in:
Irfan Adilovic 2016-04-17 22:05:15 +02:00 committed by Daniel Stenberg
parent 4b639dbc74
commit d9f3b365a3
2 changed files with 107 additions and 107 deletions

View file

@ -1158,7 +1158,7 @@ AC_DEFUN([CURL_CHECK_FUNC_GETNAMEINFO], [
#
AC_DEFINE_UNQUOTED(HAVE_GETNAMEINFO, 1,
[Define to 1 if you have the getnameinfo function.])
ac_cv_func_getnameinfo="yes"
curl_cv_func_getnameinfo="yes"
fi
fi
])
@ -1427,7 +1427,7 @@ AC_DEFUN([CURL_CHECK_FUNC_RECV], [
#
AC_DEFINE_UNQUOTED(HAVE_RECV, 1,
[Define to 1 if you have the recv function.])
ac_cv_func_recv="yes"
curl_cv_func_recv="yes"
fi
else
AC_MSG_ERROR([Unable to link function recv])
@ -1594,7 +1594,7 @@ AC_DEFUN([CURL_CHECK_FUNC_SEND], [
#
AC_DEFINE_UNQUOTED(HAVE_SEND, 1,
[Define to 1 if you have the send function.])
ac_cv_func_send="yes"
curl_cv_func_send="yes"
fi
else
AC_MSG_ERROR([Unable to link function send])
@ -2453,7 +2453,7 @@ AC_DEFUN([CURL_CHECK_FUNC_SELECT], [
#
AC_DEFINE_UNQUOTED(HAVE_SELECT, 1,
[Define to 1 if you have the select function.])
ac_cv_func_select="yes"
curl_cv_func_select="yes"
fi
fi
])