author | bpittore |
Fri, 07 Feb 2014 14:47:04 -0500 | |
changeset 23477 | 6c2348280d09 |
parent 21056 | 16245d19b19a |
child 22467 | b16a5ae55d50 |
permissions | -rw-r--r-- |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
1 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
2 |
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. |
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 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
26 |
AC_DEFUN_ONCE([LIB_SETUP_INIT], |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
27 |
[ |
20363 | 28 |
|
29 |
############################################################################### |
|
30 |
# |
|
31 |
# OS specific settings that we never will need to probe. |
|
32 |
# |
|
33 |
if test "x$OPENJDK_TARGET_OS" = xlinux; then |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
34 |
AC_MSG_CHECKING([what is not needed on Linux?]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
35 |
PULSE_NOT_NEEDED=yes |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
36 |
AC_MSG_RESULT([pulse]) |
20363 | 37 |
fi |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
38 |
|
20363 | 39 |
if test "x$OPENJDK_TARGET_OS" = xsolaris; then |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
40 |
AC_MSG_CHECKING([what is not needed on Solaris?]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
41 |
ALSA_NOT_NEEDED=yes |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
42 |
PULSE_NOT_NEEDED=yes |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
43 |
AC_MSG_RESULT([alsa pulse]) |
20363 | 44 |
fi |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
45 |
|
20363 | 46 |
if test "x$OPENJDK_TARGET_OS" = xwindows; then |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
47 |
AC_MSG_CHECKING([what is not needed on Windows?]) |
20363 | 48 |
CUPS_NOT_NEEDED=yes |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
49 |
ALSA_NOT_NEEDED=yes |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
50 |
PULSE_NOT_NEEDED=yes |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
51 |
X11_NOT_NEEDED=yes |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
52 |
AC_MSG_RESULT([alsa cups pulse x11]) |
20363 | 53 |
fi |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
54 |
|
20363 | 55 |
if test "x$OPENJDK_TARGET_OS" = xmacosx; then |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
56 |
AC_MSG_CHECKING([what is not needed on MacOSX?]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
57 |
ALSA_NOT_NEEDED=yes |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
58 |
PULSE_NOT_NEEDED=yes |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
59 |
X11_NOT_NEEDED=yes |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
60 |
# If the java runtime framework is disabled, then we need X11. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
61 |
# This will be adjusted below. |
20654 | 62 |
AC_MSG_RESULT([alsa pulse x11]) |
20363 | 63 |
fi |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
64 |
|
20363 | 65 |
if test "x$OPENJDK_TARGET_OS" = xbsd; then |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
66 |
AC_MSG_CHECKING([what is not needed on bsd?]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
67 |
ALSA_NOT_NEEDED=yes |
20363 | 68 |
AC_MSG_RESULT([alsa]) |
69 |
fi |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
70 |
|
20363 | 71 |
if test "x$OPENJDK" = "xfalse"; then |
20654 | 72 |
FREETYPE_NOT_NEEDED=yes |
20363 | 73 |
fi |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
74 |
|
20363 | 75 |
if test "x$SUPPORT_HEADFUL" = xno; then |
13697 | 76 |
X11_NOT_NEEDED=yes |
20363 | 77 |
fi |
13697 | 78 |
|
20363 | 79 |
############################################################################### |
80 |
# |
|
20649
47ddc69a25a7
8026864: Deprecate --disable-macosx-runtime-support.
ihse
parents:
20363
diff
changeset
|
81 |
# Check for MacOSX support for OpenJDK. |
20363 | 82 |
# |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
83 |
|
20649
47ddc69a25a7
8026864: Deprecate --disable-macosx-runtime-support.
ihse
parents:
20363
diff
changeset
|
84 |
BASIC_DEPRECATED_ARG_ENABLE(macosx-runtime-support, macosx_runtime_support) |
47ddc69a25a7
8026864: Deprecate --disable-macosx-runtime-support.
ihse
parents:
20363
diff
changeset
|
85 |
|
47ddc69a25a7
8026864: Deprecate --disable-macosx-runtime-support.
ihse
parents:
20363
diff
changeset
|
86 |
AC_MSG_CHECKING([for Mac OS X Java Framework]) |
20363 | 87 |
if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then |
20649
47ddc69a25a7
8026864: Deprecate --disable-macosx-runtime-support.
ihse
parents:
20363
diff
changeset
|
88 |
AC_MSG_RESULT([/System/Library/Frameworks/JavaVM.framework]) |
20363 | 89 |
else |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
90 |
AC_MSG_RESULT([no]) |
20363 | 91 |
fi |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
92 |
]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
93 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
94 |
AC_DEFUN_ONCE([LIB_SETUP_X11], |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
95 |
[ |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
96 |
|
20363 | 97 |
############################################################################### |
98 |
# |
|
99 |
# Check for X Windows |
|
100 |
# |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
101 |
|
20363 | 102 |
# Check if the user has specified sysroot, but not --x-includes or --x-libraries. |
103 |
# Make a simple check for the libraries at the sysroot, and setup --x-includes and |
|
104 |
# --x-libraries for the sysroot, if that seems to be correct. |
|
105 |
if test "x$SYS_ROOT" != "x/"; then |
|
106 |
if test "x$x_includes" = xNONE; then |
|
107 |
if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then |
|
108 |
x_includes="$SYS_ROOT/usr/X11R6/include" |
|
109 |
elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then |
|
110 |
x_includes="$SYS_ROOT/usr/include" |
|
111 |
fi |
|
112 |
fi |
|
113 |
if test "x$x_libraries" = xNONE; then |
|
114 |
if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then |
|
115 |
x_libraries="$SYS_ROOT/usr/X11R6/lib" |
|
116 |
elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then |
|
117 |
x_libraries="$SYS_ROOT/usr/lib64" |
|
118 |
elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then |
|
119 |
x_libraries="$SYS_ROOT/usr/lib" |
|
120 |
fi |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
121 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
122 |
fi |
20363 | 123 |
|
124 |
# Now let autoconf do it's magic |
|
125 |
AC_PATH_X |
|
126 |
AC_PATH_XTRA |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
127 |
|
20363 | 128 |
# AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling |
129 |
# this doesn't make sense so we remove it. |
|
130 |
if test "x$COMPILE_TYPE" = xcross; then |
|
131 |
X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[[^ ]]*//g'` |
|
132 |
fi |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
133 |
|
20363 | 134 |
if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
135 |
HELP_MSG_MISSING_DEPENDENCY([x11]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
136 |
AC_MSG_ERROR([Could not find X11 libraries. $HELP_MSG]) |
20363 | 137 |
fi |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
138 |
|
20363 | 139 |
if test "x$OPENJDK_TARGET_OS" = xsolaris; then |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
140 |
OPENWIN_HOME="/usr/openwin" |
20363 | 141 |
fi |
142 |
AC_SUBST(OPENWIN_HOME) |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
143 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
144 |
|
20363 | 145 |
# |
146 |
# Weird Sol10 something check...TODO change to try compile |
|
147 |
# |
|
148 |
if test "x${OPENJDK_TARGET_OS}" = xsolaris; then |
|
149 |
if test "`uname -r`" = "5.10"; then |
|
150 |
if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then |
|
151 |
X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS" |
|
152 |
fi |
|
153 |
fi |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
154 |
fi |
20363 | 155 |
|
156 |
AC_LANG_PUSH(C) |
|
157 |
OLD_CFLAGS="$CFLAGS" |
|
158 |
CFLAGS="$CFLAGS $X_CFLAGS" |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
159 |
|
20363 | 160 |
# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10 |
161 |
AC_CHECK_HEADERS([X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h], |
|
162 |
[X11_A_OK=yes], |
|
163 |
[X11_A_OK=no; break], |
|
164 |
[ |
|
165 |
# include <X11/Xlib.h> |
|
166 |
# include <X11/Xutil.h> |
|
167 |
] |
|
168 |
) |
|
14111 | 169 |
|
20363 | 170 |
CFLAGS="$OLD_CFLAGS" |
171 |
AC_LANG_POP(C) |
|
14111 | 172 |
|
20363 | 173 |
if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
174 |
HELP_MSG_MISSING_DEPENDENCY([x11]) |
19524
51009a053562
8003162: build-infra: Improve suggestions for missing packages on linux
erikj
parents:
18021
diff
changeset
|
175 |
AC_MSG_ERROR([Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG]) |
20363 | 176 |
fi |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
177 |
|
20363 | 178 |
AC_SUBST(X_CFLAGS) |
179 |
AC_SUBST(X_LIBS) |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
180 |
]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
181 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
182 |
AC_DEFUN_ONCE([LIB_SETUP_CUPS], |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
183 |
[ |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
184 |
|
20363 | 185 |
############################################################################### |
186 |
# |
|
187 |
# The common unix printing system cups is used to print from java. |
|
188 |
# |
|
189 |
AC_ARG_WITH(cups, [AS_HELP_STRING([--with-cups], |
|
190 |
[specify prefix directory for the cups package |
|
191 |
(expecting the headers under PATH/include)])]) |
|
192 |
AC_ARG_WITH(cups-include, [AS_HELP_STRING([--with-cups-include], |
|
193 |
[specify directory for the cups include files])]) |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
194 |
|
20363 | 195 |
if test "x$CUPS_NOT_NEEDED" = xyes; then |
196 |
if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then |
|
197 |
AC_MSG_WARN([cups not used, so --with-cups is ignored]) |
|
198 |
fi |
|
199 |
CUPS_CFLAGS= |
|
200 |
else |
|
201 |
CUPS_FOUND=no |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
202 |
|
20363 | 203 |
if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then |
204 |
AC_MSG_ERROR([It is not possible to disable the use of cups. Remove the --without-cups option.]) |
|
205 |
fi |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
206 |
|
20363 | 207 |
if test "x${with_cups}" != x; then |
208 |
CUPS_CFLAGS="-I${with_cups}/include" |
|
209 |
CUPS_FOUND=yes |
|
210 |
fi |
|
211 |
if test "x${with_cups_include}" != x; then |
|
212 |
CUPS_CFLAGS="-I${with_cups_include}" |
|
213 |
CUPS_FOUND=yes |
|
214 |
fi |
|
215 |
if test "x$CUPS_FOUND" = xno; then |
|
216 |
BDEPS_CHECK_MODULE(CUPS, cups, xxx, [CUPS_FOUND=yes]) |
|
217 |
fi |
|
218 |
if test "x$CUPS_FOUND" = xno; then |
|
219 |
# Are the cups headers installed in the default /usr/include location? |
|
220 |
AC_CHECK_HEADERS([cups/cups.h cups/ppd.h], |
|
221 |
[ |
|
222 |
CUPS_FOUND=yes |
|
223 |
CUPS_CFLAGS= |
|
224 |
DEFAULT_CUPS=yes |
|
225 |
] |
|
226 |
) |
|
227 |
fi |
|
228 |
if test "x$CUPS_FOUND" = xno; then |
|
229 |
# Getting nervous now? Lets poke around for standard Solaris third-party |
|
230 |
# package installation locations. |
|
231 |
AC_MSG_CHECKING([for cups headers]) |
|
232 |
if test -s /opt/sfw/cups/include/cups/cups.h; then |
|
233 |
# An SFW package seems to be installed! |
|
234 |
CUPS_FOUND=yes |
|
235 |
CUPS_CFLAGS="-I/opt/sfw/cups/include" |
|
236 |
elif test -s /opt/csw/include/cups/cups.h; then |
|
237 |
# A CSW package seems to be installed! |
|
238 |
CUPS_FOUND=yes |
|
239 |
CUPS_CFLAGS="-I/opt/csw/include" |
|
240 |
fi |
|
241 |
AC_MSG_RESULT([$CUPS_FOUND]) |
|
242 |
fi |
|
243 |
if test "x$CUPS_FOUND" = xno; then |
|
244 |
HELP_MSG_MISSING_DEPENDENCY([cups]) |
|
245 |
AC_MSG_ERROR([Could not find cups! $HELP_MSG ]) |
|
246 |
fi |
|
247 |
fi |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
248 |
|
20363 | 249 |
AC_SUBST(CUPS_CFLAGS) |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
250 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
251 |
]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
252 |
|
20654 | 253 |
AC_DEFUN([LIB_CHECK_POTENTIAL_FREETYPE], |
254 |
[ |
|
255 |
POTENTIAL_FREETYPE_INCLUDE_PATH="$1" |
|
256 |
POTENTIAL_FREETYPE_LIB_PATH="$2" |
|
257 |
METHOD="$3" |
|
258 |
||
259 |
# First check if the files exists. |
|
260 |
if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then |
|
261 |
# We found an arbitrary include file. That's a good sign. |
|
262 |
AC_MSG_NOTICE([Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD]) |
|
263 |
FOUND_FREETYPE=yes |
|
264 |
||
265 |
FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}" |
|
266 |
if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then |
|
267 |
AC_MSG_NOTICE([Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location.]) |
|
268 |
FOUND_FREETYPE=no |
|
269 |
else |
|
270 |
if test "x$OPENJDK_TARGET_OS" = xwindows; then |
|
271 |
# On Windows, we will need both .lib and .dll file. |
|
272 |
if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then |
|
273 |
AC_MSG_NOTICE([Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location.]) |
|
274 |
FOUND_FREETYPE=no |
|
275 |
fi |
|
276 |
elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then |
|
277 |
# On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess! |
|
278 |
POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64" |
|
279 |
fi |
|
280 |
fi |
|
281 |
fi |
|
282 |
||
283 |
if test "x$FOUND_FREETYPE" = xyes; then |
|
284 |
BASIC_FIXUP_PATH(POTENTIAL_FREETYPE_INCLUDE_PATH) |
|
285 |
BASIC_FIXUP_PATH(POTENTIAL_FREETYPE_LIB_PATH) |
|
286 |
||
287 |
FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH" |
|
288 |
AC_MSG_CHECKING([for freetype includes]) |
|
289 |
AC_MSG_RESULT([$FREETYPE_INCLUDE_PATH]) |
|
290 |
FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH" |
|
291 |
AC_MSG_CHECKING([for freetype libraries]) |
|
292 |
AC_MSG_RESULT([$FREETYPE_LIB_PATH]) |
|
293 |
fi |
|
294 |
]) |
|
295 |
||
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
296 |
AC_DEFUN_ONCE([LIB_SETUP_FREETYPE], |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
297 |
[ |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
298 |
|
20363 | 299 |
############################################################################### |
300 |
# |
|
20654 | 301 |
# The ubiquitous freetype library is used to render fonts. |
20363 | 302 |
# |
303 |
AC_ARG_WITH(freetype, [AS_HELP_STRING([--with-freetype], |
|
20654 | 304 |
[specify prefix directory for the freetype package |
20363 | 305 |
(expecting the libraries under PATH/lib and the headers under PATH/include)])]) |
20654 | 306 |
AC_ARG_WITH(freetype-include, [AS_HELP_STRING([--with-freetype-include], |
307 |
[specify directory for the freetype include files])]) |
|
308 |
AC_ARG_WITH(freetype-lib, [AS_HELP_STRING([--with-freetype-lib], |
|
309 |
[specify directory for the freetype library])]) |
|
310 |
AC_ARG_ENABLE(freetype-bundling, [AS_HELP_STRING([--disable-freetype-bundling], |
|
311 |
[disable bundling of the freetype library with the build result @<:@enabled on Windows or when using --with-freetype, disabled otherwise@:>@])]) |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
312 |
|
20654 | 313 |
FREETYPE_CFLAGS= |
314 |
FREETYPE_LIBS= |
|
315 |
FREETYPE_BUNDLE_LIB_PATH= |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
316 |
|
20654 | 317 |
if test "x$FREETYPE_NOT_NEEDED" = xyes; then |
20363 | 318 |
if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then |
319 |
AC_MSG_WARN([freetype not used, so --with-freetype is ignored]) |
|
320 |
fi |
|
20654 | 321 |
if test "x$enable_freetype_bundling" != x; then |
322 |
AC_MSG_WARN([freetype not used, so --enable-freetype-bundling is ignored]) |
|
323 |
fi |
|
20363 | 324 |
else |
20654 | 325 |
# freetype is needed to build; go get it! |
326 |
||
327 |
BUNDLE_FREETYPE="$enable_freetype_bundling" |
|
328 |
||
329 |
if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then |
|
330 |
# User has specified settings |
|
331 |
||
332 |
if test "x$BUNDLE_FREETYPE" = x; then |
|
333 |
# If not specified, default is to bundle freetype |
|
334 |
BUNDLE_FREETYPE=yes |
|
335 |
fi |
|
336 |
||
337 |
if test "x$with_freetype" != x; then |
|
338 |
POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include" |
|
339 |
POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib" |
|
340 |
fi |
|
341 |
||
342 |
# Allow --with-freetype-lib and --with-freetype-include to override |
|
343 |
if test "x$with_freetype_include" != x; then |
|
344 |
POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include" |
|
345 |
fi |
|
346 |
if test "x$with_freetype_lib" != x; then |
|
347 |
POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib" |
|
348 |
fi |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
349 |
|
20654 | 350 |
if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then |
351 |
# Okay, we got it. Check that it works. |
|
352 |
LIB_CHECK_POTENTIAL_FREETYPE($POTENTIAL_FREETYPE_INCLUDE_PATH, $POTENTIAL_FREETYPE_LIB_PATH, [--with-freetype]) |
|
353 |
if test "x$FOUND_FREETYPE" != xyes; then |
|
354 |
AC_MSG_ERROR([Can not find or use freetype at location given by --with-freetype]) |
|
355 |
fi |
|
356 |
else |
|
357 |
# User specified only one of lib or include. This is an error. |
|
358 |
if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then |
|
359 |
AC_MSG_NOTICE([User specified --with-freetype-lib but not --with-freetype-include]) |
|
360 |
AC_MSG_ERROR([Need both freetype lib and include paths. Consider using --with-freetype instead.]) |
|
361 |
else |
|
362 |
AC_MSG_NOTICE([User specified --with-freetype-include but not --with-freetype-lib]) |
|
363 |
AC_MSG_ERROR([Need both freetype lib and include paths. Consider using --with-freetype instead.]) |
|
364 |
fi |
|
20363 | 365 |
fi |
20654 | 366 |
else |
367 |
# User did not specify settings, but we need freetype. Try to locate it. |
|
368 |
||
369 |
if test "x$BUNDLE_FREETYPE" = x; then |
|
370 |
# If not specified, default is to bundle freetype only on windows |
|
371 |
if test "x$OPENJDK_TARGET_OS" = xwindows; then |
|
372 |
BUNDLE_FREETYPE=yes |
|
373 |
else |
|
374 |
BUNDLE_FREETYPE=no |
|
375 |
fi |
|
376 |
fi |
|
377 |
||
378 |
if test "x$FOUND_FREETYPE" != xyes; then |
|
379 |
# Check builddeps |
|
380 |
BDEPS_CHECK_MODULE(FREETYPE, freetype2, xxx, [FOUND_FREETYPE=yes], [FOUND_FREETYPE=no]) |
|
381 |
# BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling. |
|
382 |
if test "x$FOUND_FREETYPE" = xyes; then |
|
383 |
if test "x$BUNDLE_FREETYPE" = xyes; then |
|
384 |
AC_MSG_NOTICE([Found freetype using builddeps, but ignoring since we can not bundle that]) |
|
385 |
FOUND_FREETYPE=no |
|
386 |
else |
|
387 |
AC_MSG_CHECKING([for freetype]) |
|
388 |
AC_MSG_RESULT([yes (using builddeps)]) |
|
389 |
fi |
|
390 |
fi |
|
20363 | 391 |
fi |
20654 | 392 |
|
393 |
if test "x$FOUND_FREETYPE" != xyes; then |
|
394 |
# Check modules using pkg-config, but only if we have it (ugly output results otherwise) |
|
395 |
if test "x$PKG_CONFIG" != x; then |
|
396 |
PKG_CHECK_MODULES(FREETYPE, freetype2, [FOUND_FREETYPE=yes], [FOUND_FREETYPE=no]) |
|
397 |
if test "x$FOUND_FREETYPE" = xyes; then |
|
398 |
# On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us. |
|
399 |
FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'` |
|
400 |
# 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64 |
|
401 |
if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then |
|
402 |
FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'` |
|
403 |
fi |
|
404 |
# BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling. |
|
405 |
if test "x$BUNDLE_FREETYPE" = xyes; then |
|
406 |
AC_MSG_NOTICE([Found freetype using pkg-config, but ignoring since we can not bundle that]) |
|
407 |
FOUND_FREETYPE=no |
|
408 |
else |
|
409 |
AC_MSG_CHECKING([for freetype]) |
|
410 |
AC_MSG_RESULT([yes (using pkg-config)]) |
|
411 |
fi |
|
412 |
fi |
|
20363 | 413 |
fi |
20654 | 414 |
fi |
415 |
||
416 |
if test "x$FOUND_FREETYPE" != xyes; then |
|
417 |
# Check in well-known locations |
|
418 |
if test "x$OPENJDK_TARGET_OS" = xwindows; then |
|
419 |
FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32" |
|
420 |
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(FREETYPE_BASE_DIR) |
|
421 |
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location]) |
|
422 |
if test "x$FOUND_FREETYPE" != xyes; then |
|
423 |
FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32" |
|
424 |
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(FREETYPE_BASE_DIR) |
|
425 |
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location]) |
|
426 |
fi |
|
427 |
else |
|
428 |
if test "x$SYS_ROOT" = "x/"; then |
|
429 |
FREETYPE_ROOT= |
|
430 |
else |
|
431 |
FREETYPE_ROOT="$SYS_ROOT" |
|
432 |
fi |
|
433 |
FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr" |
|
434 |
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location]) |
|
435 |
||
436 |
if test "x$FOUND_FREETYPE" != xyes; then |
|
437 |
FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr/X11" |
|
438 |
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location]) |
|
439 |
fi |
|
440 |
||
441 |
if test "x$FOUND_FREETYPE" != xyes; then |
|
442 |
FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr" |
|
443 |
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then |
|
444 |
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu], [well-known location]) |
|
445 |
else |
|
446 |
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib/i386-linux-gnu], [well-known location]) |
|
447 |
if test "x$FOUND_FREETYPE" != xyes; then |
|
448 |
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib32], [well-known location]) |
|
449 |
fi |
|
450 |
fi |
|
451 |
fi |
|
20363 | 452 |
fi |
20654 | 453 |
fi # end check in well-known locations |
454 |
||
455 |
if test "x$FOUND_FREETYPE" != xyes; then |
|
456 |
HELP_MSG_MISSING_DEPENDENCY([freetype]) |
|
457 |
AC_MSG_ERROR([Could not find freetype! $HELP_MSG ]) |
|
458 |
fi |
|
459 |
fi # end user specified settings |
|
460 |
||
461 |
# Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir. |
|
462 |
if test "x$FREETYPE_CFLAGS" = x; then |
|
463 |
BASIC_FIXUP_PATH(FREETYPE_INCLUDE_PATH) |
|
464 |
if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then |
|
465 |
FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH" |
|
466 |
else |
|
467 |
FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH" |
|
20363 | 468 |
fi |
469 |
fi |
|
20654 | 470 |
|
471 |
if test "x$FREETYPE_LIBS" = x; then |
|
472 |
BASIC_FIXUP_PATH(FREETYPE_LIB_PATH) |
|
473 |
if test "x$OPENJDK_TARGET_OS" = xwindows; then |
|
474 |
FREETYPE_LIBS="$FREETYPE_LIB_PATH/freetype.lib" |
|
475 |
else |
|
476 |
FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -lfreetype" |
|
20363 | 477 |
fi |
478 |
fi |
|
14111 | 479 |
|
20654 | 480 |
# Try to compile it |
481 |
AC_MSG_CHECKING([if we can compile and link with freetype]) |
|
482 |
AC_LANG_PUSH(C++) |
|
483 |
PREV_CXXCFLAGS="$CXXFLAGS" |
|
21056
16245d19b19a
8027300: configure should use LIBS instead of LDFLAGS when testing freetype
ihse
parents:
20655
diff
changeset
|
484 |
PREV_LIBS="$LIBS" |
20654 | 485 |
PREV_CXX="$CXX" |
486 |
CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS" |
|
21056
16245d19b19a
8027300: configure should use LIBS instead of LDFLAGS when testing freetype
ihse
parents:
20655
diff
changeset
|
487 |
LIBS="$LIBS $FREETYPE_LIBS" |
20654 | 488 |
CXX="$FIXPATH $CXX" |
489 |
AC_LINK_IFELSE([AC_LANG_SOURCE([[ |
|
490 |
#include<ft2build.h> |
|
491 |
#include FT_FREETYPE_H |
|
492 |
int main () { |
|
493 |
FT_Init_FreeType(NULL); |
|
494 |
return 0; |
|
495 |
} |
|
496 |
]])], |
|
497 |
[ |
|
498 |
AC_MSG_RESULT([yes]) |
|
499 |
], |
|
500 |
[ |
|
501 |
AC_MSG_RESULT([no]) |
|
502 |
AC_MSG_NOTICE([Could not compile and link with freetype. This might be a 32/64-bit mismatch.]) |
|
503 |
AC_MSG_NOTICE([Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS]) |
|
504 |
||
505 |
HELP_MSG_MISSING_DEPENDENCY([freetype]) |
|
506 |
||
507 |
AC_MSG_ERROR([Can not continue without freetype. $HELP_MSG]) |
|
508 |
] |
|
509 |
) |
|
510 |
CXXCFLAGS="$PREV_CXXFLAGS" |
|
21056
16245d19b19a
8027300: configure should use LIBS instead of LDFLAGS when testing freetype
ihse
parents:
20655
diff
changeset
|
511 |
LIBS="$PREV_LIBS" |
20654 | 512 |
CXX="$PREV_CXX" |
513 |
AC_LANG_POP(C++) |
|
514 |
||
515 |
AC_MSG_CHECKING([if we should bundle freetype]) |
|
516 |
if test "x$BUNDLE_FREETYPE" = xyes; then |
|
517 |
FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH" |
|
20363 | 518 |
fi |
20654 | 519 |
AC_MSG_RESULT([$BUNDLE_FREETYPE]) |
520 |
||
521 |
fi # end freetype needed |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
522 |
|
20654 | 523 |
AC_SUBST(FREETYPE_BUNDLE_LIB_PATH) |
524 |
AC_SUBST(FREETYPE_CFLAGS) |
|
525 |
AC_SUBST(FREETYPE_LIBS) |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
526 |
]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
527 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
528 |
AC_DEFUN_ONCE([LIB_SETUP_ALSA], |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
529 |
[ |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
530 |
|
20363 | 531 |
############################################################################### |
532 |
# |
|
533 |
# Check for alsa headers and libraries. Used on Linux/GNU systems. |
|
534 |
# |
|
535 |
AC_ARG_WITH(alsa, [AS_HELP_STRING([--with-alsa], |
|
536 |
[specify prefix directory for the alsa package |
|
537 |
(expecting the libraries under PATH/lib and the headers under PATH/include)])]) |
|
538 |
AC_ARG_WITH(alsa-include, [AS_HELP_STRING([--with-alsa-include], |
|
539 |
[specify directory for the alsa include files])]) |
|
540 |
AC_ARG_WITH(alsa-lib, [AS_HELP_STRING([--with-alsa-lib], |
|
541 |
[specify directory for the alsa library])]) |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
542 |
|
20363 | 543 |
if test "x$ALSA_NOT_NEEDED" = xyes; then |
544 |
if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then |
|
545 |
AC_MSG_WARN([alsa not used, so --with-alsa is ignored]) |
|
546 |
fi |
|
547 |
ALSA_CFLAGS= |
|
548 |
ALSA_LIBS= |
|
549 |
else |
|
550 |
ALSA_FOUND=no |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
551 |
|
20363 | 552 |
if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then |
553 |
AC_MSG_ERROR([It is not possible to disable the use of alsa. Remove the --without-alsa option.]) |
|
554 |
fi |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
555 |
|
20363 | 556 |
if test "x${with_alsa}" != x; then |
557 |
ALSA_LIBS="-L${with_alsa}/lib -lalsa" |
|
558 |
ALSA_CFLAGS="-I${with_alsa}/include" |
|
559 |
ALSA_FOUND=yes |
|
560 |
fi |
|
561 |
if test "x${with_alsa_include}" != x; then |
|
562 |
ALSA_CFLAGS="-I${with_alsa_include}" |
|
563 |
ALSA_FOUND=yes |
|
564 |
fi |
|
565 |
if test "x${with_alsa_lib}" != x; then |
|
566 |
ALSA_LIBS="-L${with_alsa_lib} -lalsa" |
|
567 |
ALSA_FOUND=yes |
|
568 |
fi |
|
569 |
if test "x$ALSA_FOUND" = xno; then |
|
570 |
BDEPS_CHECK_MODULE(ALSA, alsa, xxx, [ALSA_FOUND=yes], [ALSA_FOUND=no]) |
|
571 |
fi |
|
572 |
if test "x$ALSA_FOUND" = xno; then |
|
573 |
PKG_CHECK_MODULES(ALSA, alsa, [ALSA_FOUND=yes], [ALSA_FOUND=no]) |
|
574 |
fi |
|
575 |
if test "x$ALSA_FOUND" = xno; then |
|
576 |
AC_CHECK_HEADERS([alsa/asoundlib.h], |
|
577 |
[ |
|
578 |
ALSA_FOUND=yes |
|
579 |
ALSA_CFLAGS=-Iignoreme |
|
580 |
ALSA_LIBS=-lasound |
|
581 |
DEFAULT_ALSA=yes |
|
582 |
], |
|
583 |
[ALSA_FOUND=no]) |
|
584 |
fi |
|
585 |
if test "x$ALSA_FOUND" = xno; then |
|
586 |
HELP_MSG_MISSING_DEPENDENCY([alsa]) |
|
587 |
AC_MSG_ERROR([Could not find alsa! $HELP_MSG ]) |
|
588 |
fi |
|
589 |
fi |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
590 |
|
20363 | 591 |
AC_SUBST(ALSA_CFLAGS) |
592 |
AC_SUBST(ALSA_LIBS) |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
593 |
]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
594 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
595 |
AC_DEFUN_ONCE([LIB_SETUP_MISC_LIBS], |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
596 |
[ |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
597 |
|
20363 | 598 |
############################################################################### |
599 |
# |
|
600 |
# Check for the jpeg library |
|
601 |
# |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
602 |
|
20363 | 603 |
USE_EXTERNAL_LIBJPEG=true |
604 |
AC_CHECK_LIB(jpeg, main, [], |
|
605 |
[ USE_EXTERNAL_LIBJPEG=false |
|
606 |
AC_MSG_NOTICE([Will use jpeg decoder bundled with the OpenJDK source]) |
|
607 |
]) |
|
608 |
AC_SUBST(USE_EXTERNAL_LIBJPEG) |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
609 |
|
20363 | 610 |
############################################################################### |
611 |
# |
|
612 |
# Check for the gif library |
|
613 |
# |
|
614 |
||
615 |
AC_ARG_WITH(giflib, [AS_HELP_STRING([--with-giflib], |
|
616 |
[use giflib from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])]) |
|
16424 | 617 |
|
618 |
||
20363 | 619 |
AC_MSG_CHECKING([for which giflib to use]) |
16424 | 620 |
|
20363 | 621 |
# default is bundled |
622 |
DEFAULT_GIFLIB=bundled |
|
16424 | 623 |
|
20363 | 624 |
# |
625 |
# if user didn't specify, use DEFAULT_GIFLIB |
|
626 |
# |
|
627 |
if test "x${with_giflib}" = "x"; then |
|
16424 | 628 |
with_giflib=${DEFAULT_GIFLIB} |
20363 | 629 |
fi |
16424 | 630 |
|
20363 | 631 |
AC_MSG_RESULT(${with_giflib}) |
16424 | 632 |
|
20363 | 633 |
if test "x${with_giflib}" = "xbundled"; then |
16424 | 634 |
USE_EXTERNAL_LIBGIF=false |
20363 | 635 |
elif test "x${with_giflib}" = "xsystem"; then |
16424 | 636 |
AC_CHECK_HEADER(gif_lib.h, [], |
20363 | 637 |
[ AC_MSG_ERROR([--with-giflib=system specified, but gif_lib.h not found!])]) |
16424 | 638 |
AC_CHECK_LIB(gif, DGifGetCode, [], |
20363 | 639 |
[ AC_MSG_ERROR([--with-giflib=system specified, but no giflib found!])]) |
16424 | 640 |
|
641 |
USE_EXTERNAL_LIBGIF=true |
|
20363 | 642 |
else |
16424 | 643 |
AC_MSG_ERROR([Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled']) |
20363 | 644 |
fi |
645 |
AC_SUBST(USE_EXTERNAL_LIBGIF) |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
646 |
|
20363 | 647 |
############################################################################### |
648 |
# |
|
649 |
# Check for the zlib library |
|
650 |
# |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
651 |
|
20363 | 652 |
AC_ARG_WITH(zlib, [AS_HELP_STRING([--with-zlib], |
653 |
[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
|
654 |
|
20363 | 655 |
AC_CHECK_LIB(z, compress, |
656 |
[ ZLIB_FOUND=yes ], |
|
657 |
[ ZLIB_FOUND=no ]) |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
658 |
|
20363 | 659 |
AC_MSG_CHECKING([for which zlib to use]) |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
660 |
|
20363 | 661 |
DEFAULT_ZLIB=bundled |
662 |
if test "x$OPENJDK_TARGET_OS" = xmacosx; then |
|
663 |
# |
|
664 |
# On macosx default is system...on others default is |
|
665 |
# |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
666 |
DEFAULT_ZLIB=system |
20363 | 667 |
fi |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
668 |
|
20363 | 669 |
if test "x${ZLIB_FOUND}" != "xyes"; then |
670 |
# |
|
671 |
# If we don't find any system...set default to bundled |
|
672 |
# |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
673 |
DEFAULT_ZLIB=bundled |
20363 | 674 |
fi |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
675 |
|
20363 | 676 |
# |
677 |
# If user didn't specify, use DEFAULT_ZLIB |
|
678 |
# |
|
679 |
if test "x${with_zlib}" = "x"; then |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
680 |
with_zlib=${DEFAULT_ZLIB} |
20363 | 681 |
fi |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
682 |
|
20363 | 683 |
if test "x${with_zlib}" = "xbundled"; then |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
684 |
USE_EXTERNAL_LIBZ=false |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
685 |
AC_MSG_RESULT([bundled]) |
20363 | 686 |
elif test "x${with_zlib}" = "xsystem"; then |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
687 |
if test "x${ZLIB_FOUND}" = "xyes"; then |
20363 | 688 |
USE_EXTERNAL_LIBZ=true |
689 |
AC_MSG_RESULT([system]) |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
690 |
else |
20363 | 691 |
AC_MSG_RESULT([system not found]) |
692 |
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
|
693 |
fi |
20363 | 694 |
else |
695 |
AC_MSG_ERROR([Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled']) |
|
696 |
fi |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
697 |
|
20363 | 698 |
AC_SUBST(USE_EXTERNAL_LIBZ) |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
699 |
|
20363 | 700 |
############################################################################### |
701 |
LIBZIP_CAN_USE_MMAP=true |
|
13697 | 702 |
|
20363 | 703 |
AC_SUBST(LIBZIP_CAN_USE_MMAP) |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
704 |
|
20363 | 705 |
############################################################################### |
706 |
# |
|
707 |
# Check if altzone exists in time.h |
|
708 |
# |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
709 |
|
20363 | 710 |
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <time.h>], [return (int)altzone;])], |
711 |
[has_altzone=yes], |
|
712 |
[has_altzone=no]) |
|
713 |
if test "x$has_altzone" = xyes; then |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
714 |
AC_DEFINE([HAVE_ALTZONE], 1, [Define if you have the external 'altzone' variable in time.h]) |
20363 | 715 |
fi |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
716 |
|
20363 | 717 |
############################################################################### |
718 |
# |
|
719 |
# Check the maths library |
|
720 |
# |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
721 |
|
20363 | 722 |
AC_CHECK_LIB(m, cos, [], |
723 |
[ |
|
724 |
AC_MSG_NOTICE([Maths library was not found]) |
|
725 |
] |
|
726 |
) |
|
727 |
AC_SUBST(LIBM) |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
728 |
|
20363 | 729 |
############################################################################### |
730 |
# |
|
731 |
# Check for libdl.so |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
732 |
|
20363 | 733 |
save_LIBS="$LIBS" |
734 |
LIBS="" |
|
735 |
AC_CHECK_LIB(dl,dlopen) |
|
736 |
LIBDL="$LIBS" |
|
737 |
AC_SUBST(LIBDL) |
|
738 |
LIBS="$save_LIBS" |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
739 |
]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
740 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
741 |
AC_DEFUN_ONCE([LIB_SETUP_STATIC_LINK_LIBSTDCPP], |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
742 |
[ |
20363 | 743 |
############################################################################### |
744 |
# |
|
745 |
# statically link libstdc++ before C++ ABI is stablized on Linux unless |
|
746 |
# dynamic build is configured on command line. |
|
747 |
# |
|
748 |
AC_ARG_WITH([stdc++lib], [AS_HELP_STRING([--with-stdc++lib=<static>,<dynamic>,<default>], |
|
749 |
[force linking of the C++ runtime on Linux to either static or dynamic, default is static with dynamic as fallback])], |
|
750 |
[ |
|
751 |
if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \ |
|
752 |
&& test "x$with_stdc__lib" != xdefault; then |
|
753 |
AC_MSG_ERROR([Bad parameter value --with-stdc++lib=$with_stdc__lib!]) |
|
754 |
fi |
|
755 |
], |
|
756 |
[with_stdc__lib=default] |
|
757 |
) |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
758 |
|
20363 | 759 |
if test "x$OPENJDK_TARGET_OS" = xlinux; then |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
760 |
# Test if -lstdc++ works. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
761 |
AC_MSG_CHECKING([if dynamic link of stdc++ is possible]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
762 |
AC_LANG_PUSH(C++) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
763 |
OLD_CXXFLAGS="$CXXFLAGS" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
764 |
CXXFLAGS="$CXXFLAGS -lstdc++" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
765 |
AC_LINK_IFELSE([AC_LANG_PROGRAM([], [return 0;])], |
20363 | 766 |
[has_dynamic_libstdcxx=yes], |
767 |
[has_dynamic_libstdcxx=no]) |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
768 |
CXXFLAGS="$OLD_CXXFLAGS" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
769 |
AC_LANG_POP(C++) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
770 |
AC_MSG_RESULT([$has_dynamic_libstdcxx]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
771 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
772 |
# Test if stdc++ can be linked statically. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
773 |
AC_MSG_CHECKING([if static link of stdc++ is possible]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
774 |
STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
775 |
AC_LANG_PUSH(C++) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
776 |
OLD_LIBS="$LIBS" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
777 |
OLD_CXX="$CXX" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
778 |
LIBS="$STATIC_STDCXX_FLAGS" |
20363 | 779 |
CXX="$CC" |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
780 |
AC_LINK_IFELSE([AC_LANG_PROGRAM([], [return 0;])], |
20363 | 781 |
[has_static_libstdcxx=yes], |
782 |
[has_static_libstdcxx=no]) |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
783 |
LIBS="$OLD_LIBS" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
784 |
CXX="$OLD_CXX" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
785 |
AC_LANG_POP(C++) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
786 |
AC_MSG_RESULT([$has_static_libstdcxx]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
787 |
|
14459
6213b3f9e08d
8001875: build-infra: We must be able to force static linking of stdc++
tbell
parents:
14280
diff
changeset
|
788 |
if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then |
20363 | 789 |
AC_MSG_ERROR([Cannot link to stdc++, neither dynamically nor statically!]) |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
790 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
791 |
|
14459
6213b3f9e08d
8001875: build-infra: We must be able to force static linking of stdc++
tbell
parents:
14280
diff
changeset
|
792 |
if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then |
20363 | 793 |
AC_MSG_ERROR([Static linking of libstdc++ was not possible!]) |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
794 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
795 |
|
14459
6213b3f9e08d
8001875: build-infra: We must be able to force static linking of stdc++
tbell
parents:
14280
diff
changeset
|
796 |
if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then |
20363 | 797 |
AC_MSG_ERROR([Dynamic linking of libstdc++ was not possible!]) |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
798 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
799 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
800 |
AC_MSG_CHECKING([how to link with libstdc++]) |
14459
6213b3f9e08d
8001875: build-infra: We must be able to force static linking of stdc++
tbell
parents:
14280
diff
changeset
|
801 |
# If dynamic was requested, it's available since it would fail above otherwise. |
6213b3f9e08d
8001875: build-infra: We must be able to force static linking of stdc++
tbell
parents:
14280
diff
changeset
|
802 |
# If dynamic wasn't requested, go with static unless it isn't available. |
16581
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
803 |
if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then |
20363 | 804 |
LIBCXX="$LIBCXX -lstdc++" |
805 |
LDCXX="$CXX" |
|
806 |
STATIC_CXX_SETTING="STATIC_CXX=false" |
|
807 |
AC_MSG_RESULT([dynamic]) |
|
14459
6213b3f9e08d
8001875: build-infra: We must be able to force static linking of stdc++
tbell
parents:
14280
diff
changeset
|
808 |
else |
20363 | 809 |
LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS" |
810 |
LDCXX="$CC" |
|
811 |
STATIC_CXX_SETTING="STATIC_CXX=true" |
|
812 |
AC_MSG_RESULT([static]) |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
813 |
fi |
20363 | 814 |
fi |
815 |
AC_SUBST(STATIC_CXX_SETTING) |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
816 |
|
20363 | 817 |
if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then |
16581
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
818 |
# Figure out LIBFFI_CFLAGS and LIBFFI_LIBS |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
819 |
PKG_CHECK_MODULES([LIBFFI], [libffi]) |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
820 |
|
20363 | 821 |
fi |
16581
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
822 |
|
20363 | 823 |
if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then |
16581
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
824 |
AC_CHECK_PROG([LLVM_CONFIG], [llvm-config], [llvm-config]) |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
825 |
|
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
826 |
if test "x$LLVM_CONFIG" != xllvm-config; then |
20363 | 827 |
AC_MSG_ERROR([llvm-config not found in $PATH.]) |
16581
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
828 |
fi |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
829 |
|
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
830 |
llvm_components="jit mcjit engine nativecodegen native" |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
831 |
unset LLVM_CFLAGS |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
832 |
for flag in $("$LLVM_CONFIG" --cxxflags); do |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
833 |
if echo "${flag}" | grep -q '^-@<:@ID@:>@'; then |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
834 |
if test "${flag}" != "-D_DEBUG" ; then |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
835 |
if test "${LLVM_CFLAGS}" != "" ; then |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
836 |
LLVM_CFLAGS="${LLVM_CFLAGS} " |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
837 |
fi |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
838 |
LLVM_CFLAGS="${LLVM_CFLAGS}${flag}" |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
839 |
fi |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
840 |
fi |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
841 |
done |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
842 |
llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//') |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
843 |
LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}" |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
844 |
|
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
845 |
unset LLVM_LDFLAGS |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
846 |
for flag in $("${LLVM_CONFIG}" --ldflags); do |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
847 |
if echo "${flag}" | grep -q '^-L'; then |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
848 |
if test "${LLVM_LDFLAGS}" != ""; then |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
849 |
LLVM_LDFLAGS="${LLVM_LDFLAGS} " |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
850 |
fi |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
851 |
LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}" |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
852 |
fi |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
853 |
done |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
854 |
|
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
855 |
unset LLVM_LIBS |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
856 |
for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
857 |
if echo "${flag}" | grep -q '^-l'; then |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
858 |
if test "${LLVM_LIBS}" != ""; then |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
859 |
LLVM_LIBS="${LLVM_LIBS} " |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
860 |
fi |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
861 |
LLVM_LIBS="${LLVM_LIBS}${flag}" |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
862 |
fi |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
863 |
done |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
864 |
|
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
865 |
AC_SUBST(LLVM_CFLAGS) |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
866 |
AC_SUBST(LLVM_LDFLAGS) |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
867 |
AC_SUBST(LLVM_LIBS) |
20363 | 868 |
fi |
16581
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
869 |
|
20363 | 870 |
# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so) |
871 |
if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then |
|
13697 | 872 |
LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1" |
20363 | 873 |
fi |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
874 |
|
20363 | 875 |
# TODO better (platform agnostic) test |
876 |
if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
877 |
LIBCXX="-lstdc++" |
20363 | 878 |
fi |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
879 |
|
20363 | 880 |
AC_SUBST(LIBCXX) |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
881 |
]) |