author | jiangli |
Thu, 22 Aug 2013 17:21:48 -0700 | |
changeset 19538 | d3d20902831f |
parent 18021 | 680b9b43e2d6 |
child 19524 | 51009a053562 |
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 |
[ |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
28 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
29 |
############################################################################### |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
30 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
31 |
# OS specific settings that we never will need to probe. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
32 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
33 |
if test "x$OPENJDK_TARGET_OS" = xlinux; then |
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]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
37 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
38 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
39 |
if test "x$OPENJDK_TARGET_OS" = xsolaris; then |
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]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
44 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
45 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
46 |
if test "x$OPENJDK_TARGET_OS" = xwindows; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
47 |
AC_MSG_CHECKING([what is not needed on Windows?]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
48 |
CUPS_NOT_NEEDED=yes |
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]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
53 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
54 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
55 |
if test "x$OPENJDK_TARGET_OS" = xmacosx; then |
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 |
FREETYPE2_NOT_NEEDED=yes |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
61 |
# 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
|
62 |
# This will be adjusted below. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
63 |
AC_MSG_RESULT([alsa pulse x11]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
64 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
65 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
66 |
if test "x$OPENJDK_TARGET_OS" = xbsd; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
67 |
AC_MSG_CHECKING([what is not needed on bsd?]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
68 |
ALSA_NOT_NEEDED=yes |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
69 |
AC_MSG_RESULT([alsa]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
70 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
71 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
72 |
if test "x$OPENJDK" = "xfalse"; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
73 |
FREETYPE2_NOT_NEEDED=yes |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
74 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
75 |
|
13697 | 76 |
if test "x$SUPPORT_HEADFUL" = xno; then |
77 |
X11_NOT_NEEDED=yes |
|
78 |
fi |
|
79 |
||
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
80 |
############################################################################### |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
81 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
82 |
# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
83 |
# that uses this API. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
84 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
85 |
AC_ARG_ENABLE([macosx-runtime-support], [AS_HELP_STRING([--disable-macosx-runtime-support], |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
86 |
[disable the use of MacOSX Java runtime support framework @<:@enabled@:>@])], |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
87 |
[MACOSX_RUNTIME_SUPPORT="${enableval}"],[MACOSX_RUNTIME_SUPPORT="no"]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
88 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
89 |
USE_MACOSX_RUNTIME_SUPPORT=no |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
90 |
AC_MSG_CHECKING([for explicit Java runtime support in the OS]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
91 |
if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
92 |
if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
93 |
MACOSX_RUNTIME_SUPPORT=yes |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
94 |
USE_MACOSX_RUNTIME_SUPPORT=yes |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
95 |
AC_MSG_RESULT([yes, does not need alsa freetype2 pulse and X11]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
96 |
else |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
97 |
AC_MSG_RESULT([yes, but explicitly disabled.]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
98 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
99 |
else |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
100 |
AC_MSG_RESULT([no]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
101 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
102 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
103 |
if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
104 |
AC_MSG_CHECKING([what is not needed on an X11 build on MacOSX?]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
105 |
X11_NOT_NEEDED= |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
106 |
FREETYPE2_NOT_NEEDED= |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
107 |
AC_MSG_RESULT([alsa pulse]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
108 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
109 |
]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
110 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
111 |
AC_DEFUN_ONCE([LIB_SETUP_X11], |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
112 |
[ |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
113 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
114 |
############################################################################### |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
115 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
116 |
# Check for X Windows |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
117 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
118 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
119 |
# Check if the user has specified sysroot, but not --x-includes or --x-libraries. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
120 |
# Make a simple check for the libraries at the sysroot, and setup --x-includes and |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
121 |
# --x-libraries for the sysroot, if that seems to be correct. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
122 |
if test "x$SYS_ROOT" != "x/"; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
123 |
if test "x$x_includes" = xNONE; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
124 |
if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
125 |
x_includes="$SYS_ROOT/usr/X11R6/include" |
18021 | 126 |
elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then |
127 |
x_includes="$SYS_ROOT/usr/include" |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
128 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
129 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
130 |
if test "x$x_libraries" = xNONE; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
131 |
if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
132 |
x_libraries="$SYS_ROOT/usr/X11R6/lib" |
18021 | 133 |
elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then |
134 |
x_libraries="$SYS_ROOT/usr/lib64" |
|
135 |
elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then |
|
136 |
x_libraries="$SYS_ROOT/usr/lib" |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
137 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
138 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
139 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
140 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
141 |
# Now let autoconf do it's magic |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
142 |
AC_PATH_X |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
143 |
AC_PATH_XTRA |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
144 |
|
15178
5b28a4d0f57d
8005855: build-infra: Remove -R flag when cross compiling
erikj
parents:
14459
diff
changeset
|
145 |
# AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling |
5b28a4d0f57d
8005855: build-infra: Remove -R flag when cross compiling
erikj
parents:
14459
diff
changeset
|
146 |
# this doesn't make sense so we remove it. |
5b28a4d0f57d
8005855: build-infra: Remove -R flag when cross compiling
erikj
parents:
14459
diff
changeset
|
147 |
if test "x$COMPILE_TYPE" = xcross; then |
5b28a4d0f57d
8005855: build-infra: Remove -R flag when cross compiling
erikj
parents:
14459
diff
changeset
|
148 |
X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[[^ ]]*//g'` |
5b28a4d0f57d
8005855: build-infra: Remove -R flag when cross compiling
erikj
parents:
14459
diff
changeset
|
149 |
fi |
5b28a4d0f57d
8005855: build-infra: Remove -R flag when cross compiling
erikj
parents:
14459
diff
changeset
|
150 |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
151 |
if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
152 |
HELP_MSG_MISSING_DEPENDENCY([x11]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
153 |
AC_MSG_ERROR([Could not find X11 libraries. $HELP_MSG]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
154 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
155 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
156 |
# Some of the old makefiles require a setting of OPENWIN_HOME |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
157 |
# Since the X11R6 directory has disappeared on later Linuxes, |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
158 |
# we need to probe for it. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
159 |
if test "x$OPENJDK_TARGET_OS" = xlinux; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
160 |
if test -d "$SYS_ROOT/usr/X11R6"; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
161 |
OPENWIN_HOME="$SYS_ROOT/usr/X11R6" |
18021 | 162 |
elif test -d "$SYS_ROOT/usr/include/X11"; then |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
163 |
OPENWIN_HOME="$SYS_ROOT/usr" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
164 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
165 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
166 |
if test "x$OPENJDK_TARGET_OS" = xsolaris; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
167 |
OPENWIN_HOME="/usr/openwin" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
168 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
169 |
AC_SUBST(OPENWIN_HOME) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
170 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
171 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
172 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
173 |
# Weird Sol10 something check...TODO change to try compile |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
174 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
175 |
if test "x${OPENJDK_TARGET_OS}" = xsolaris; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
176 |
if test "`uname -r`" = "5.10"; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
177 |
if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
178 |
X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
179 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
180 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
181 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
182 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
183 |
AC_LANG_PUSH(C) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
184 |
OLD_CFLAGS="$CFLAGS" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
185 |
CFLAGS="$CFLAGS $X_CFLAGS" |
14111 | 186 |
|
187 |
# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10 |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
188 |
AC_CHECK_HEADERS([X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h], |
14111 | 189 |
[X11_A_OK=yes], |
15915
caa9b4e63aab
8010277: Configure doesn't fail when Xrender.h is missing
omajid
parents:
15178
diff
changeset
|
190 |
[X11_A_OK=no; break], |
14111 | 191 |
[ # include <X11/Xlib.h> |
192 |
# include <X11/Xutil.h> |
|
193 |
]) |
|
194 |
||
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
195 |
CFLAGS="$OLD_CFLAGS" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
196 |
AC_LANG_POP(C) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
197 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
198 |
if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
199 |
HELP_MSG_MISSING_DEPENDENCY([x11]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
200 |
AC_MSG_ERROR([Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
201 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
202 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
203 |
AC_SUBST(X_CFLAGS) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
204 |
AC_SUBST(X_LIBS) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
205 |
]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
206 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
207 |
AC_DEFUN_ONCE([LIB_SETUP_CUPS], |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
208 |
[ |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
209 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
210 |
############################################################################### |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
211 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
212 |
# The common unix printing system cups is used to print from java. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
213 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
214 |
AC_ARG_WITH(cups, [AS_HELP_STRING([--with-cups], |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
215 |
[specify prefix directory for the cups package |
14111 | 216 |
(expecting the headers under PATH/include)])]) |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
217 |
AC_ARG_WITH(cups-include, [AS_HELP_STRING([--with-cups-include], |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
218 |
[specify directory for the cups include files])]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
219 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
220 |
if test "x$CUPS_NOT_NEEDED" = xyes; then |
14111 | 221 |
if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
222 |
AC_MSG_WARN([cups not used, so --with-cups is ignored]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
223 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
224 |
CUPS_CFLAGS= |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
225 |
else |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
226 |
CUPS_FOUND=no |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
227 |
|
14111 | 228 |
if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
229 |
AC_MSG_ERROR([It is not possible to disable the use of cups. Remove the --without-cups option.]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
230 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
231 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
232 |
if test "x${with_cups}" != x; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
233 |
CUPS_CFLAGS="-I${with_cups}/include" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
234 |
CUPS_FOUND=yes |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
235 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
236 |
if test "x${with_cups_include}" != x; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
237 |
CUPS_CFLAGS="-I${with_cups_include}" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
238 |
CUPS_FOUND=yes |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
239 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
240 |
if test "x$CUPS_FOUND" = xno; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
241 |
BDEPS_CHECK_MODULE(CUPS, cups, xxx, [CUPS_FOUND=yes]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
242 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
243 |
if test "x$CUPS_FOUND" = xno; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
244 |
# Are the cups headers installed in the default /usr/include location? |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
245 |
AC_CHECK_HEADERS([cups/cups.h cups/ppd.h], |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
246 |
[CUPS_FOUND=yes |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
247 |
CUPS_CFLAGS= |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
248 |
DEFAULT_CUPS=yes]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
249 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
250 |
if test "x$CUPS_FOUND" = xno; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
251 |
# Getting nervous now? Lets poke around for standard Solaris third-party |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
252 |
# package installation locations. |
14111 | 253 |
AC_MSG_CHECKING([for cups headers]) |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
254 |
if test -s /opt/sfw/cups/include/cups/cups.h; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
255 |
# An SFW package seems to be installed! |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
256 |
CUPS_FOUND=yes |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
257 |
CUPS_CFLAGS="-I/opt/sfw/cups/include" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
258 |
elif test -s /opt/csw/include/cups/cups.h; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
259 |
# A CSW package seems to be installed! |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
260 |
CUPS_FOUND=yes |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
261 |
CUPS_CFLAGS="-I/opt/csw/include" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
262 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
263 |
AC_MSG_RESULT([$CUPS_FOUND]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
264 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
265 |
if test "x$CUPS_FOUND" = xno; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
266 |
HELP_MSG_MISSING_DEPENDENCY([cups]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
267 |
AC_MSG_ERROR([Could not find cups! $HELP_MSG ]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
268 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
269 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
270 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
271 |
AC_SUBST(CUPS_CFLAGS) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
272 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
273 |
]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
274 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
275 |
AC_DEFUN_ONCE([LIB_SETUP_FREETYPE], |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
276 |
[ |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
277 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
278 |
############################################################################### |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
279 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
280 |
# The ubiquitous freetype2 library is used to render fonts. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
281 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
282 |
AC_ARG_WITH(freetype, [AS_HELP_STRING([--with-freetype], |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
283 |
[specify prefix directory for the freetype2 package |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
284 |
(expecting the libraries under PATH/lib and the headers under PATH/include)])]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
285 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
286 |
# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
287 |
USING_SYSTEM_FT_LIB=false |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
288 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
289 |
if test "x$FREETYPE2_NOT_NEEDED" = xyes; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
290 |
if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
291 |
AC_MSG_WARN([freetype not used, so --with-freetype is ignored]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
292 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
293 |
FREETYPE2_CFLAGS= |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
294 |
FREETYPE2_LIBS= |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
295 |
FREETYPE2_LIB_PATH= |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
296 |
else |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
297 |
FREETYPE2_FOUND=no |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
298 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
299 |
if test "x$with_freetype" != x; then |
14111 | 300 |
BASIC_FIXUP_PATH(with_freetype) |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
301 |
FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype" |
14111 | 302 |
FREETYPE2_LIB_PATH="$with_freetype/lib" |
303 |
if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then |
|
304 |
FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype" |
|
305 |
FREETYPE2_LIB_PATH="$with_freetype/lib/amd64" |
|
306 |
fi |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
307 |
if test "x$OPENJDK_TARGET_OS" = xwindows; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
308 |
FREETYPE2_LIBS="$with_freetype/lib/freetype.lib" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
309 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
310 |
FREETYPE2_CFLAGS="-I$with_freetype/include" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
311 |
if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
312 |
FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
313 |
fi |
14111 | 314 |
FREETYPE2_FOUND=yes |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
315 |
if test "x$FREETYPE2_FOUND" = xyes; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
316 |
# Verify that the directories exist |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
317 |
if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
318 |
AC_MSG_ERROR([Could not find the expected directories $with_freetype/lib and $with_freetype/include]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
319 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
320 |
# List the contents of the lib. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
321 |
FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null` |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
322 |
if test "x$FREETYPELIB" = x; then |
14111 | 323 |
AC_MSG_ERROR([Could not find libfreetype.so nor freetype.dll in $with_freetype/lib]) |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
324 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
325 |
# Check one h-file |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
326 |
if ! test -s "$with_freetype/include/ft2build.h"; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
327 |
AC_MSG_ERROR([Could not find $with_freetype/include/ft2build.h]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
328 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
329 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
330 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
331 |
if test "x$FREETYPE2_FOUND" = xno; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
332 |
BDEPS_CHECK_MODULE(FREETYPE2, freetype2, xxx, [FREETYPE2_FOUND=yes], [FREETYPE2_FOUND=no]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
333 |
USING_SYSTEM_FT_LIB=true |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
334 |
fi |
14111 | 335 |
if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then |
336 |
FREETYPELOCATION="$PROGRAMFILES/GnuWin32" |
|
337 |
BASIC_FIXUP_PATH(FREETYPELOCATION) |
|
338 |
AC_MSG_CHECKING([for freetype in some standard windows locations]) |
|
339 |
if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then |
|
340 |
FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include" |
|
341 |
FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib" |
|
342 |
FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib" |
|
343 |
if ! test -s "$FREETYPE2_LIBS"; then |
|
344 |
AC_MSG_ERROR([Could not find $FREETYPE2_LIBS]) |
|
345 |
fi |
|
346 |
if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then |
|
347 |
AC_MSG_ERROR([Could not find $FREETYPE2_LIB_PATH/freetype.dll]) |
|
348 |
fi |
|
349 |
USING_SYSTEM_FT_LIB=true |
|
350 |
FREETYPE2_FOUND=yes |
|
351 |
fi |
|
352 |
AC_MSG_RESULT([$FREETYPE2_FOUND]) |
|
353 |
fi |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
354 |
if test "x$FREETYPE2_FOUND" = xno; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
355 |
PKG_CHECK_MODULES(FREETYPE2, freetype2, [FREETYPE2_FOUND=yes], [FREETYPE2_FOUND=no]) |
14111 | 356 |
# On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us. |
357 |
FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'` |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
358 |
USING_SYSTEM_FT_LIB=true |
14111 | 359 |
# 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64 |
360 |
if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then |
|
361 |
FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'` |
|
362 |
fi |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
363 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
364 |
if test "x$FREETYPE2_FOUND" = xno; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
365 |
AC_MSG_CHECKING([for freetype in some standard locations]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
366 |
|
18021 | 367 |
if test -s $SYS_ROOT/usr/X11/include/ft2build.h && test -d $SYS_ROOT/usr/X11/include/freetype2/freetype; then |
368 |
DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/X11/include/freetype2 -I$SYS_ROOT/usr/X11/include" |
|
369 |
DEFAULT_FREETYPE_LIBS="-L$SYS_ROOT/usr/X11/lib -lfreetype" |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
370 |
fi |
18021 | 371 |
if test -s $SYS_ROOT/usr/include/ft2build.h && test -d $SYS_ROOT/usr/include/freetype2/freetype; then |
372 |
DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/include/freetype2" |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
373 |
DEFAULT_FREETYPE_LIBS="-lfreetype" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
374 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
375 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
376 |
PREV_CXXCFLAGS="$CXXFLAGS" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
377 |
PREV_LDFLAGS="$LDFLAGS" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
378 |
CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
379 |
LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
380 |
AC_LINK_IFELSE([AC_LANG_SOURCE([[#include<ft2build.h> |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
381 |
#include FT_FREETYPE_H |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
382 |
int main() { return 0; } |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
383 |
]])], |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
384 |
[ |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
385 |
# Yes, the default cflags and libs did the trick. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
386 |
FREETYPE2_FOUND=yes |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
387 |
FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
388 |
FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
389 |
], |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
390 |
[ |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
391 |
FREETYPE2_FOUND=no |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
392 |
]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
393 |
CXXCFLAGS="$PREV_CXXFLAGS" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
394 |
LDFLAGS="$PREV_LDFLAGS" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
395 |
AC_MSG_RESULT([$FREETYPE2_FOUND]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
396 |
USING_SYSTEM_FT_LIB=true |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
397 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
398 |
if test "x$FREETYPE2_FOUND" = xno; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
399 |
HELP_MSG_MISSING_DEPENDENCY([freetype2]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
400 |
AC_MSG_ERROR([Could not find freetype2! $HELP_MSG ]) |
14111 | 401 |
fi |
402 |
||
403 |
if test "x$OPENJDK_TARGET_OS" != xwindows; then |
|
404 |
# AC_CHECK_LIB does not support use of cl.exe |
|
405 |
PREV_LDFLAGS="$LDFLAGS" |
|
406 |
LDFLAGS="$FREETYPE2_LIBS" |
|
14280
7d8ad47b2dbf
8002220: build-infra: update for mac, solaris 11 issues
erikj
parents:
14111
diff
changeset
|
407 |
AC_CHECK_LIB(freetype, FT_Init_FreeType, |
7d8ad47b2dbf
8002220: build-infra: update for mac, solaris 11 issues
erikj
parents:
14111
diff
changeset
|
408 |
FREETYPE2_FOUND=true, |
7d8ad47b2dbf
8002220: build-infra: update for mac, solaris 11 issues
erikj
parents:
14111
diff
changeset
|
409 |
AC_MSG_ERROR([Could not find freetype2! $HELP_MSG ])) |
14111 | 410 |
LDFLAGS="$PREV_LDFLAGS" |
411 |
fi |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
412 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
413 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
414 |
AC_SUBST(USING_SYSTEM_FT_LIB) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
415 |
AC_SUBST(FREETYPE2_LIB_PATH) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
416 |
AC_SUBST(FREETYPE2_CFLAGS) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
417 |
AC_SUBST(FREETYPE2_LIBS) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
418 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
419 |
]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
420 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
421 |
AC_DEFUN_ONCE([LIB_SETUP_ALSA], |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
422 |
[ |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
423 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
424 |
############################################################################### |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
425 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
426 |
# Check for alsa headers and libraries. Used on Linux/GNU systems. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
427 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
428 |
AC_ARG_WITH(alsa, [AS_HELP_STRING([--with-alsa], |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
429 |
[specify prefix directory for the alsa package |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
430 |
(expecting the libraries under PATH/lib and the headers under PATH/include)])]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
431 |
AC_ARG_WITH(alsa-include, [AS_HELP_STRING([--with-alsa-include], |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
432 |
[specify directory for the alsa include files])]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
433 |
AC_ARG_WITH(alsa-lib, [AS_HELP_STRING([--with-alsa-lib], |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
434 |
[specify directory for the alsa library])]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
435 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
436 |
if test "x$ALSA_NOT_NEEDED" = xyes; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
437 |
if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
438 |
AC_MSG_WARN([alsa not used, so --with-alsa is ignored]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
439 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
440 |
ALSA_CFLAGS= |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
441 |
ALSA_LIBS= |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
442 |
else |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
443 |
ALSA_FOUND=no |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
444 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
445 |
if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
446 |
AC_MSG_ERROR([It is not possible to disable the use of alsa. Remove the --without-alsa option.]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
447 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
448 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
449 |
if test "x${with_alsa}" != x; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
450 |
ALSA_LIBS="-L${with_alsa}/lib -lalsa" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
451 |
ALSA_CFLAGS="-I${with_alsa}/include" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
452 |
ALSA_FOUND=yes |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
453 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
454 |
if test "x${with_alsa_include}" != x; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
455 |
ALSA_CFLAGS="-I${with_alsa_include}" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
456 |
ALSA_FOUND=yes |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
457 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
458 |
if test "x${with_alsa_lib}" != x; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
459 |
ALSA_LIBS="-L${with_alsa_lib} -lalsa" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
460 |
ALSA_FOUND=yes |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
461 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
462 |
if test "x$ALSA_FOUND" = xno; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
463 |
BDEPS_CHECK_MODULE(ALSA, alsa, xxx, [ALSA_FOUND=yes], [ALSA_FOUND=no]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
464 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
465 |
if test "x$ALSA_FOUND" = xno; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
466 |
PKG_CHECK_MODULES(ALSA, alsa, [ALSA_FOUND=yes], [ALSA_FOUND=no]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
467 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
468 |
if test "x$ALSA_FOUND" = xno; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
469 |
AC_CHECK_HEADERS([alsa/asoundlib.h], |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
470 |
[ALSA_FOUND=yes |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
471 |
ALSA_CFLAGS=-Iignoreme |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
472 |
ALSA_LIBS=-lasound |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
473 |
DEFAULT_ALSA=yes], |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
474 |
[ALSA_FOUND=no]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
475 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
476 |
if test "x$ALSA_FOUND" = xno; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
477 |
HELP_MSG_MISSING_DEPENDENCY([alsa]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
478 |
AC_MSG_ERROR([Could not find alsa! $HELP_MSG ]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
479 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
480 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
481 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
482 |
AC_SUBST(ALSA_CFLAGS) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
483 |
AC_SUBST(ALSA_LIBS) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
484 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
485 |
]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
486 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
487 |
AC_DEFUN_ONCE([LIB_SETUP_MISC_LIBS], |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
488 |
[ |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
489 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
490 |
############################################################################### |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
491 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
492 |
# Check for the jpeg library |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
493 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
494 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
495 |
USE_EXTERNAL_LIBJPEG=true |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
496 |
AC_CHECK_LIB(jpeg, main, [], |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
497 |
[ USE_EXTERNAL_LIBJPEG=false |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
498 |
AC_MSG_NOTICE([Will use jpeg decoder bundled with the OpenJDK source]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
499 |
]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
500 |
AC_SUBST(USE_EXTERNAL_LIBJPEG) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
501 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
502 |
############################################################################### |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
503 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
504 |
# Check for the gif library |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
505 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
506 |
|
16424 | 507 |
AC_ARG_WITH(giflib, [AS_HELP_STRING([--with-giflib], |
508 |
[use giflib from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])]) |
|
509 |
||
510 |
||
511 |
AC_MSG_CHECKING([for which giflib to use]) |
|
512 |
||
513 |
# default is bundled |
|
514 |
DEFAULT_GIFLIB=bundled |
|
515 |
||
516 |
# |
|
517 |
# if user didn't specify, use DEFAULT_GIFLIB |
|
518 |
# |
|
519 |
if test "x${with_giflib}" = "x"; then |
|
520 |
with_giflib=${DEFAULT_GIFLIB} |
|
521 |
fi |
|
522 |
||
523 |
AC_MSG_RESULT(${with_giflib}) |
|
524 |
||
525 |
if test "x${with_giflib}" = "xbundled"; then |
|
526 |
USE_EXTERNAL_LIBGIF=false |
|
527 |
elif test "x${with_giflib}" = "xsystem"; then |
|
528 |
AC_CHECK_HEADER(gif_lib.h, [], |
|
529 |
[ AC_MSG_ERROR([--with-giflib=system specified, but gif_lib.h not found!])]) |
|
530 |
AC_CHECK_LIB(gif, DGifGetCode, [], |
|
531 |
[ AC_MSG_ERROR([--with-giflib=system specified, but no giflib found!])]) |
|
532 |
||
533 |
USE_EXTERNAL_LIBGIF=true |
|
534 |
else |
|
535 |
AC_MSG_ERROR([Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled']) |
|
536 |
fi |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
537 |
AC_SUBST(USE_EXTERNAL_LIBGIF) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
538 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
539 |
############################################################################### |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
540 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
541 |
# Check for the zlib library |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
542 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
543 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
544 |
AC_ARG_WITH(zlib, [AS_HELP_STRING([--with-zlib], |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
545 |
[use zlib from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
546 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
547 |
AC_CHECK_LIB(z, compress, |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
548 |
[ ZLIB_FOUND=yes ], |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
549 |
[ ZLIB_FOUND=no ]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
550 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
551 |
AC_MSG_CHECKING([for which zlib to use]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
552 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
553 |
DEFAULT_ZLIB=bundled |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
554 |
if test "x$OPENJDK_TARGET_OS" = xmacosx; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
555 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
556 |
# On macosx default is system...on others default is |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
557 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
558 |
DEFAULT_ZLIB=system |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
559 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
560 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
561 |
if test "x${ZLIB_FOUND}" != "xyes"; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
562 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
563 |
# If we don't find any system...set default to bundled |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
564 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
565 |
DEFAULT_ZLIB=bundled |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
566 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
567 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
568 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
569 |
# If user didn't specify, use DEFAULT_ZLIB |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
570 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
571 |
if test "x${with_zlib}" = "x"; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
572 |
with_zlib=${DEFAULT_ZLIB} |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
573 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
574 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
575 |
if test "x${with_zlib}" = "xbundled"; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
576 |
USE_EXTERNAL_LIBZ=false |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
577 |
AC_MSG_RESULT([bundled]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
578 |
elif test "x${with_zlib}" = "xsystem"; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
579 |
if test "x${ZLIB_FOUND}" = "xyes"; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
580 |
USE_EXTERNAL_LIBZ=true |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
581 |
AC_MSG_RESULT([system]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
582 |
else |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
583 |
AC_MSG_RESULT([system not found]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
584 |
AC_MSG_ERROR([--with-zlib=system specified, but no zlib found!]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
585 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
586 |
else |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
587 |
AC_MSG_ERROR([Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled']) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
588 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
589 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
590 |
AC_SUBST(USE_EXTERNAL_LIBZ) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
591 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
592 |
############################################################################### |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
593 |
LIBZIP_CAN_USE_MMAP=true |
13697 | 594 |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
595 |
AC_SUBST(LIBZIP_CAN_USE_MMAP) |
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 |
############################################################################### |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
598 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
599 |
# Check if altzone exists in time.h |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
600 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
601 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
602 |
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <time.h>], [return (int)altzone;])], |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
603 |
[has_altzone=yes], |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
604 |
[has_altzone=no]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
605 |
if test "x$has_altzone" = xyes; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
606 |
AC_DEFINE([HAVE_ALTZONE], 1, [Define if you have the external 'altzone' variable in time.h]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
607 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
608 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
609 |
############################################################################### |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
610 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
611 |
# Check the maths library |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
612 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
613 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
614 |
AC_CHECK_LIB(m, cos, [], |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
615 |
[ |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
616 |
AC_MSG_NOTICE([Maths library was not found]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
617 |
]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
618 |
AC_SUBST(LIBM) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
619 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
620 |
############################################################################### |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
621 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
622 |
# Check for libdl.so |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
623 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
624 |
save_LIBS="$LIBS" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
625 |
LIBS="" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
626 |
AC_CHECK_LIB(dl,dlopen) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
627 |
LIBDL="$LIBS" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
628 |
AC_SUBST(LIBDL) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
629 |
LIBS="$save_LIBS" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
630 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
631 |
]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
632 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
633 |
AC_DEFUN_ONCE([LIB_SETUP_STATIC_LINK_LIBSTDCPP], |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
634 |
[ |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
635 |
############################################################################### |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
636 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
637 |
# statically link libstdc++ before C++ ABI is stablized on Linux unless |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
638 |
# dynamic build is configured on command line. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
639 |
# |
14459
6213b3f9e08d
8001875: build-infra: We must be able to force static linking of stdc++
tbell
parents:
14280
diff
changeset
|
640 |
AC_ARG_WITH([stdc++lib], [AS_HELP_STRING([--with-stdc++lib=<static>,<dynamic>,<default>], |
6213b3f9e08d
8001875: build-infra: We must be able to force static linking of stdc++
tbell
parents:
14280
diff
changeset
|
641 |
[force linking of the C++ runtime on Linux to either static or dynamic, default is static with dynamic as fallback])], |
6213b3f9e08d
8001875: build-infra: We must be able to force static linking of stdc++
tbell
parents:
14280
diff
changeset
|
642 |
[ |
6213b3f9e08d
8001875: build-infra: We must be able to force static linking of stdc++
tbell
parents:
14280
diff
changeset
|
643 |
if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \ |
6213b3f9e08d
8001875: build-infra: We must be able to force static linking of stdc++
tbell
parents:
14280
diff
changeset
|
644 |
&& test "x$with_stdc__lib" != xdefault; then |
6213b3f9e08d
8001875: build-infra: We must be able to force static linking of stdc++
tbell
parents:
14280
diff
changeset
|
645 |
AC_MSG_ERROR([Bad parameter value --with-stdc++lib=$with_stdc__lib!]) |
6213b3f9e08d
8001875: build-infra: We must be able to force static linking of stdc++
tbell
parents:
14280
diff
changeset
|
646 |
fi |
6213b3f9e08d
8001875: build-infra: We must be able to force static linking of stdc++
tbell
parents:
14280
diff
changeset
|
647 |
], |
6213b3f9e08d
8001875: build-infra: We must be able to force static linking of stdc++
tbell
parents:
14280
diff
changeset
|
648 |
[with_stdc__lib=default] |
6213b3f9e08d
8001875: build-infra: We must be able to force static linking of stdc++
tbell
parents:
14280
diff
changeset
|
649 |
) |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
650 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
651 |
if test "x$OPENJDK_TARGET_OS" = xlinux; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
652 |
# Test if -lstdc++ works. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
653 |
AC_MSG_CHECKING([if dynamic link of stdc++ is possible]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
654 |
AC_LANG_PUSH(C++) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
655 |
OLD_CXXFLAGS="$CXXFLAGS" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
656 |
CXXFLAGS="$CXXFLAGS -lstdc++" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
657 |
AC_LINK_IFELSE([AC_LANG_PROGRAM([], [return 0;])], |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
658 |
[has_dynamic_libstdcxx=yes], |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
659 |
[has_dynamic_libstdcxx=no]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
660 |
CXXFLAGS="$OLD_CXXFLAGS" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
661 |
AC_LANG_POP(C++) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
662 |
AC_MSG_RESULT([$has_dynamic_libstdcxx]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
663 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
664 |
# Test if stdc++ can be linked statically. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
665 |
AC_MSG_CHECKING([if static link of stdc++ is possible]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
666 |
STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
667 |
AC_LANG_PUSH(C++) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
668 |
OLD_LIBS="$LIBS" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
669 |
OLD_CXX="$CXX" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
670 |
LIBS="$STATIC_STDCXX_FLAGS" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
671 |
CXX="$CC" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
672 |
AC_LINK_IFELSE([AC_LANG_PROGRAM([], [return 0;])], |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
673 |
[has_static_libstdcxx=yes], |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
674 |
[has_static_libstdcxx=no]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
675 |
LIBS="$OLD_LIBS" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
676 |
CXX="$OLD_CXX" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
677 |
AC_LANG_POP(C++) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
678 |
AC_MSG_RESULT([$has_static_libstdcxx]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
679 |
|
14459
6213b3f9e08d
8001875: build-infra: We must be able to force static linking of stdc++
tbell
parents:
14280
diff
changeset
|
680 |
if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then |
6213b3f9e08d
8001875: build-infra: We must be able to force static linking of stdc++
tbell
parents:
14280
diff
changeset
|
681 |
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
|
682 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
683 |
|
14459
6213b3f9e08d
8001875: build-infra: We must be able to force static linking of stdc++
tbell
parents:
14280
diff
changeset
|
684 |
if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then |
6213b3f9e08d
8001875: build-infra: We must be able to force static linking of stdc++
tbell
parents:
14280
diff
changeset
|
685 |
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
|
686 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
687 |
|
14459
6213b3f9e08d
8001875: build-infra: We must be able to force static linking of stdc++
tbell
parents:
14280
diff
changeset
|
688 |
if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then |
6213b3f9e08d
8001875: build-infra: We must be able to force static linking of stdc++
tbell
parents:
14280
diff
changeset
|
689 |
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
|
690 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
691 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
692 |
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
|
693 |
# 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
|
694 |
# 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
|
695 |
if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then |
14459
6213b3f9e08d
8001875: build-infra: We must be able to force static linking of stdc++
tbell
parents:
14280
diff
changeset
|
696 |
LIBCXX="$LIBCXX -lstdc++" |
6213b3f9e08d
8001875: build-infra: We must be able to force static linking of stdc++
tbell
parents:
14280
diff
changeset
|
697 |
LDCXX="$CXX" |
6213b3f9e08d
8001875: build-infra: We must be able to force static linking of stdc++
tbell
parents:
14280
diff
changeset
|
698 |
STATIC_CXX_SETTING="STATIC_CXX=false" |
6213b3f9e08d
8001875: build-infra: We must be able to force static linking of stdc++
tbell
parents:
14280
diff
changeset
|
699 |
AC_MSG_RESULT([dynamic]) |
6213b3f9e08d
8001875: build-infra: We must be able to force static linking of stdc++
tbell
parents:
14280
diff
changeset
|
700 |
else |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
701 |
LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
702 |
LDCXX="$CC" |
14111 | 703 |
STATIC_CXX_SETTING="STATIC_CXX=true" |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
704 |
AC_MSG_RESULT([static]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
705 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
706 |
fi |
14111 | 707 |
AC_SUBST(STATIC_CXX_SETTING) |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
708 |
|
16581
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
709 |
if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
710 |
# Figure out LIBFFI_CFLAGS and LIBFFI_LIBS |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
711 |
PKG_CHECK_MODULES([LIBFFI], [libffi]) |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
712 |
|
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
713 |
fi |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
714 |
|
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
715 |
if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
716 |
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
|
717 |
|
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
718 |
if test "x$LLVM_CONFIG" != xllvm-config; then |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
719 |
AC_MSG_ERROR([llvm-config not found in $PATH.]) |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
720 |
fi |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
721 |
|
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
722 |
llvm_components="jit mcjit engine nativecodegen native" |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
723 |
unset LLVM_CFLAGS |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
724 |
for flag in $("$LLVM_CONFIG" --cxxflags); do |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
725 |
if echo "${flag}" | grep -q '^-@<:@ID@:>@'; then |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
726 |
if test "${flag}" != "-D_DEBUG" ; then |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
727 |
if test "${LLVM_CFLAGS}" != "" ; then |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
728 |
LLVM_CFLAGS="${LLVM_CFLAGS} " |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
729 |
fi |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
730 |
LLVM_CFLAGS="${LLVM_CFLAGS}${flag}" |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
731 |
fi |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
732 |
fi |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
733 |
done |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
734 |
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
|
735 |
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
|
736 |
|
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
737 |
unset LLVM_LDFLAGS |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
738 |
for flag in $("${LLVM_CONFIG}" --ldflags); do |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
739 |
if echo "${flag}" | grep -q '^-L'; then |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
740 |
if test "${LLVM_LDFLAGS}" != ""; then |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
741 |
LLVM_LDFLAGS="${LLVM_LDFLAGS} " |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
742 |
fi |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
743 |
LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}" |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
744 |
fi |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
745 |
done |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
746 |
|
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
747 |
unset LLVM_LIBS |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
748 |
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
|
749 |
if echo "${flag}" | grep -q '^-l'; then |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
750 |
if test "${LLVM_LIBS}" != ""; then |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
751 |
LLVM_LIBS="${LLVM_LIBS} " |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
752 |
fi |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
753 |
LLVM_LIBS="${LLVM_LIBS}${flag}" |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
754 |
fi |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
755 |
done |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
756 |
|
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
757 |
AC_SUBST(LLVM_CFLAGS) |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
758 |
AC_SUBST(LLVM_LDFLAGS) |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
759 |
AC_SUBST(LLVM_LIBS) |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
760 |
fi |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
761 |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
762 |
# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
763 |
if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then |
13697 | 764 |
LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1" |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
765 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
766 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
767 |
# TODO better (platform agnostic) test |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
768 |
if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
769 |
LIBCXX="-lstdc++" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
770 |
fi |
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 |
AC_SUBST(LIBCXX) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
773 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
774 |
]) |