]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #16836: Enable IPv6 support even if IPv6 is disabled on the build host.
authorCharles-François Natali <neologix@free.fr>
Tue, 8 Jan 2013 18:49:42 +0000 (19:49 +0100)
committerCharles-François Natali <neologix@free.fr>
Tue, 8 Jan 2013 18:49:42 +0000 (19:49 +0100)
Misc/NEWS
configure
configure.ac

index 21215cb414b68118815b5a1f516077299cb3d821..8ada15ad709c6b351e0280d5cd2e6da5e8432ad0 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -821,6 +821,8 @@ Tests
 Build
 -----
 
+- Issue #16836: Enable IPv6 support even if IPv6 is disabled on the build host.
+
 - Issue #16593: Have BSD 'make -s' do the right thing, thanks to Daniel Shahaf
 
 - Issue #16262: fix out-of-src-tree builds, if mercurial is not installed.
index c4ff7242f000e5a9213e6f2416ca4f7492482b81..1f00599154cadd3ad2fdc8237a8991cba746affe 100755 (executable)
--- a/configure
+++ b/configure
@@ -9103,28 +9103,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; }
@@ -9137,10 +9129,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
index ccb42d44cc2eadf41120c5912b0209ed45d44b36..5ae0d5add075e6e8232e193590a27e34e06c07cc 100644 (file)
@@ -2346,25 +2346,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