8170681: Remove fontconfig header files from JDK source tree

Wed, 25 Oct 2017 13:11:07 -0700

author
prr
date
Wed, 25 Oct 2017 13:11:07 -0700
changeset 2400
9da665f87c4b
parent 2399
3a2209a0e9c9
child 2401
7d134528324e

8170681: Remove fontconfig header files from JDK source tree
Reviewed-by: serb, erikj

THIRD_PARTY_README file | annotate | diff | comparison | revisions
common/autoconf/configure.ac file | annotate | diff | comparison | revisions
common/autoconf/generated-configure.sh file | annotate | diff | comparison | revisions
common/autoconf/help.m4 file | annotate | diff | comparison | revisions
common/autoconf/libraries.m4 file | annotate | diff | comparison | revisions
     1.1 --- a/THIRD_PARTY_README	Tue Jan 15 10:42:40 2019 +0000
     1.2 +++ b/THIRD_PARTY_README	Wed Oct 25 13:11:07 2017 -0700
     1.3 @@ -1096,33 +1096,6 @@
     1.4  OF SUCH DAMAGE.
     1.5  --- end of LICENSE ---
     1.6  
     1.7 -%% This notice is provided with respect to FontConfig 2.5, which may be 
     1.8 -included with JRE 8, JDK 8, and OpenJDK 8 source distributions on
     1.9 -Linux and Solaris.
    1.10 -
    1.11 ---- begin of LICENSE ---
    1.12 -
    1.13 -Copyright ?? 2001,2003 Keith Packard
    1.14 -
    1.15 -Permission to use, copy, modify, distribute, and sell this software and its
    1.16 -documentation for any purpose is hereby granted without fee, provided that the
    1.17 -above copyright notice appear in all copies and that both that copyright
    1.18 -notice and this permission notice appear in supporting documentation, and that
    1.19 -the name of Keith Packard not be used in advertising or publicity pertaining
    1.20 -to distribution of the software without specific, written prior permission.
    1.21 -Keith Packard makes no representations about the suitability of this software
    1.22 -for any purpose.  It is provided "as is" without express or implied warranty.
    1.23 -
    1.24 -KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
    1.25 -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL KEITH
    1.26 -PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
    1.27 -DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
    1.28 -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
    1.29 -CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
    1.30 -
    1.31 -
    1.32 ---- end of LICENSE ---
    1.33 -
    1.34  -------------------------------------------------------------------------------
    1.35  
    1.36  %% This notice is provided with respect to freebXML Registry 3.0 & 3.1,
     2.1 --- a/common/autoconf/configure.ac	Tue Jan 15 10:42:40 2019 +0000
     2.2 +++ b/common/autoconf/configure.ac	Wed Oct 25 13:11:07 2017 -0700
     2.3 @@ -210,6 +210,7 @@
     2.4  LIB_SETUP_CUPS
     2.5  LIB_SETUP_FREETYPE
     2.6  LIB_SETUP_ALSA
     2.7 +LIB_SETUP_FONTCONFIG
     2.8  LIB_SETUP_MISC_LIBS
     2.9  LIB_SETUP_STATIC_LINK_LIBSTDCPP
    2.10  LIB_SETUP_ON_WINDOWS
     3.1 --- a/common/autoconf/generated-configure.sh	Tue Jan 15 10:42:40 2019 +0000
     3.2 +++ b/common/autoconf/generated-configure.sh	Wed Oct 25 13:11:07 2017 -0700
     3.3 @@ -657,6 +657,7 @@
     3.4  USE_EXTERNAL_LIBZ
     3.5  USE_EXTERNAL_LIBGIF
     3.6  USE_EXTERNAL_LIBJPEG
     3.7 +FONTCONFIG_CFLAGS
     3.8  ALSA_LIBS
     3.9  ALSA_CFLAGS
    3.10  FREETYPE_BUNDLE_LIB_PATH
    3.11 @@ -1091,6 +1092,8 @@
    3.12  with_alsa
    3.13  with_alsa_include
    3.14  with_alsa_lib
    3.15 +with_fontconfig
    3.16 +with_fontconfig_include
    3.17  with_giflib
    3.18  with_zlib
    3.19  with_stdc__lib
    3.20 @@ -1946,6 +1949,10 @@
    3.21                            headers under PATH/include)
    3.22    --with-alsa-include     specify directory for the alsa include files
    3.23    --with-alsa-lib         specify directory for the alsa library
    3.24 +  --with-fontconfig       specify prefix directory for the fontconfig package
    3.25 +                          (expecting the headers under PATH/include)
    3.26 +  --with-fontconfig-include
    3.27 +                          specify directory for the fontconfig include files
    3.28    --with-giflib           use giflib from build system or OpenJDK source
    3.29                            (system, bundled) [bundled]
    3.30    --with-zlib             use zlib from build system or OpenJDK source
    3.31 @@ -3827,6 +3834,8 @@
    3.32        PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
    3.33      cups)
    3.34        PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
    3.35 +    fontconfig)
    3.36 +      PKGHANDLER_COMMAND="sudo apt-get install libfontconfig1-dev" ;;
    3.37      freetype)
    3.38        PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
    3.39      pulse)
    3.40 @@ -3848,6 +3857,8 @@
    3.41        PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
    3.42      cups)
    3.43        PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
    3.44 +    fontconfig)
    3.45 +      PKGHANDLER_COMMAND="sudo yum install fontconfig-devel" ;;
    3.46      freetype)
    3.47        PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
    3.48      pulse)
    3.49 @@ -3982,6 +3993,11 @@
    3.50  
    3.51  
    3.52  
    3.53 +################################################################################
    3.54 +# Setup fontconfig
    3.55 +################################################################################
    3.56 +
    3.57 +
    3.58  
    3.59  
    3.60  
    3.61 @@ -4342,7 +4358,7 @@
    3.62  #CUSTOM_AUTOCONF_INCLUDE
    3.63  
    3.64  # Do not change or remove the following line, it is needed for consistency checks:
    3.65 -DATE_WHEN_GENERATED=1544009140
    3.66 +DATE_WHEN_GENERATED=1551441508
    3.67  
    3.68  ###############################################################################
    3.69  #
    3.70 @@ -42396,6 +42412,7 @@
    3.71      ALSA_NOT_NEEDED=yes
    3.72      PULSE_NOT_NEEDED=yes
    3.73      X11_NOT_NEEDED=yes
    3.74 +    FONTCONFIG_NOT_NEEDED=yes
    3.75      { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
    3.76  $as_echo "alsa cups pulse x11" >&6; }
    3.77    fi
    3.78 @@ -42406,6 +42423,7 @@
    3.79      ALSA_NOT_NEEDED=yes
    3.80      PULSE_NOT_NEEDED=yes
    3.81      X11_NOT_NEEDED=yes
    3.82 +    FONTCONFIG_NOT_NEEDED=yes
    3.83      { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
    3.84  $as_echo "alsa pulse x11" >&6; }
    3.85    fi
    3.86 @@ -47724,6 +47742,114 @@
    3.87  
    3.88  
    3.89  
    3.90 +# Check whether --with-fontconfig was given.
    3.91 +if test "${with_fontconfig+set}" = set; then :
    3.92 +  withval=$with_fontconfig;
    3.93 +fi
    3.94 +
    3.95 +
    3.96 +# Check whether --with-fontconfig-include was given.
    3.97 +if test "${with_fontconfig_include+set}" = set; then :
    3.98 +  withval=$with_fontconfig_include;
    3.99 +fi
   3.100 +
   3.101 +
   3.102 +  if test "x$FONTCONFIG_NOT_NEEDED" = xyes; then
   3.103 +    if (test "x${with_fontconfig}" != x && test "x${with_fontconfig}" != xno) || \
   3.104 +        (test "x${with_fontconfig_include}" != x && test "x${with_fontconfig_include}" != xno); then
   3.105 +      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: fontconfig not used, so --with-fontconfig[-*] is ignored" >&5
   3.106 +$as_echo "$as_me: WARNING: fontconfig not used, so --with-fontconfig[-*] is ignored" >&2;}
   3.107 +    fi
   3.108 +    FONTCONFIG_CFLAGS=
   3.109 +  else
   3.110 +    FONTCONFIG_FOUND=no
   3.111 +
   3.112 +    if test "x${with_fontconfig}" = xno || test "x${with_fontconfig_include}" = xno; then
   3.113 +      as_fn_error $? "It is not possible to disable the use of fontconfig. Remove the --without-fontconfig option." "$LINENO" 5
   3.114 +    fi
   3.115 +
   3.116 +    if test "x${with_fontconfig}" != x; then
   3.117 +      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fontconfig headers" >&5
   3.118 +$as_echo_n "checking for fontconfig headers... " >&6; }
   3.119 +      if test -s "${with_fontconfig}/include/fontconfig/fontconfig.h"; then
   3.120 +        FONTCONFIG_CFLAGS="-I${with_fontconfig}/include"
   3.121 +        FONTCONFIG_FOUND=yes
   3.122 +        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FONTCONFIG_FOUND" >&5
   3.123 +$as_echo "$FONTCONFIG_FOUND" >&6; }
   3.124 +      else
   3.125 +        as_fn_error $? "Can't find 'include/fontconfig/fontconfig.h' under ${with_fontconfig} given with the --with-fontconfig option." "$LINENO" 5
   3.126 +      fi
   3.127 +    fi
   3.128 +    if test "x${with_fontconfig_include}" != x; then
   3.129 +      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fontconfig headers" >&5
   3.130 +$as_echo_n "checking for fontconfig headers... " >&6; }
   3.131 +      if test -s "${with_fontconfig_include}/fontconfig/fontconfig.h"; then
   3.132 +        FONTCONFIG_CFLAGS="-I${with_fontconfig_include}"
   3.133 +        FONTCONFIG_FOUND=yes
   3.134 +        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FONTCONFIG_FOUND" >&5
   3.135 +$as_echo "$FONTCONFIG_FOUND" >&6; }
   3.136 +      else
   3.137 +        as_fn_error $? "Can't find 'fontconfig/fontconfig.h' under ${with_fontconfig_include} given with the --with-fontconfig-include option." "$LINENO" 5
   3.138 +      fi
   3.139 +    fi
   3.140 +    if test "x$FONTCONFIG_FOUND" = xno; then
   3.141 +      # Are the fontconfig headers installed in the default /usr/include location?
   3.142 +      for ac_header in fontconfig/fontconfig.h
   3.143 +do :
   3.144 +  ac_fn_cxx_check_header_mongrel "$LINENO" "fontconfig/fontconfig.h" "ac_cv_header_fontconfig_fontconfig_h" "$ac_includes_default"
   3.145 +if test "x$ac_cv_header_fontconfig_fontconfig_h" = xyes; then :
   3.146 +  cat >>confdefs.h <<_ACEOF
   3.147 +#define HAVE_FONTCONFIG_FONTCONFIG_H 1
   3.148 +_ACEOF
   3.149 +
   3.150 +          FONTCONFIG_FOUND=yes
   3.151 +          FONTCONFIG_CFLAGS=
   3.152 +          DEFAULT_FONTCONFIG=yes
   3.153 +
   3.154 +fi
   3.155 +
   3.156 +done
   3.157 +
   3.158 +    fi
   3.159 +    if test "x$FONTCONFIG_FOUND" = xno; then
   3.160 +
   3.161 +  # Print a helpful message on how to acquire the necessary build dependency.
   3.162 +  # fontconfig is the help tag: freetype, cups, pulse, alsa etc
   3.163 +  MISSING_DEPENDENCY=fontconfig
   3.164 +
   3.165 +  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
   3.166 +    cygwin_help $MISSING_DEPENDENCY
   3.167 +  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
   3.168 +    msys_help $MISSING_DEPENDENCY
   3.169 +  else
   3.170 +    PKGHANDLER_COMMAND=
   3.171 +
   3.172 +    case $PKGHANDLER in
   3.173 +      apt-get)
   3.174 +        apt_help     $MISSING_DEPENDENCY ;;
   3.175 +      yum)
   3.176 +        yum_help     $MISSING_DEPENDENCY ;;
   3.177 +      port)
   3.178 +        port_help    $MISSING_DEPENDENCY ;;
   3.179 +      pkgutil)
   3.180 +        pkgutil_help $MISSING_DEPENDENCY ;;
   3.181 +      pkgadd)
   3.182 +        pkgadd_help  $MISSING_DEPENDENCY ;;
   3.183 +    esac
   3.184 +
   3.185 +    if test "x$PKGHANDLER_COMMAND" != x; then
   3.186 +      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
   3.187 +    fi
   3.188 +  fi
   3.189 +
   3.190 +      as_fn_error $? "Could not find fontconfig! $HELP_MSG " "$LINENO" 5
   3.191 +    fi
   3.192 +  fi
   3.193 +
   3.194 +
   3.195 +
   3.196 +
   3.197 +
   3.198    ###############################################################################
   3.199    #
   3.200    # Check for the jpeg library
     4.1 --- a/common/autoconf/help.m4	Tue Jan 15 10:42:40 2019 +0000
     4.2 +++ b/common/autoconf/help.m4	Wed Oct 25 13:11:07 2017 -0700
     4.3 @@ -105,6 +105,8 @@
     4.4        PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
     4.5      cups)
     4.6        PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
     4.7 +    fontconfig)
     4.8 +      PKGHANDLER_COMMAND="sudo apt-get install libfontconfig1-dev" ;;
     4.9      freetype)
    4.10        PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
    4.11      pulse)
    4.12 @@ -126,6 +128,8 @@
    4.13        PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
    4.14      cups)
    4.15        PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
    4.16 +    fontconfig)
    4.17 +      PKGHANDLER_COMMAND="sudo yum install fontconfig-devel" ;;
    4.18      freetype)
    4.19        PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
    4.20      pulse)
     5.1 --- a/common/autoconf/libraries.m4	Tue Jan 15 10:42:40 2019 +0000
     5.2 +++ b/common/autoconf/libraries.m4	Wed Oct 25 13:11:07 2017 -0700
     5.3 @@ -57,6 +57,7 @@
     5.4      ALSA_NOT_NEEDED=yes
     5.5      PULSE_NOT_NEEDED=yes
     5.6      X11_NOT_NEEDED=yes
     5.7 +    FONTCONFIG_NOT_NEEDED=yes
     5.8      AC_MSG_RESULT([alsa cups pulse x11])
     5.9    fi
    5.10  
    5.11 @@ -65,6 +66,7 @@
    5.12      ALSA_NOT_NEEDED=yes
    5.13      PULSE_NOT_NEEDED=yes
    5.14      X11_NOT_NEEDED=yes
    5.15 +    FONTCONFIG_NOT_NEEDED=yes
    5.16      AC_MSG_RESULT([alsa pulse x11])
    5.17    fi
    5.18  
    5.19 @@ -703,6 +705,67 @@
    5.20    AC_SUBST(ALSA_LIBS)
    5.21  ])
    5.22  
    5.23 +################################################################################
    5.24 +# Setup fontconfig
    5.25 +################################################################################
    5.26 +AC_DEFUN_ONCE([LIB_SETUP_FONTCONFIG],
    5.27 +[
    5.28 +  AC_ARG_WITH(fontconfig, [AS_HELP_STRING([--with-fontconfig],
    5.29 +      [specify prefix directory for the fontconfig package
    5.30 +      (expecting the headers under PATH/include)])])
    5.31 +  AC_ARG_WITH(fontconfig-include, [AS_HELP_STRING([--with-fontconfig-include],
    5.32 +      [specify directory for the fontconfig include files])])
    5.33 +
    5.34 +  if test "x$FONTCONFIG_NOT_NEEDED" = xyes; then
    5.35 +    if (test "x${with_fontconfig}" != x && test "x${with_fontconfig}" != xno) || \
    5.36 +        (test "x${with_fontconfig_include}" != x && test "x${with_fontconfig_include}" != xno); then
    5.37 +      AC_MSG_WARN([[fontconfig not used, so --with-fontconfig[-*] is ignored]])
    5.38 +    fi
    5.39 +    FONTCONFIG_CFLAGS=
    5.40 +  else
    5.41 +    FONTCONFIG_FOUND=no
    5.42 +
    5.43 +    if test "x${with_fontconfig}" = xno || test "x${with_fontconfig_include}" = xno; then
    5.44 +      AC_MSG_ERROR([It is not possible to disable the use of fontconfig. Remove the --without-fontconfig option.])
    5.45 +    fi
    5.46 +
    5.47 +    if test "x${with_fontconfig}" != x; then
    5.48 +      AC_MSG_CHECKING([for fontconfig headers])
    5.49 +      if test -s "${with_fontconfig}/include/fontconfig/fontconfig.h"; then
    5.50 +        FONTCONFIG_CFLAGS="-I${with_fontconfig}/include"
    5.51 +        FONTCONFIG_FOUND=yes
    5.52 +        AC_MSG_RESULT([$FONTCONFIG_FOUND])
    5.53 +      else
    5.54 +        AC_MSG_ERROR([Can't find 'include/fontconfig/fontconfig.h' under ${with_fontconfig} given with the --with-fontconfig option.])
    5.55 +      fi
    5.56 +    fi
    5.57 +    if test "x${with_fontconfig_include}" != x; then
    5.58 +      AC_MSG_CHECKING([for fontconfig headers])
    5.59 +      if test -s "${with_fontconfig_include}/fontconfig/fontconfig.h"; then
    5.60 +        FONTCONFIG_CFLAGS="-I${with_fontconfig_include}"
    5.61 +        FONTCONFIG_FOUND=yes
    5.62 +        AC_MSG_RESULT([$FONTCONFIG_FOUND])
    5.63 +      else
    5.64 +        AC_MSG_ERROR([Can't find 'fontconfig/fontconfig.h' under ${with_fontconfig_include} given with the --with-fontconfig-include option.])
    5.65 +      fi
    5.66 +    fi
    5.67 +    if test "x$FONTCONFIG_FOUND" = xno; then
    5.68 +      # Are the fontconfig headers installed in the default /usr/include location?
    5.69 +      AC_CHECK_HEADERS([fontconfig/fontconfig.h], [
    5.70 +          FONTCONFIG_FOUND=yes
    5.71 +          FONTCONFIG_CFLAGS=
    5.72 +          DEFAULT_FONTCONFIG=yes
    5.73 +      ])
    5.74 +    fi
    5.75 +    if test "x$FONTCONFIG_FOUND" = xno; then
    5.76 +      HELP_MSG_MISSING_DEPENDENCY([fontconfig])
    5.77 +      AC_MSG_ERROR([Could not find fontconfig! $HELP_MSG ])
    5.78 +    fi
    5.79 +  fi
    5.80 +
    5.81 +  AC_SUBST(FONTCONFIG_CFLAGS)
    5.82 +])
    5.83 +
    5.84  AC_DEFUN_ONCE([LIB_SETUP_MISC_LIBS],
    5.85  [
    5.86  

mercurial