@@ -14600,26 +14600,66 @@ done
1460014600
1460114601# System's version of getaddrinfo(), if any, may be used only if we found
1460214602# a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
14603- # (Note: the AC_TRY_LINK probe fails on Windows, where the available
14603+ # (Note: the AC_REPLACE_FUNCS probe fails on Windows, where the available
1460414604# versions of getaddrinfo don't follow normal C call protocol. This is OK
1460514605# because we want to use our own getaddrinfo.c on Windows anyway.)
1460614606if test x"$ac_cv_type_struct_addrinfo" = xyes ; then
14607- echo "$as_me:$LINENO: checking for getaddrinfo" >&5
14608- echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
14607+
14608+ for ac_func in getaddrinfo
14609+ do
14610+ as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14611+ echo "$as_me:$LINENO: checking for $ac_func" >&5
14612+ echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14613+ if eval "test \"\${$as_ac_var+set}\" = set"; then
14614+ echo $ECHO_N "(cached) $ECHO_C" >&6
14615+ else
1460914616 cat >conftest.$ac_ext <<_ACEOF
1461014617/* confdefs.h. */
1461114618_ACEOF
1461214619cat confdefs.h >>conftest.$ac_ext
1461314620cat >>conftest.$ac_ext <<_ACEOF
1461414621/* end confdefs.h. */
14622+ /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14623+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
14624+ #define $ac_func innocuous_$ac_func
1461514625
14616- #include <sys/socket.h>
14617- #include <netdb.h>
14626+ /* System header to define __stub macros and hopefully few prototypes,
14627+ which can conflict with char $ac_func (); below.
14628+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14629+ <limits.h> exists even on freestanding compilers. */
14630+
14631+ #ifdef __STDC__
14632+ # include <limits.h>
14633+ #else
14634+ # include <assert.h>
14635+ #endif
14636+
14637+ #undef $ac_func
14638+
14639+ /* Override any gcc2 internal prototype to avoid an error. */
14640+ #ifdef __cplusplus
14641+ extern "C"
14642+ {
14643+ #endif
14644+ /* We use char because int might match the return type of a gcc2
14645+ builtin and then its argument prototype would still apply. */
14646+ char $ac_func ();
14647+ /* The GNU C library defines this for functions which it implements
14648+ to always fail with ENOSYS. Some functions are actually named
14649+ something starting with __ and the normal name is an alias. */
14650+ #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14651+ choke me
14652+ #else
14653+ char (*f) () = $ac_func;
14654+ #endif
14655+ #ifdef __cplusplus
14656+ }
14657+ #endif
1461814658
1461914659int
1462014660main ()
1462114661{
14622- return getaddrinfo("", "", NULL, NULL) ? 0 : 1 ;
14662+ return f != $ac_func ;
1462314663 ;
1462414664 return 0;
1462514665}
@@ -14646,30 +14686,36 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1464614686 ac_status=$?
1464714687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1464814688 (exit $ac_status); }; }; then
14649-
14650- cat >>confdefs.h <<\_ACEOF
14651- #define HAVE_GETADDRINFO 1
14652- _ACEOF
14653-
14654- echo "$as_me:$LINENO: result: yes" >&5
14655- echo "${ECHO_T}yes" >&6
14689+ eval "$as_ac_var=yes"
1465614690else
1465714691 echo "$as_me: failed program was:" >&5
1465814692sed 's/^/| /' conftest.$ac_ext >&5
1465914693
14660- echo "$as_me:$LINENO: result: no" >&5
14661- echo "${ECHO_T}no" >&6
14662- case $LIBOBJS in
14663- "getaddrinfo.$ac_objext" | \
14664- *" getaddrinfo.$ac_objext" | \
14665- "getaddrinfo.$ac_objext "* | \
14666- *" getaddrinfo.$ac_objext "* ) ;;
14667- *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext" ;;
14668- esac
14669-
14694+ eval "$as_ac_var=no"
1467014695fi
1467114696rm -f conftest.err conftest.$ac_objext \
1467214697 conftest$ac_exeext conftest.$ac_ext
14698+ fi
14699+ echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14700+ echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14701+ if test `eval echo '${'$as_ac_var'}'` = yes; then
14702+ cat >>confdefs.h <<_ACEOF
14703+ #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14704+ _ACEOF
14705+
14706+ else
14707+ case $LIBOBJS in
14708+ "$ac_func.$ac_objext" | \
14709+ *" $ac_func.$ac_objext" | \
14710+ "$ac_func.$ac_objext "* | \
14711+ *" $ac_func.$ac_objext "* ) ;;
14712+ *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
14713+ esac
14714+
14715+ fi
14716+ done
14717+
14718+
1467314719else
1467414720 case $LIBOBJS in
1467514721 "getaddrinfo.$ac_objext" | \
0 commit comments