--- a/make/autoconf/libraries.m4 Tue Nov 07 09:37:45 2017 -0500
+++ b/make/autoconf/libraries.m4 Tue Nov 07 08:47:47 2017 +0100
@@ -31,6 +31,7 @@
m4_include([lib-freetype.m4])
m4_include([lib-std.m4])
m4_include([lib-x11.m4])
+m4_include([lib-fontconfig.m4])
################################################################################
# Determine which libraries are needed for this configuration
@@ -47,6 +48,16 @@
NEEDS_LIB_X11=true
fi
+ # Check if fontconfig is needed
+ if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
+ # No fontconfig support on windows or macosx
+ NEEDS_LIB_FONTCONFIG=false
+ else
+ # All other instances need fontconfig, even if building headless only,
+ # libawt still needs fontconfig headers.
+ NEEDS_LIB_FONTCONFIG=true
+ fi
+
# Check if cups is needed
if test "x$OPENJDK_TARGET_OS" = xwindows; then
# Windows have a separate print system
@@ -83,6 +94,7 @@
LIB_SETUP_STD_LIBS
LIB_SETUP_X11
LIB_SETUP_CUPS
+ LIB_SETUP_FONTCONFIG
LIB_SETUP_FREETYPE
LIB_SETUP_ALSA
LIB_SETUP_LIBFFI