diff options
author | Charles-François Natali <neologix@free.fr> | 2013-01-08 18:51:56 (GMT) |
---|---|---|
committer | Charles-François Natali <neologix@free.fr> | 2013-01-08 18:51:56 (GMT) |
commit | 1aa004b45dbfb1c8512c179bd7d3a35410df8b82 (patch) | |
tree | 8a98b8e2fd5a5755f6f2dbb1601850a519fb2f30 | |
parent | 9a546530bb2c958c12c3724c9ac0318c3210206c (diff) | |
parent | f6fd794fac1b6af754d233875c173afb5ca9c45e (diff) | |
download | cpython-1aa004b45dbfb1c8512c179bd7d3a35410df8b82.zip cpython-1aa004b45dbfb1c8512c179bd7d3a35410df8b82.tar.gz cpython-1aa004b45dbfb1c8512c179bd7d3a35410df8b82.tar.bz2 |
Issue #16836: Enable IPv6 support even if IPv6 is disabled on the build host.
-rw-r--r-- | Misc/NEWS | 2 | ||||
-rwxr-xr-x | configure | 25 | ||||
-rw-r--r-- | configure.ac | 16 |
3 files changed, 12 insertions, 31 deletions
@@ -429,6 +429,8 @@ Tests Build ----- +- Issue #16836: Enable IPv6 support even if IPv6 is disabled on the build host. + - Cross compiling needs host and build settings. configure no longer creates a broken PYTHON_FOR_BUILD variable when --build is missing. @@ -9795,28 +9795,20 @@ $as_echo "yes" >&6; } esac else - if test "$cross_compiling" = yes; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ipv6=no - -else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* AF_INET6 available check */ #include <sys/types.h> #include <sys/socket.h> -main() +int +main () { - if (socket(AF_INET6, SOCK_STREAM, 0) < 0) - exit(1); - else - exit(0); +int domain = AF_INET6; + ; + return 0; } - _ACEOF -if ac_fn_c_try_run "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } @@ -9829,10 +9821,7 @@ $as_echo "no" >&6; } ipv6=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "$ipv6" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5 diff --git a/configure.ac b/configure.ac index ef58a9f..ec8f4ce 100644 --- a/configure.ac +++ b/configure.ac @@ -2501,25 +2501,15 @@ AC_ARG_ENABLE(ipv6, [ dnl the check does not work on cross compilation case... - AC_RUN_IFELSE([AC_LANG_SOURCE([[ /* AF_INET6 available check */ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ /* AF_INET6 available check */ #include <sys/types.h> -#include <sys/socket.h> -main() -{ - if (socket(AF_INET6, SOCK_STREAM, 0) < 0) - exit(1); - else - exit(0); -} -]])],[ +#include <sys/socket.h>]], +[[int domain = AF_INET6;]])],[ AC_MSG_RESULT(yes) ipv6=yes ],[ AC_MSG_RESULT(no) ipv6=no -],[ - AC_MSG_RESULT(no) - ipv6=no ]) if test "$ipv6" = "yes"; then |