diff options
author | Rodrigo Arias Mallo <rodarima@gmail.com> | 2025-07-11 21:38:49 +0200 |
---|---|---|
committer | Rodrigo Arias Mallo <rodarima@gmail.com> | 2025-07-11 22:37:21 +0200 |
commit | d8fbeee466e6ce08d950fd694d5e58065d2fee97 (patch) | |
tree | 418bc0401f3aa44ed1dc5fee89f821f97ba8469a | |
parent | 50121125a0a79658c456ba88816a63e5b836a6ab (diff) |
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
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | configure.ac | 29 |
2 files changed, 28 insertions, 2 deletions
@@ -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 <sys/socket.h> +#include <netinet/in.h> +]],[[ +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([]) |