summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorJakub KulĂ­k <Kulikjak@gmail.com>2024-10-30 12:19:44 (GMT)
committerGitHub <noreply@github.com>2024-10-30 12:19:44 (GMT)
commit1064141967a2d22c2ae9e22ae77e8c9616559947 (patch)
tree5249a8f08af471e3cdf072190c5a0903c455ea7b /configure
parentdcad8fecbd5c8f1542f7a46e0c7bb7e1f27ab115 (diff)
downloadcpython-1064141967a2d22c2ae9e22ae77e8c9616559947.zip
cpython-1064141967a2d22c2ae9e22ae77e8c9616559947.tar.gz
cpython-1064141967a2d22c2ae9e22ae77e8c9616559947.tar.bz2
gh-91962: Fix `hstrerror` detection issues on Solaris (GH-91963)
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure85
1 files changed, 82 insertions, 3 deletions
diff --git a/configure b/configure
index 70eea29..5be57e3 100755
--- a/configure
+++ b/configure
@@ -20478,10 +20478,89 @@ fi
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
@@ -29988,7 +30067,7 @@ fi
then :
-
+ as_fn_append MODULE_BLOCK "MODULE__SOCKET_LDFLAGS=$SOCKET_LIBS$as_nl"
fi
if test "$py_cv_module__socket" = yes; then