aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorprr <unknown>2017-10-25 13:11:07 -0700
committerbell-sw <liberica@bell-sw.com>2019-04-20 16:51:17 +0300
commit8d5f7e23f6db8ee4a116b40c6004bfb45e7989d3 (patch)
tree2f06a6fbb23384add4f3678f624addfc82504db1
parent5bdbbe90bb3b79c0ebbb709aa136520773fb10fa (diff)
downloadjdk8u-8d5f7e23f6db8ee4a116b40c6004bfb45e7989d3.tar.gz
8170681: Remove fontconfig header files from JDK source tree
Reviewed-by: serb, erikj
-rw-r--r--THIRD_PARTY_README27
-rw-r--r--common/autoconf/configure.ac1
-rw-r--r--common/autoconf/generated-configure.sh128
-rw-r--r--common/autoconf/help.m44
-rw-r--r--common/autoconf/libraries.m463
5 files changed, 195 insertions, 28 deletions
diff --git a/THIRD_PARTY_README b/THIRD_PARTY_README
index f9268ad..2247356 100644
--- a/THIRD_PARTY_README
+++ b/THIRD_PARTY_README
@@ -1096,33 +1096,6 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
OF SUCH DAMAGE.
--- end of LICENSE ---
-%% This notice is provided with respect to FontConfig 2.5, which may be
-included with JRE 8, JDK 8, and OpenJDK 8 source distributions on
-Linux and Solaris.
-
---- begin of LICENSE ---
-
-Copyright ?? 2001,2003 Keith Packard
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that the
-above copyright notice appear in all copies and that both that copyright
-notice and this permission notice appear in supporting documentation, and that
-the name of Keith Packard not be used in advertising or publicity pertaining
-to distribution of the software without specific, written prior permission.
-Keith Packard makes no representations about the suitability of this software
-for any purpose. It is provided "as is" without express or implied warranty.
-
-KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL KEITH
-PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
-DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
-CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-
---- end of LICENSE ---
-
-------------------------------------------------------------------------------
%% This notice is provided with respect to freebXML Registry 3.0 & 3.1,
diff --git a/common/autoconf/configure.ac b/common/autoconf/configure.ac
index e1b9429..67a2305 100644
--- a/common/autoconf/configure.ac
+++ b/common/autoconf/configure.ac
@@ -210,6 +210,7 @@ LIB_SETUP_X11
LIB_SETUP_CUPS
LIB_SETUP_FREETYPE
LIB_SETUP_ALSA
+LIB_SETUP_FONTCONFIG
LIB_SETUP_MISC_LIBS
LIB_SETUP_STATIC_LINK_LIBSTDCPP
LIB_SETUP_ON_WINDOWS
diff --git a/common/autoconf/generated-configure.sh b/common/autoconf/generated-configure.sh
index 700217c..465e227 100644
--- a/common/autoconf/generated-configure.sh
+++ b/common/autoconf/generated-configure.sh
@@ -657,6 +657,7 @@ LIBZIP_CAN_USE_MMAP
USE_EXTERNAL_LIBZ
USE_EXTERNAL_LIBGIF
USE_EXTERNAL_LIBJPEG
+FONTCONFIG_CFLAGS
ALSA_LIBS
ALSA_CFLAGS
FREETYPE_BUNDLE_LIB_PATH
@@ -1091,6 +1092,8 @@ enable_freetype_bundling
with_alsa
with_alsa_include
with_alsa_lib
+with_fontconfig
+with_fontconfig_include
with_giflib
with_zlib
with_stdc__lib
@@ -1946,6 +1949,10 @@ Optional Packages:
headers under PATH/include)
--with-alsa-include specify directory for the alsa include files
--with-alsa-lib specify directory for the alsa library
+ --with-fontconfig specify prefix directory for the fontconfig package
+ (expecting the headers under PATH/include)
+ --with-fontconfig-include
+ specify directory for the fontconfig include files
--with-giflib use giflib from build system or OpenJDK source
(system, bundled) [bundled]
--with-zlib use zlib from build system or OpenJDK source
@@ -3827,6 +3834,8 @@ apt_help() {
PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
cups)
PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
+ fontconfig)
+ PKGHANDLER_COMMAND="sudo apt-get install libfontconfig1-dev" ;;
freetype)
PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
pulse)
@@ -3848,6 +3857,8 @@ yum_help() {
PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
cups)
PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
+ fontconfig)
+ PKGHANDLER_COMMAND="sudo yum install fontconfig-devel" ;;
freetype)
PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
pulse)
@@ -3982,6 +3993,11 @@ fi
+################################################################################
+# Setup fontconfig
+################################################################################
+
+
@@ -4342,7 +4358,7 @@ VS_SDK_PLATFORM_NAME_2017=
#CUSTOM_AUTOCONF_INCLUDE
# Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1542996501
+DATE_WHEN_GENERATED=1551441508
###############################################################################
#
@@ -42401,6 +42417,7 @@ $as_echo_n "checking what is not needed on Windows?... " >&6; }
ALSA_NOT_NEEDED=yes
PULSE_NOT_NEEDED=yes
X11_NOT_NEEDED=yes
+ FONTCONFIG_NOT_NEEDED=yes
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
$as_echo "alsa cups pulse x11" >&6; }
fi
@@ -42411,6 +42428,7 @@ $as_echo_n "checking what is not needed on MacOSX?... " >&6; }
ALSA_NOT_NEEDED=yes
PULSE_NOT_NEEDED=yes
X11_NOT_NEEDED=yes
+ FONTCONFIG_NOT_NEEDED=yes
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
$as_echo "alsa pulse x11" >&6; }
fi
@@ -47729,6 +47747,114 @@ done
+# Check whether --with-fontconfig was given.
+if test "${with_fontconfig+set}" = set; then :
+ withval=$with_fontconfig;
+fi
+
+
+# Check whether --with-fontconfig-include was given.
+if test "${with_fontconfig_include+set}" = set; then :
+ withval=$with_fontconfig_include;
+fi
+
+
+ if test "x$FONTCONFIG_NOT_NEEDED" = xyes; then
+ if (test "x${with_fontconfig}" != x && test "x${with_fontconfig}" != xno) || \
+ (test "x${with_fontconfig_include}" != x && test "x${with_fontconfig_include}" != xno); then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: fontconfig not used, so --with-fontconfig[-*] is ignored" >&5
+$as_echo "$as_me: WARNING: fontconfig not used, so --with-fontconfig[-*] is ignored" >&2;}
+ fi
+ FONTCONFIG_CFLAGS=
+ else
+ FONTCONFIG_FOUND=no
+
+ if test "x${with_fontconfig}" = xno || test "x${with_fontconfig_include}" = xno; then
+ as_fn_error $? "It is not possible to disable the use of fontconfig. Remove the --without-fontconfig option." "$LINENO" 5
+ fi
+
+ if test "x${with_fontconfig}" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fontconfig headers" >&5
+$as_echo_n "checking for fontconfig headers... " >&6; }
+ if test -s "${with_fontconfig}/include/fontconfig/fontconfig.h"; then
+ FONTCONFIG_CFLAGS="-I${with_fontconfig}/include"
+ FONTCONFIG_FOUND=yes
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FONTCONFIG_FOUND" >&5
+$as_echo "$FONTCONFIG_FOUND" >&6; }
+ else
+ as_fn_error $? "Can't find 'include/fontconfig/fontconfig.h' under ${with_fontconfig} given with the --with-fontconfig option." "$LINENO" 5
+ fi
+ fi
+ if test "x${with_fontconfig_include}" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fontconfig headers" >&5
+$as_echo_n "checking for fontconfig headers... " >&6; }
+ if test -s "${with_fontconfig_include}/fontconfig/fontconfig.h"; then
+ FONTCONFIG_CFLAGS="-I${with_fontconfig_include}"
+ FONTCONFIG_FOUND=yes
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FONTCONFIG_FOUND" >&5
+$as_echo "$FONTCONFIG_FOUND" >&6; }
+ else
+ as_fn_error $? "Can't find 'fontconfig/fontconfig.h' under ${with_fontconfig_include} given with the --with-fontconfig-include option." "$LINENO" 5
+ fi
+ fi
+ if test "x$FONTCONFIG_FOUND" = xno; then
+ # Are the fontconfig headers installed in the default /usr/include location?
+ for ac_header in fontconfig/fontconfig.h
+do :
+ ac_fn_cxx_check_header_mongrel "$LINENO" "fontconfig/fontconfig.h" "ac_cv_header_fontconfig_fontconfig_h" "$ac_includes_default"
+if test "x$ac_cv_header_fontconfig_fontconfig_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_FONTCONFIG_FONTCONFIG_H 1
+_ACEOF
+
+ FONTCONFIG_FOUND=yes
+ FONTCONFIG_CFLAGS=
+ DEFAULT_FONTCONFIG=yes
+
+fi
+
+done
+
+ fi
+ if test "x$FONTCONFIG_FOUND" = xno; then
+
+ # Print a helpful message on how to acquire the necessary build dependency.
+ # fontconfig is the help tag: freetype, cups, pulse, alsa etc
+ MISSING_DEPENDENCY=fontconfig
+
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ cygwin_help $MISSING_DEPENDENCY
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ msys_help $MISSING_DEPENDENCY
+ else
+ PKGHANDLER_COMMAND=
+
+ case $PKGHANDLER in
+ apt-get)
+ apt_help $MISSING_DEPENDENCY ;;
+ yum)
+ yum_help $MISSING_DEPENDENCY ;;
+ port)
+ port_help $MISSING_DEPENDENCY ;;
+ pkgutil)
+ pkgutil_help $MISSING_DEPENDENCY ;;
+ pkgadd)
+ pkgadd_help $MISSING_DEPENDENCY ;;
+ esac
+
+ if test "x$PKGHANDLER_COMMAND" != x; then
+ HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
+ fi
+ fi
+
+ as_fn_error $? "Could not find fontconfig! $HELP_MSG " "$LINENO" 5
+ fi
+ fi
+
+
+
+
+
###############################################################################
#
# Check for the jpeg library
diff --git a/common/autoconf/help.m4 b/common/autoconf/help.m4
index be823fa..c3d794c 100644
--- a/common/autoconf/help.m4
+++ b/common/autoconf/help.m4
@@ -105,6 +105,8 @@ apt_help() {
PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
cups)
PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
+ fontconfig)
+ PKGHANDLER_COMMAND="sudo apt-get install libfontconfig1-dev" ;;
freetype)
PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
pulse)
@@ -126,6 +128,8 @@ yum_help() {
PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
cups)
PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
+ fontconfig)
+ PKGHANDLER_COMMAND="sudo yum install fontconfig-devel" ;;
freetype)
PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
pulse)
diff --git a/common/autoconf/libraries.m4 b/common/autoconf/libraries.m4
index d51105f..6d803f9 100644
--- a/common/autoconf/libraries.m4
+++ b/common/autoconf/libraries.m4
@@ -57,6 +57,7 @@ AC_DEFUN_ONCE([LIB_SETUP_INIT],
ALSA_NOT_NEEDED=yes
PULSE_NOT_NEEDED=yes
X11_NOT_NEEDED=yes
+ FONTCONFIG_NOT_NEEDED=yes
AC_MSG_RESULT([alsa cups pulse x11])
fi
@@ -65,6 +66,7 @@ AC_DEFUN_ONCE([LIB_SETUP_INIT],
ALSA_NOT_NEEDED=yes
PULSE_NOT_NEEDED=yes
X11_NOT_NEEDED=yes
+ FONTCONFIG_NOT_NEEDED=yes
AC_MSG_RESULT([alsa pulse x11])
fi
@@ -703,6 +705,67 @@ AC_DEFUN_ONCE([LIB_SETUP_ALSA],
AC_SUBST(ALSA_LIBS)
])
+################################################################################
+# Setup fontconfig
+################################################################################
+AC_DEFUN_ONCE([LIB_SETUP_FONTCONFIG],
+[
+ AC_ARG_WITH(fontconfig, [AS_HELP_STRING([--with-fontconfig],
+ [specify prefix directory for the fontconfig package
+ (expecting the headers under PATH/include)])])
+ AC_ARG_WITH(fontconfig-include, [AS_HELP_STRING([--with-fontconfig-include],
+ [specify directory for the fontconfig include files])])
+
+ if test "x$FONTCONFIG_NOT_NEEDED" = xyes; then
+ if (test "x${with_fontconfig}" != x && test "x${with_fontconfig}" != xno) || \
+ (test "x${with_fontconfig_include}" != x && test "x${with_fontconfig_include}" != xno); then
+ AC_MSG_WARN([[fontconfig not used, so --with-fontconfig[-*] is ignored]])
+ fi
+ FONTCONFIG_CFLAGS=
+ else
+ FONTCONFIG_FOUND=no
+
+ if test "x${with_fontconfig}" = xno || test "x${with_fontconfig_include}" = xno; then
+ AC_MSG_ERROR([It is not possible to disable the use of fontconfig. Remove the --without-fontconfig option.])
+ fi
+
+ if test "x${with_fontconfig}" != x; then
+ AC_MSG_CHECKING([for fontconfig headers])
+ if test -s "${with_fontconfig}/include/fontconfig/fontconfig.h"; then
+ FONTCONFIG_CFLAGS="-I${with_fontconfig}/include"
+ FONTCONFIG_FOUND=yes
+ AC_MSG_RESULT([$FONTCONFIG_FOUND])
+ else
+ AC_MSG_ERROR([Can't find 'include/fontconfig/fontconfig.h' under ${with_fontconfig} given with the --with-fontconfig option.])
+ fi
+ fi
+ if test "x${with_fontconfig_include}" != x; then
+ AC_MSG_CHECKING([for fontconfig headers])
+ if test -s "${with_fontconfig_include}/fontconfig/fontconfig.h"; then
+ FONTCONFIG_CFLAGS="-I${with_fontconfig_include}"
+ FONTCONFIG_FOUND=yes
+ AC_MSG_RESULT([$FONTCONFIG_FOUND])
+ else
+ AC_MSG_ERROR([Can't find 'fontconfig/fontconfig.h' under ${with_fontconfig_include} given with the --with-fontconfig-include option.])
+ fi
+ fi
+ if test "x$FONTCONFIG_FOUND" = xno; then
+ # Are the fontconfig headers installed in the default /usr/include location?
+ AC_CHECK_HEADERS([fontconfig/fontconfig.h], [
+ FONTCONFIG_FOUND=yes
+ FONTCONFIG_CFLAGS=
+ DEFAULT_FONTCONFIG=yes
+ ])
+ fi
+ if test "x$FONTCONFIG_FOUND" = xno; then
+ HELP_MSG_MISSING_DEPENDENCY([fontconfig])
+ AC_MSG_ERROR([Could not find fontconfig! $HELP_MSG ])
+ fi
+ fi
+
+ AC_SUBST(FONTCONFIG_CFLAGS)
+])
+
AC_DEFUN_ONCE([LIB_SETUP_MISC_LIBS],
[