From 46b9a0ad24f7f299ff23e13bc8ef01c188d246b6 Mon Sep 17 00:00:00 2001 From: Thomas Devoogdt Date: Thu, 13 Nov 2025 23:10:20 +0100 Subject: [PATCH] autoconf: libraries: drop the need for X11 in headless mode Upstream: https://github.com/openjdk/jdk/pull/28310 Signed-off-by: Thomas Devoogdt --- make/autoconf/libraries.m4 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/make/autoconf/libraries.m4 b/make/autoconf/libraries.m4 index 51d4f724c33..6a8b925c3f2 100644 --- a/make/autoconf/libraries.m4 +++ b/make/autoconf/libraries.m4 @@ -42,12 +42,12 @@ m4_include([lib-tests.m4]) AC_DEFUN_ONCE([LIB_DETERMINE_DEPENDENCIES], [ # Check if X11 is needed - if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then - # No X11 support on windows or macosx + if test "x$OPENJDK_TARGET_OS" = xwindows || + test "x$OPENJDK_TARGET_OS" = xmacosx || + test "x$ENABLE_HEADLESS_ONLY" = xtrue; then NEEDS_LIB_X11=false else - # All other instances need X11, even if building headless only, libawt still - # needs X11 headers. + # All other instances need X11 for libawt. NEEDS_LIB_X11=true fi -- 2.43.0