author | ihse |
Mon, 26 Feb 2018 14:10:16 +0100 | |
branch | ihse-cflags-rewrite-branch |
changeset 56176 | b3e3a12dcb33 |
parent 48758 | ba19a21d727d |
child 52804 | 28094715ae71 |
permissions | -rw-r--r-- |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
1 |
# |
43383 | 2 |
# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved. |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
3 |
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
4 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
5 |
# This code is free software; you can redistribute it and/or modify it |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
6 |
# under the terms of the GNU General Public License version 2 only, as |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
7 |
# published by the Free Software Foundation. Oracle designates this |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
8 |
# particular file as subject to the "Classpath" exception as provided |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
9 |
# by Oracle in the LICENSE file that accompanied this code. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
10 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
11 |
# This code is distributed in the hope that it will be useful, but WITHOUT |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
12 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
13 |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
14 |
# version 2 for more details (a copy is included in the LICENSE file that |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
15 |
# accompanied this code). |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
16 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
17 |
# You should have received a copy of the GNU General Public License version |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
18 |
# 2 along with this work; if not, write to the Free Software Foundation, |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
19 |
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
20 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
21 |
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
22 |
# or visit www.oracle.com if you need additional information or have any |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
23 |
# questions. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
24 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
25 |
|
32921
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
26 |
################################################################################ |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
27 |
# Setup bundled libraries. |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
28 |
# |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
29 |
# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
30 |
# OpenJDK repository. Default is to use these libraries as bundled, but they |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
31 |
# might be replaced by en external version by the user. |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
32 |
################################################################################ |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
33 |
AC_DEFUN_ONCE([LIB_SETUP_BUNDLED_LIBS], |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
34 |
[ |
32921
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
35 |
LIB_SETUP_LIBJPEG |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
36 |
LIB_SETUP_GIFLIB |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
37 |
LIB_SETUP_LIBPNG |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
38 |
LIB_SETUP_ZLIB |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
39 |
LIB_SETUP_LCMS |
26400
4d6c6f2df610
8057538: Build the freetype library during configure on Windows
simonis
parents:
25039
diff
changeset
|
40 |
]) |
4d6c6f2df610
8057538: Build the freetype library during configure on Windows
simonis
parents:
25039
diff
changeset
|
41 |
|
32921
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
42 |
################################################################################ |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
43 |
# Setup libjpeg |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
44 |
################################################################################ |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
45 |
AC_DEFUN_ONCE([LIB_SETUP_LIBJPEG], |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
46 |
[ |
25035 | 47 |
AC_ARG_WITH(libjpeg, [AS_HELP_STRING([--with-libjpeg], |
48 |
[use libjpeg from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])]) |
|
49 |
||
50 |
AC_MSG_CHECKING([for which libjpeg to use]) |
|
51 |
# default is bundled |
|
52 |
DEFAULT_LIBJPEG=bundled |
|
53 |
# if user didn't specify, use DEFAULT_LIBJPEG |
|
54 |
if test "x${with_libjpeg}" = "x"; then |
|
55 |
with_libjpeg=${DEFAULT_LIBJPEG} |
|
56 |
fi |
|
57 |
AC_MSG_RESULT(${with_libjpeg}) |
|
58 |
||
59 |
if test "x${with_libjpeg}" = "xbundled"; then |
|
60 |
USE_EXTERNAL_LIBJPEG=false |
|
61 |
elif test "x${with_libjpeg}" = "xsystem"; then |
|
62 |
AC_CHECK_HEADER(jpeglib.h, [], |
|
63 |
[ AC_MSG_ERROR([--with-libjpeg=system specified, but jpeglib.h not found!])]) |
|
64 |
AC_CHECK_LIB(jpeg, jpeg_CreateDecompress, [], |
|
65 |
[ AC_MSG_ERROR([--with-libjpeg=system specified, but no libjpeg found])]) |
|
66 |
||
67 |
USE_EXTERNAL_LIBJPEG=true |
|
68 |
else |
|
69 |
AC_MSG_ERROR([Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled']) |
|
70 |
fi |
|
71 |
||
20363 | 72 |
AC_SUBST(USE_EXTERNAL_LIBJPEG) |
32921
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
73 |
]) |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
74 |
|
32921
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
75 |
################################################################################ |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
76 |
# Setup giflib |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
77 |
################################################################################ |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
78 |
AC_DEFUN_ONCE([LIB_SETUP_GIFLIB], |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
79 |
[ |
20363 | 80 |
AC_ARG_WITH(giflib, [AS_HELP_STRING([--with-giflib], |
81 |
[use giflib from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])]) |
|
16424 | 82 |
|
20363 | 83 |
AC_MSG_CHECKING([for which giflib to use]) |
84 |
# default is bundled |
|
85 |
DEFAULT_GIFLIB=bundled |
|
86 |
# if user didn't specify, use DEFAULT_GIFLIB |
|
87 |
if test "x${with_giflib}" = "x"; then |
|
16424 | 88 |
with_giflib=${DEFAULT_GIFLIB} |
20363 | 89 |
fi |
90 |
AC_MSG_RESULT(${with_giflib}) |
|
16424 | 91 |
|
20363 | 92 |
if test "x${with_giflib}" = "xbundled"; then |
16424 | 93 |
USE_EXTERNAL_LIBGIF=false |
20363 | 94 |
elif test "x${with_giflib}" = "xsystem"; then |
16424 | 95 |
AC_CHECK_HEADER(gif_lib.h, [], |
20363 | 96 |
[ AC_MSG_ERROR([--with-giflib=system specified, but gif_lib.h not found!])]) |
16424 | 97 |
AC_CHECK_LIB(gif, DGifGetCode, [], |
20363 | 98 |
[ AC_MSG_ERROR([--with-giflib=system specified, but no giflib found!])]) |
16424 | 99 |
|
100 |
USE_EXTERNAL_LIBGIF=true |
|
20363 | 101 |
else |
16424 | 102 |
AC_MSG_ERROR([Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled']) |
20363 | 103 |
fi |
32921
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
104 |
|
20363 | 105 |
AC_SUBST(USE_EXTERNAL_LIBGIF) |
32921
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
106 |
]) |
24413 | 107 |
|
32921
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
108 |
################################################################################ |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
109 |
# Setup libpng |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
110 |
################################################################################ |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
111 |
AC_DEFUN_ONCE([LIB_SETUP_LIBPNG], |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
112 |
[ |
23163 | 113 |
AC_ARG_WITH(libpng, [AS_HELP_STRING([--with-libpng], |
114 |
[use libpng from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])]) |
|
115 |
||
48056
ee64cb4455a9
8175795: configure should verify that system zlib contains needed functionality
ihse
parents:
47216
diff
changeset
|
116 |
PKG_CHECK_MODULES(PNG, libpng, [LIBPNG_FOUND=yes], [LIBPNG_FOUND=no]) |
23163 | 117 |
AC_MSG_CHECKING([for which libpng to use]) |
118 |
||
119 |
# default is bundled |
|
120 |
DEFAULT_LIBPNG=bundled |
|
121 |
# if user didn't specify, use DEFAULT_LIBPNG |
|
122 |
if test "x${with_libpng}" = "x"; then |
|
43383 | 123 |
with_libpng=${DEFAULT_LIBPNG} |
23163 | 124 |
fi |
125 |
||
126 |
if test "x${with_libpng}" = "xbundled"; then |
|
43383 | 127 |
USE_EXTERNAL_LIBPNG=false |
128 |
PNG_CFLAGS="" |
|
129 |
PNG_LIBS="" |
|
130 |
AC_MSG_RESULT([bundled]) |
|
23163 | 131 |
elif test "x${with_libpng}" = "xsystem"; then |
43383 | 132 |
if test "x${LIBPNG_FOUND}" = "xyes"; then |
133 |
# PKG_CHECK_MODULES will set PNG_CFLAGS and PNG_LIBS |
|
134 |
USE_EXTERNAL_LIBPNG=true |
|
135 |
AC_MSG_RESULT([system]) |
|
136 |
else |
|
137 |
AC_MSG_RESULT([system not found]) |
|
138 |
AC_MSG_ERROR([--with-libpng=system specified, but no libpng found!]) |
|
139 |
fi |
|
23163 | 140 |
else |
43383 | 141 |
AC_MSG_ERROR([Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled']) |
23163 | 142 |
fi |
32921
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
143 |
|
23163 | 144 |
AC_SUBST(USE_EXTERNAL_LIBPNG) |
43383 | 145 |
AC_SUBST(PNG_CFLAGS) |
146 |
AC_SUBST(PNG_LIBS) |
|
32921
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
147 |
]) |
23163 | 148 |
|
32921
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
149 |
################################################################################ |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
150 |
# Setup zlib |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
151 |
################################################################################ |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
152 |
AC_DEFUN_ONCE([LIB_SETUP_ZLIB], |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
153 |
[ |
20363 | 154 |
AC_ARG_WITH(zlib, [AS_HELP_STRING([--with-zlib], |
155 |
[use zlib from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])]) |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
156 |
|
20363 | 157 |
AC_CHECK_LIB(z, compress, |
158 |
[ ZLIB_FOUND=yes ], |
|
159 |
[ ZLIB_FOUND=no ]) |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
160 |
|
20363 | 161 |
AC_MSG_CHECKING([for which zlib to use]) |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
162 |
|
36546
fb6c19577a6a
8031767: Support system or alternative implementations of zlib
sherman
parents:
32921
diff
changeset
|
163 |
DEFAULT_ZLIB=system |
fb6c19577a6a
8031767: Support system or alternative implementations of zlib
sherman
parents:
32921
diff
changeset
|
164 |
if test "x$OPENJDK_TARGET_OS" = xwindows; then |
fb6c19577a6a
8031767: Support system or alternative implementations of zlib
sherman
parents:
32921
diff
changeset
|
165 |
# On windows default is bundled...on others default is system |
fb6c19577a6a
8031767: Support system or alternative implementations of zlib
sherman
parents:
32921
diff
changeset
|
166 |
DEFAULT_ZLIB=bundled |
20363 | 167 |
fi |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
168 |
|
20363 | 169 |
if test "x${ZLIB_FOUND}" != "xyes"; then |
170 |
# If we don't find any system...set default to bundled |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
171 |
DEFAULT_ZLIB=bundled |
20363 | 172 |
fi |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
173 |
|
20363 | 174 |
# If user didn't specify, use DEFAULT_ZLIB |
175 |
if test "x${with_zlib}" = "x"; then |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
176 |
with_zlib=${DEFAULT_ZLIB} |
20363 | 177 |
fi |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
178 |
|
20363 | 179 |
if test "x${with_zlib}" = "xbundled"; then |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
180 |
USE_EXTERNAL_LIBZ=false |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
181 |
AC_MSG_RESULT([bundled]) |
20363 | 182 |
elif test "x${with_zlib}" = "xsystem"; then |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
183 |
if test "x${ZLIB_FOUND}" = "xyes"; then |
20363 | 184 |
USE_EXTERNAL_LIBZ=true |
185 |
AC_MSG_RESULT([system]) |
|
48056
ee64cb4455a9
8175795: configure should verify that system zlib contains needed functionality
ihse
parents:
47216
diff
changeset
|
186 |
|
ee64cb4455a9
8175795: configure should verify that system zlib contains needed functionality
ihse
parents:
47216
diff
changeset
|
187 |
if test "x$USE_EXTERNAL_LIBPNG" != "xtrue"; then |
ee64cb4455a9
8175795: configure should verify that system zlib contains needed functionality
ihse
parents:
47216
diff
changeset
|
188 |
# If we use bundled libpng, we must verify that we have a proper zlib. |
ee64cb4455a9
8175795: configure should verify that system zlib contains needed functionality
ihse
parents:
47216
diff
changeset
|
189 |
# For instance zlib-ng has had issues with inflateValidate(). |
ee64cb4455a9
8175795: configure should verify that system zlib contains needed functionality
ihse
parents:
47216
diff
changeset
|
190 |
AC_MSG_CHECKING([for system zlib functionality]) |
ee64cb4455a9
8175795: configure should verify that system zlib contains needed functionality
ihse
parents:
47216
diff
changeset
|
191 |
AC_COMPILE_IFELSE( |
ee64cb4455a9
8175795: configure should verify that system zlib contains needed functionality
ihse
parents:
47216
diff
changeset
|
192 |
[AC_LANG_PROGRAM([#include "zlib.h"], [ |
ee64cb4455a9
8175795: configure should verify that system zlib contains needed functionality
ihse
parents:
47216
diff
changeset
|
193 |
#if ZLIB_VERNUM >= 0x1281 |
ee64cb4455a9
8175795: configure should verify that system zlib contains needed functionality
ihse
parents:
47216
diff
changeset
|
194 |
inflateValidate(NULL, 0); |
ee64cb4455a9
8175795: configure should verify that system zlib contains needed functionality
ihse
parents:
47216
diff
changeset
|
195 |
#endif |
ee64cb4455a9
8175795: configure should verify that system zlib contains needed functionality
ihse
parents:
47216
diff
changeset
|
196 |
])], |
ee64cb4455a9
8175795: configure should verify that system zlib contains needed functionality
ihse
parents:
47216
diff
changeset
|
197 |
[AC_MSG_RESULT([ok])], |
ee64cb4455a9
8175795: configure should verify that system zlib contains needed functionality
ihse
parents:
47216
diff
changeset
|
198 |
[ |
ee64cb4455a9
8175795: configure should verify that system zlib contains needed functionality
ihse
parents:
47216
diff
changeset
|
199 |
AC_MSG_RESULT([not ok]) |
ee64cb4455a9
8175795: configure should verify that system zlib contains needed functionality
ihse
parents:
47216
diff
changeset
|
200 |
AC_MSG_ERROR([System zlib not working correctly]) |
ee64cb4455a9
8175795: configure should verify that system zlib contains needed functionality
ihse
parents:
47216
diff
changeset
|
201 |
] |
ee64cb4455a9
8175795: configure should verify that system zlib contains needed functionality
ihse
parents:
47216
diff
changeset
|
202 |
) |
ee64cb4455a9
8175795: configure should verify that system zlib contains needed functionality
ihse
parents:
47216
diff
changeset
|
203 |
fi |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
204 |
else |
20363 | 205 |
AC_MSG_RESULT([system not found]) |
206 |
AC_MSG_ERROR([--with-zlib=system specified, but no zlib found!]) |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
207 |
fi |
20363 | 208 |
else |
209 |
AC_MSG_ERROR([Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled']) |
|
210 |
fi |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
211 |
|
48758
ba19a21d727d
8196951: jdk build fails with clang: error: no such file or directory: '@LIBZ_CFLAGS@'
erikj
parents:
48753
diff
changeset
|
212 |
LIBZ_CFLAGS="" |
ba19a21d727d
8196951: jdk build fails with clang: error: no such file or directory: '@LIBZ_CFLAGS@'
erikj
parents:
48753
diff
changeset
|
213 |
LIBZ_LIBS="" |
48753
d018e76655fb
8196911: Windows build fails with not finding zlib.h
erikj
parents:
48751
diff
changeset
|
214 |
if test "x$USE_EXTERNAL_LIBZ" = "xfalse"; then |
48751
54f355e65415
8196803: Fix build warnings in jdk libraries with Xcode 9
erikj
parents:
48056
diff
changeset
|
215 |
LIBZ_CFLAGS="$LIBZ_CFLAGS -I$TOPDIR/src/java.base/share/native/libzip/zlib" |
54f355e65415
8196803: Fix build warnings in jdk libraries with Xcode 9
erikj
parents:
48056
diff
changeset
|
216 |
else |
54f355e65415
8196803: Fix build warnings in jdk libraries with Xcode 9
erikj
parents:
48056
diff
changeset
|
217 |
LIBZ_LIBS="-lz" |
54f355e65415
8196803: Fix build warnings in jdk libraries with Xcode 9
erikj
parents:
48056
diff
changeset
|
218 |
fi |
54f355e65415
8196803: Fix build warnings in jdk libraries with Xcode 9
erikj
parents:
48056
diff
changeset
|
219 |
|
20363 | 220 |
AC_SUBST(USE_EXTERNAL_LIBZ) |
48751
54f355e65415
8196803: Fix build warnings in jdk libraries with Xcode 9
erikj
parents:
48056
diff
changeset
|
221 |
AC_SUBST(LIBZ_CFLAGS) |
54f355e65415
8196803: Fix build warnings in jdk libraries with Xcode 9
erikj
parents:
48056
diff
changeset
|
222 |
AC_SUBST(LIBZ_LIBS) |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
223 |
]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
224 |
|
32921
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
225 |
################################################################################ |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
226 |
# Setup lcms (Little CMS) |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
227 |
################################################################################ |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
228 |
AC_DEFUN_ONCE([LIB_SETUP_LCMS], |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
229 |
[ |
32921
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
230 |
AC_ARG_WITH(lcms, [AS_HELP_STRING([--with-lcms], |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
231 |
[use lcms2 from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])]) |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
232 |
|
32921
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
233 |
AC_MSG_CHECKING([for which lcms to use]) |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
234 |
|
32921
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
235 |
DEFAULT_LCMS=bundled |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
236 |
# If user didn't specify, use DEFAULT_LCMS |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
237 |
if test "x${with_lcms}" = "x"; then |
43383 | 238 |
with_lcms=${DEFAULT_LCMS} |
20363 | 239 |
fi |
16581
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
240 |
|
32921
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
241 |
if test "x${with_lcms}" = "xbundled"; then |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
242 |
USE_EXTERNAL_LCMS=false |
43383 | 243 |
LCMS_CFLAGS="" |
244 |
LCMS_LIBS="" |
|
32921
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
245 |
AC_MSG_RESULT([bundled]) |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
246 |
elif test "x${with_lcms}" = "xsystem"; then |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
247 |
AC_MSG_RESULT([system]) |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
248 |
PKG_CHECK_MODULES([LCMS], [lcms2], [LCMS_FOUND=yes], [LCMS_FOUND=no]) |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
249 |
if test "x${LCMS_FOUND}" = "xyes"; then |
43383 | 250 |
# PKG_CHECK_MODULES will set LCMS_CFLAGS and LCMS_LIBS |
32921
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
251 |
USE_EXTERNAL_LCMS=true |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
252 |
else |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
253 |
AC_MSG_ERROR([--with-lcms=system specified, but no lcms found!]) |
16581
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
254 |
fi |
32921
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
255 |
else |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
256 |
AC_MSG_ERROR([Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled']) |
20363 | 257 |
fi |
16581
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
258 |
|
32921
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
259 |
AC_SUBST(USE_EXTERNAL_LCMS) |
43383 | 260 |
AC_SUBST(LCMS_CFLAGS) |
261 |
AC_SUBST(LCMS_LIBS) |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
262 |
]) |