make/autoconf/libraries.m4
changeset 47507 5a270d2dfa5d
parent 47216 71c04702a3d5
child 47701 be620a591379
--- a/make/autoconf/libraries.m4	Wed Oct 25 12:41:24 2017 -0700
+++ b/make/autoconf/libraries.m4	Wed Oct 25 13:11:07 2017 -0700
@@ -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