From d8fbeee466e6ce08d950fd694d5e58065d2fee97 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Fri, 11 Jul 2025 21:38:49 +0200 Subject: Detect IPv6 support by default To avoid the autodetection and force it to be enabled or disabled use --enable-ipv6 or --disable-ipv6 respectively. Fixes: https://github.com/dillo-browser/dillo/issues/167 --- ChangeLog | 1 + configure.ac | 29 +++++++++++++++++++++++++++-- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 51422c09..aa5a07cd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -12,6 +12,7 @@ dillo-3.3.0 [Unreleased] - Add about:keys to display current keyboard shortcuts. - Control + left click opens links in new tab (emulates mouse middle button). - Ctrl+C copies selected text into the clipboard so Ctrl+V works as expected. + - Enable IPv6 support by default if supported by the platform. Patches: Rodrigo Arias Mallo +- Middle click on back or forward button opens page in new tab. Patches: Alex diff --git a/configure.ac b/configure.ac index 74cb1141..4d1d763c 100644 --- a/configure.ac +++ b/configure.ac @@ -45,9 +45,9 @@ AC_ARG_ENABLE([insure], [enable_insure=no]) AC_ARG_ENABLE([ipv6], - [AS_HELP_STRING([--enable-ipv6], [Build with support for IPv6])], + [AS_HELP_STRING([--enable-ipv6], [Build with support for IPv6 (default: auto)])], [enable_ipv6=$enableval], - [enable_ipv6=no]) + [enable_ipv6=auto]) AC_ARG_ENABLE([cookies], [AS_HELP_STRING([--disable-cookies], [Dont compile support for cookies])], @@ -669,6 +669,30 @@ pthread_ok=yes, pthread_ok=no) esac fi +dnl ------------ +dnl IPv6 support +dnl ------------ +dnl +html_tests_ok=no +if test "x$enable_ipv6" = "xauto" ; then + dnl Detect support for IPv6 in libc + AC_MSG_CHECKING([for IPv6 support]) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +#include +#include +]],[[ +struct sockaddr_in6 sa; +size_t len = sizeof(struct sockaddr_in6); +sa.sin6_family = AF_INET6; +int fd; +connect(fd, (struct sockaddr *)&sa, len); +]])], + enable_ipv6=yes, + enable_ipv6=no) + + AC_MSG_RESULT([$enable_ipv6]) +fi + dnl ---------- dnl HTML tests dnl ---------- @@ -856,6 +880,7 @@ _AS_ECHO([ GIF enabled : ${enable_gif}]) _AS_ECHO([ SVG enabled : ${enable_svg}]) _AS_ECHO([ WEBP enabled : ${webp_ok}]) _AS_ECHO([ Brotli enabled : ${brotli_ok}]) +_AS_ECHO([ IPv6 enabled : ${enable_ipv6}]) _AS_ECHO([]) _AS_ECHO([ HTML tests : ${html_tests_ok}]) _AS_ECHO([]) -- cgit v1.2.3