Skip to content

Commit 3cfc710

Browse files
committed
One more detection rework
1 parent d5ccc2c commit 3cfc710

2 files changed

Lines changed: 108 additions & 67 deletions

File tree

configure

Lines changed: 101 additions & 62 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

configure.ac

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5279,10 +5279,12 @@ AC_CHECK_PROGS([TRUE], [true], [/bin/true])
52795279

52805280
dnl On some systems (e.g. Solaris), hstrerror and inet_aton are in -lresolv
52815281
dnl On others, they are in the C library, so we to take no action
5282-
AC_SEARCH_LIBS([inet_aton], [resolv])
5283-
AS_VAR_IF([ac_cv_search_inet_aton], ["-lresolv"], [], [
5284-
AC_SEARCH_LIBS([hstrerror], [resolv])
5285-
])
5282+
AC_CHECK_LIB([c], [inet_aton], [$ac_cv_prog_TRUE],
5283+
AC_CHECK_LIB([resolv], [inet_aton], [SOCKET_LIBS="-lresolv"])
5284+
)
5285+
AC_CHECK_LIB([c], [hstrerror], [$ac_cv_prog_TRUE],
5286+
AC_CHECK_LIB([resolv], [hstrerror], [SOCKET_LIBS="-lresolv"])
5287+
)
52865288

52875289
# On Tru64, chflags seems to be present, but calling it will
52885290
# exit Python
@@ -7757,7 +7759,7 @@ PY_STDLIB_MOD([mmap],
77577759
PY_STDLIB_MOD([_socket],
77587760
[], m4_flatten([test "$ac_cv_header_sys_socket_h" = "yes"
77597761
-a "$ac_cv_header_sys_types_h" = "yes"
7760-
-a "$ac_cv_header_netinet_in_h" = "yes"]))
7762+
-a "$ac_cv_header_netinet_in_h" = "yes"]), [], [$SOCKET_LIBS])
77617763

77627764
dnl platform specific extensions
77637765
PY_STDLIB_MOD([grp], [],

0 commit comments

Comments
 (0)