printf "%s\n" "$ac_cv_lib_resolv_inet_aton" >&6; }
if test "x$ac_cv_lib_resolv_inet_aton" = xyes
then :
- printf "%s\n" "#define HAVE_LIBRESOLV 1" >>confdefs.h
+ SOCKET_LIBS="-lresolv"
+fi
+
+
+fi
- LIBS="-lresolv $LIBS"
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for hstrerror in -lc" >&5
+printf %s "checking for hstrerror in -lc... " >&6; }
+if test ${ac_cv_lib_c_hstrerror+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lc $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char hstrerror ();
+int
+main (void)
+{
+return hstrerror ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_lib_c_hstrerror=yes
+else $as_nop
+ ac_cv_lib_c_hstrerror=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_hstrerror" >&5
+printf "%s\n" "$ac_cv_lib_c_hstrerror" >&6; }
+if test "x$ac_cv_lib_c_hstrerror" = xyes
+then :
+ $ac_cv_prog_TRUE
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for hstrerror in -lresolv" >&5
+printf %s "checking for hstrerror in -lresolv... " >&6; }
+if test ${ac_cv_lib_resolv_hstrerror+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lresolv $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char hstrerror ();
+int
+main (void)
+{
+return hstrerror ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_lib_resolv_hstrerror=yes
+else $as_nop
+ ac_cv_lib_resolv_hstrerror=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_hstrerror" >&5
+printf "%s\n" "$ac_cv_lib_resolv_hstrerror" >&6; }
+if test "x$ac_cv_lib_resolv_hstrerror" = xyes
+then :
+ SOCKET_LIBS="-lresolv"
fi
then :
-
+ as_fn_append MODULE_BLOCK "MODULE__SOCKET_LDFLAGS=$SOCKET_LIBS$as_nl"
fi
if test "$py_cv_module__socket" = yes; then
dnl check for true
AC_CHECK_PROGS([TRUE], [true], [/bin/true])
-dnl On some systems (e.g. Solaris 9), hstrerror and inet_aton are in -lresolv
+dnl On some systems (e.g. Solaris), hstrerror and inet_aton are in -lresolv
dnl On others, they are in the C library, so we to take no action
AC_CHECK_LIB([c], [inet_aton], [$ac_cv_prog_TRUE],
- AC_CHECK_LIB([resolv], [inet_aton])
+ AC_CHECK_LIB([resolv], [inet_aton], [SOCKET_LIBS="-lresolv"])
+)
+AC_CHECK_LIB([c], [hstrerror], [$ac_cv_prog_TRUE],
+ AC_CHECK_LIB([resolv], [hstrerror], [SOCKET_LIBS="-lresolv"])
)
# On Tru64, chflags seems to be present, but calling it will
PY_STDLIB_MOD([_socket],
[], m4_flatten([test "$ac_cv_header_sys_socket_h" = "yes"
-a "$ac_cv_header_sys_types_h" = "yes"
- -a "$ac_cv_header_netinet_in_h" = "yes"]))
+ -a "$ac_cv_header_netinet_in_h" = "yes"]), [], [$SOCKET_LIBS])
dnl platform specific extensions
PY_STDLIB_MOD([grp], [],