@@ -14160,66 +14160,26 @@ done
14160
14160
14161
14161
# System's version of getaddrinfo(), if any, may be used only if we found
14162
14162
# a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
14163
- # (Note: the AC_REPLACE_FUNCS probe fails on Windows, where the available
14163
+ # (Note: the AC_TRY_LINK probe fails on Windows, where the available
14164
14164
# versions of getaddrinfo don't follow normal C call protocol. This is OK
14165
14165
# because we want to use our own getaddrinfo.c on Windows anyway.)
14166
14166
if test x"$ac_cv_type_struct_addrinfo" = xyes ; then
14167
-
14168
- for ac_func in getaddrinfo
14169
- do
14170
- as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14171
- echo "$as_me:$LINENO: checking for $ac_func" >&5
14172
- echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14173
- if eval "test \"\${$as_ac_var+set}\" = set"; then
14174
- echo $ECHO_N "(cached) $ECHO_C" >&6
14175
- else
14167
+ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
14168
+ echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
14176
14169
cat >conftest.$ac_ext <<_ACEOF
14177
14170
/* confdefs.h. */
14178
14171
_ACEOF
14179
14172
cat confdefs.h >>conftest.$ac_ext
14180
14173
cat >>conftest.$ac_ext <<_ACEOF
14181
14174
/* end confdefs.h. */
14182
- /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14183
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
14184
- #define $ac_func innocuous_$ac_func
14185
-
14186
- /* System header to define __stub macros and hopefully few prototypes,
14187
- which can conflict with char $ac_func (); below.
14188
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14189
- <limits.h> exists even on freestanding compilers. */
14190
-
14191
- #ifdef __STDC__
14192
- # include <limits.h>
14193
- #else
14194
- # include <assert.h>
14195
- #endif
14196
-
14197
- #undef $ac_func
14198
14175
14199
- /* Override any gcc2 internal prototype to avoid an error. */
14200
- #ifdef __cplusplus
14201
- extern "C"
14202
- {
14203
- #endif
14204
- /* We use char because int might match the return type of a gcc2
14205
- builtin and then its argument prototype would still apply. */
14206
- char $ac_func ();
14207
- /* The GNU C library defines this for functions which it implements
14208
- to always fail with ENOSYS. Some functions are actually named
14209
- something starting with __ and the normal name is an alias. */
14210
- #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14211
- choke me
14212
- #else
14213
- char (*f) () = $ac_func;
14214
- #endif
14215
- #ifdef __cplusplus
14216
- }
14217
- #endif
14176
+ #include <sys/socket.h>
14177
+ #include <netdb.h>
14218
14178
14219
14179
int
14220
14180
main ()
14221
14181
{
14222
- return f != $ac_func ;
14182
+ return getaddrinfo("", "", NULL, NULL) ? 0 : 1 ;
14223
14183
;
14224
14184
return 0;
14225
14185
}
@@ -14246,36 +14206,30 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14246
14206
ac_status=$?
14247
14207
echo "$as_me:$LINENO: \$? = $ac_status" >&5
14248
14208
(exit $ac_status); }; }; then
14249
- eval "$as_ac_var=yes"
14250
- else
14251
- echo "$as_me: failed program was:" >&5
14252
- sed 's/^/| /' conftest.$ac_ext >&5
14253
14209
14254
- eval "$as_ac_var=no"
14255
- fi
14256
- rm -f conftest.err conftest.$ac_objext \
14257
- conftest$ac_exeext conftest.$ac_ext
14258
- fi
14259
- echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14260
- echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14261
- if test `eval echo '${'$as_ac_var'}'` = yes; then
14262
- cat >>confdefs.h <<_ACEOF
14263
- #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14210
+ cat >>confdefs.h <<\_ACEOF
14211
+ #define HAVE_GETADDRINFO 1
14264
14212
_ACEOF
14265
14213
14214
+ echo "$as_me:$LINENO: result: yes" >&5
14215
+ echo "${ECHO_T}yes" >&6
14266
14216
else
14267
- case $LIBOBJS in
14268
- "$ac_func.$ac_objext" | \
14269
- *" $ac_func.$ac_objext" | \
14270
- "$ac_func.$ac_objext "* | \
14271
- *" $ac_func.$ac_objext "* ) ;;
14272
- *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
14217
+ echo "$as_me: failed program was:" >&5
14218
+ sed 's/^/| /' conftest.$ac_ext >&5
14219
+
14220
+ echo "$as_me:$LINENO: result: no" >&5
14221
+ echo "${ECHO_T}no" >&6
14222
+ case $LIBOBJS in
14223
+ "getaddrinfo.$ac_objext" | \
14224
+ *" getaddrinfo.$ac_objext" | \
14225
+ "getaddrinfo.$ac_objext "* | \
14226
+ *" getaddrinfo.$ac_objext "* ) ;;
14227
+ *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext" ;;
14273
14228
esac
14274
14229
14275
14230
fi
14276
- done
14277
-
14278
-
14231
+ rm -f conftest.err conftest.$ac_objext \
14232
+ conftest$ac_exeext conftest.$ac_ext
14279
14233
else
14280
14234
case $LIBOBJS in
14281
14235
"getaddrinfo.$ac_objext" | \
0 commit comments