author | darcy |
Fri, 13 Jan 2017 19:29:55 -0800 | |
changeset 43147 | 823bfbf9e914 |
parent 42532 | 4780f4130eb0 |
child 46191 | 7ec14435e850 |
permissions | -rw-r--r-- |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
1 |
# |
36050
f6590b6e5e97
8150203: Incremental update from build-infra project
ihse
parents:
35370
diff
changeset
|
2 |
# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
3 |
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
4 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
5 |
# This code is free software; you can redistribute it and/or modify it |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
6 |
# under the terms of the GNU General Public License version 2 only, as |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
7 |
# published by the Free Software Foundation. Oracle designates this |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
8 |
# particular file as subject to the "Classpath" exception as provided |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
9 |
# by Oracle in the LICENSE file that accompanied this code. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
10 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
11 |
# This code is distributed in the hope that it will be useful, but WITHOUT |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
12 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
13 |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
14 |
# version 2 for more details (a copy is included in the LICENSE file that |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
15 |
# accompanied this code). |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
16 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
17 |
# You should have received a copy of the GNU General Public License version |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
18 |
# 2 along with this work; if not, write to the Free Software Foundation, |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
19 |
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
20 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
21 |
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
22 |
# or visit www.oracle.com if you need additional information or have any |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
23 |
# questions. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
24 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
25 |
|
32921
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
26 |
# Major library component reside in separate files. |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
27 |
m4_include([lib-alsa.m4]) |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
28 |
m4_include([lib-bundled.m4]) |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
29 |
m4_include([lib-cups.m4]) |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
30 |
m4_include([lib-ffi.m4]) |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
31 |
m4_include([lib-freetype.m4]) |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
32 |
m4_include([lib-std.m4]) |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
33 |
m4_include([lib-x11.m4]) |
42532 | 34 |
m4_include([lib-elf.m4]) |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
35 |
|
32921
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
36 |
################################################################################ |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
37 |
# Determine which libraries are needed for this configuration |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
38 |
################################################################################ |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
39 |
AC_DEFUN_ONCE([LIB_DETERMINE_DEPENDENCIES], |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
40 |
[ |
32921
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
41 |
# Check if X11 is needed |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
42 |
if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
43 |
# No X11 support on windows or macosx |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
44 |
NEEDS_LIB_X11=false |
20363 | 45 |
else |
41046 | 46 |
# All other instances need X11, even if building headless only, libawt still |
47 |
# needs X11 headers. |
|
48 |
NEEDS_LIB_X11=true |
|
20363 | 49 |
fi |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
50 |
|
32921
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
51 |
# Check if cups is needed |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
52 |
if test "x$OPENJDK_TARGET_OS" = xwindows; then |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
53 |
# Windows have a separate print system |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
54 |
NEEDS_LIB_CUPS=false |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
55 |
else |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
56 |
NEEDS_LIB_CUPS=true |
26400
4d6c6f2df610
8057538: Build the freetype library during configure on Windows
simonis
parents:
25039
diff
changeset
|
57 |
fi |
4d6c6f2df610
8057538: Build the freetype library during configure on Windows
simonis
parents:
25039
diff
changeset
|
58 |
|
39384
adde8cb7d01b
8003593: build-infra: Paths to optional platform-specific files should not be hardwired to src/closed
erikj
parents:
39194
diff
changeset
|
59 |
# A custom hook may have set this already |
adde8cb7d01b
8003593: build-infra: Paths to optional platform-specific files should not be hardwired to src/closed
erikj
parents:
39194
diff
changeset
|
60 |
if test "x$NEEDS_LIB_FREETYPE" = "x"; then |
32921
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
61 |
NEEDS_LIB_FREETYPE=true |
27331
3947187af23d
8062816: Fix configure freetype detection on Mac OS X Yosemite
ihse
parents:
27330
diff
changeset
|
62 |
fi |
27595
cff167b3bfa2
8065914: Various improvements and cleanup of build system
ihse
parents:
27331
diff
changeset
|
63 |
|
32921
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
64 |
# Check if alsa is needed |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
65 |
if test "x$OPENJDK_TARGET_OS" = xlinux; then |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
66 |
NEEDS_LIB_ALSA=true |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
67 |
else |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
68 |
NEEDS_LIB_ALSA=false |
20654 | 69 |
fi |
70 |
||
32921
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
71 |
# Check if ffi is needed |
37402 | 72 |
if HOTSPOT_CHECK_JVM_VARIANT(zero) || HOTSPOT_CHECK_JVM_VARIANT(zeroshark); then |
32921
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
73 |
NEEDS_LIB_FFI=true |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
74 |
else |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
75 |
NEEDS_LIB_FFI=false |
20654 | 76 |
fi |
77 |
]) |
|
78 |
||
32921
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
79 |
################################################################################ |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
80 |
# Parse library options, and setup needed libraries |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
81 |
################################################################################ |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
82 |
AC_DEFUN_ONCE([LIB_SETUP_LIBRARIES], |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
83 |
[ |
32921
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
84 |
LIB_SETUP_STD_LIBS |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
85 |
LIB_SETUP_X11 |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
86 |
LIB_SETUP_CUPS |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
87 |
LIB_SETUP_FREETYPE |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
88 |
LIB_SETUP_ALSA |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
89 |
LIB_SETUP_LIBFFI |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
90 |
LIB_SETUP_LLVM |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
91 |
LIB_SETUP_BUNDLED_LIBS |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
92 |
LIB_SETUP_MISC_LIBS |
37967
8dd54c3bf02a
8148244: Finalize and integrate GTest implementation
iignatyev
parents:
37402
diff
changeset
|
93 |
LIB_SETUP_SOLARIS_STLPORT |
42532 | 94 |
LIB_SETUP_LIBELF |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
95 |
]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
96 |
|
32921
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
97 |
################################################################################ |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
98 |
# Setup llvm (Low-Level VM) |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
99 |
################################################################################ |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
100 |
AC_DEFUN_ONCE([LIB_SETUP_LLVM], |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
101 |
[ |
37402 | 102 |
if HOTSPOT_CHECK_JVM_VARIANT(zeroshark); then |
16581
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
103 |
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
|
104 |
|
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
105 |
if test "x$LLVM_CONFIG" != xllvm-config; then |
20363 | 106 |
AC_MSG_ERROR([llvm-config not found in $PATH.]) |
16581
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
107 |
fi |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
108 |
|
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
109 |
llvm_components="jit mcjit engine nativecodegen native" |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
110 |
unset LLVM_CFLAGS |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
111 |
for flag in $("$LLVM_CONFIG" --cxxflags); do |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
112 |
if echo "${flag}" | grep -q '^-@<:@ID@:>@'; then |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
113 |
if test "${flag}" != "-D_DEBUG" ; then |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
114 |
if test "${LLVM_CFLAGS}" != "" ; then |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
115 |
LLVM_CFLAGS="${LLVM_CFLAGS} " |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
116 |
fi |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
117 |
LLVM_CFLAGS="${LLVM_CFLAGS}${flag}" |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
118 |
fi |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
119 |
fi |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
120 |
done |
38843
2b141e8e916f
8158535: Configure script uses basic tools directly in many places
erikj
parents:
37967
diff
changeset
|
121 |
llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//') |
16581
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
122 |
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
|
123 |
|
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
124 |
unset LLVM_LDFLAGS |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
125 |
for flag in $("${LLVM_CONFIG}" --ldflags); do |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
126 |
if echo "${flag}" | grep -q '^-L'; then |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
127 |
if test "${LLVM_LDFLAGS}" != ""; then |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
128 |
LLVM_LDFLAGS="${LLVM_LDFLAGS} " |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
129 |
fi |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
130 |
LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}" |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
131 |
fi |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
132 |
done |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
133 |
|
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
134 |
unset LLVM_LIBS |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
135 |
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
|
136 |
if echo "${flag}" | grep -q '^-l'; then |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
137 |
if test "${LLVM_LIBS}" != ""; then |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
138 |
LLVM_LIBS="${LLVM_LIBS} " |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
139 |
fi |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
140 |
LLVM_LIBS="${LLVM_LIBS}${flag}" |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
141 |
fi |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
142 |
done |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
143 |
|
35370
f9b430645a18
8148120: Incremental update from build-infra project
ihse
parents:
32921
diff
changeset
|
144 |
# Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not |
f9b430645a18
8148120: Incremental update from build-infra project
ihse
parents:
32921
diff
changeset
|
145 |
# always properly detect -ltinfo |
f9b430645a18
8148120: Incremental update from build-infra project
ihse
parents:
32921
diff
changeset
|
146 |
LLVM_LIBS="${LLVM_LIBS} -ltinfo" |
f9b430645a18
8148120: Incremental update from build-infra project
ihse
parents:
32921
diff
changeset
|
147 |
|
16581
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
148 |
AC_SUBST(LLVM_CFLAGS) |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
149 |
AC_SUBST(LLVM_LDFLAGS) |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
16424
diff
changeset
|
150 |
AC_SUBST(LLVM_LIBS) |
20363 | 151 |
fi |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
152 |
]) |
22721
63761da45392
8034788: Rewrite toolchain.m4 to support multiple toolchains per platform.
ihse
parents:
22710
diff
changeset
|
153 |
|
32921
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
154 |
################################################################################ |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
155 |
# Setup various libraries, typically small system libraries |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
156 |
################################################################################ |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
157 |
AC_DEFUN_ONCE([LIB_SETUP_MISC_LIBS], |
22721
63761da45392
8034788: Rewrite toolchain.m4 to support multiple toolchains per platform.
ihse
parents:
22710
diff
changeset
|
158 |
[ |
32921
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
159 |
# Setup libm (the maths library) |
36050
f6590b6e5e97
8150203: Incremental update from build-infra project
ihse
parents:
35370
diff
changeset
|
160 |
if test "x$OPENJDK_TARGET_OS" != "xwindows"; then |
f6590b6e5e97
8150203: Incremental update from build-infra project
ihse
parents:
35370
diff
changeset
|
161 |
AC_CHECK_LIB(m, cos, [], [ |
f6590b6e5e97
8150203: Incremental update from build-infra project
ihse
parents:
35370
diff
changeset
|
162 |
AC_MSG_NOTICE([Maths library was not found]) |
f6590b6e5e97
8150203: Incremental update from build-infra project
ihse
parents:
35370
diff
changeset
|
163 |
]) |
f6590b6e5e97
8150203: Incremental update from build-infra project
ihse
parents:
35370
diff
changeset
|
164 |
LIBM="-lm" |
f6590b6e5e97
8150203: Incremental update from build-infra project
ihse
parents:
35370
diff
changeset
|
165 |
else |
f6590b6e5e97
8150203: Incremental update from build-infra project
ihse
parents:
35370
diff
changeset
|
166 |
LIBM="" |
f6590b6e5e97
8150203: Incremental update from build-infra project
ihse
parents:
35370
diff
changeset
|
167 |
fi |
32921
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
168 |
AC_SUBST(LIBM) |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
169 |
|
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
170 |
# Setup libdl (for dynamic library loading) |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
171 |
save_LIBS="$LIBS" |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
172 |
LIBS="" |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
173 |
AC_CHECK_LIB(dl, dlopen) |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
174 |
LIBDL="$LIBS" |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
175 |
AC_SUBST(LIBDL) |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
176 |
LIBS="$save_LIBS" |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
177 |
|
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
178 |
# Deprecated libraries, keep the flags for backwards compatibility |
22721
63761da45392
8034788: Rewrite toolchain.m4 to support multiple toolchains per platform.
ihse
parents:
22710
diff
changeset
|
179 |
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then |
63761da45392
8034788: Rewrite toolchain.m4 to support multiple toolchains per platform.
ihse
parents:
22710
diff
changeset
|
180 |
BASIC_DEPRECATED_ARG_WITH([dxsdk]) |
63761da45392
8034788: Rewrite toolchain.m4 to support multiple toolchains per platform.
ihse
parents:
22710
diff
changeset
|
181 |
BASIC_DEPRECATED_ARG_WITH([dxsdk-lib]) |
63761da45392
8034788: Rewrite toolchain.m4 to support multiple toolchains per platform.
ihse
parents:
22710
diff
changeset
|
182 |
BASIC_DEPRECATED_ARG_WITH([dxsdk-include]) |
63761da45392
8034788: Rewrite toolchain.m4 to support multiple toolchains per platform.
ihse
parents:
22710
diff
changeset
|
183 |
fi |
32921
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
184 |
|
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
185 |
# Control if libzip can use mmap. Available for purposes of overriding. |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
186 |
LIBZIP_CAN_USE_MMAP=true |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
187 |
AC_SUBST(LIBZIP_CAN_USE_MMAP) |
22721
63761da45392
8034788: Rewrite toolchain.m4 to support multiple toolchains per platform.
ihse
parents:
22710
diff
changeset
|
188 |
]) |
37967
8dd54c3bf02a
8148244: Finalize and integrate GTest implementation
iignatyev
parents:
37402
diff
changeset
|
189 |
|
8dd54c3bf02a
8148244: Finalize and integrate GTest implementation
iignatyev
parents:
37402
diff
changeset
|
190 |
################################################################################ |
8dd54c3bf02a
8148244: Finalize and integrate GTest implementation
iignatyev
parents:
37402
diff
changeset
|
191 |
# libstlport.so.1 is needed for running gtest on Solaris. Find it to |
8dd54c3bf02a
8148244: Finalize and integrate GTest implementation
iignatyev
parents:
37402
diff
changeset
|
192 |
# redistribute it in the test image. |
8dd54c3bf02a
8148244: Finalize and integrate GTest implementation
iignatyev
parents:
37402
diff
changeset
|
193 |
################################################################################ |
8dd54c3bf02a
8148244: Finalize and integrate GTest implementation
iignatyev
parents:
37402
diff
changeset
|
194 |
AC_DEFUN_ONCE([LIB_SETUP_SOLARIS_STLPORT], |
8dd54c3bf02a
8148244: Finalize and integrate GTest implementation
iignatyev
parents:
37402
diff
changeset
|
195 |
[ |
39193
7f9e6818a957
8158763: --disable-hotspot-gtest not working on Solaris
simonis
parents:
37967
diff
changeset
|
196 |
if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then |
37967
8dd54c3bf02a
8148244: Finalize and integrate GTest implementation
iignatyev
parents:
37402
diff
changeset
|
197 |
# Find the root of the Solaris Studio installation from the compiler path |
8dd54c3bf02a
8148244: Finalize and integrate GTest implementation
iignatyev
parents:
37402
diff
changeset
|
198 |
SOLARIS_STUDIO_DIR="$(dirname $CC)/.." |
8dd54c3bf02a
8148244: Finalize and integrate GTest implementation
iignatyev
parents:
37402
diff
changeset
|
199 |
STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1" |
8dd54c3bf02a
8148244: Finalize and integrate GTest implementation
iignatyev
parents:
37402
diff
changeset
|
200 |
AC_MSG_CHECKING([for libstlport.so.1]) |
39193
7f9e6818a957
8158763: --disable-hotspot-gtest not working on Solaris
simonis
parents:
37967
diff
changeset
|
201 |
if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then |
7f9e6818a957
8158763: --disable-hotspot-gtest not working on Solaris
simonis
parents:
37967
diff
changeset
|
202 |
# SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9' |
7f9e6818a957
8158763: --disable-hotspot-gtest not working on Solaris
simonis
parents:
37967
diff
changeset
|
203 |
STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1" |
7f9e6818a957
8158763: --disable-hotspot-gtest not working on Solaris
simonis
parents:
37967
diff
changeset
|
204 |
fi |
37967
8dd54c3bf02a
8148244: Finalize and integrate GTest implementation
iignatyev
parents:
37402
diff
changeset
|
205 |
if test -f "$STLPORT_LIB"; then |
8dd54c3bf02a
8148244: Finalize and integrate GTest implementation
iignatyev
parents:
37402
diff
changeset
|
206 |
AC_MSG_RESULT([yes, $STLPORT_LIB]) |
8dd54c3bf02a
8148244: Finalize and integrate GTest implementation
iignatyev
parents:
37402
diff
changeset
|
207 |
BASIC_FIXUP_PATH([STLPORT_LIB]) |
8dd54c3bf02a
8148244: Finalize and integrate GTest implementation
iignatyev
parents:
37402
diff
changeset
|
208 |
else |
8dd54c3bf02a
8148244: Finalize and integrate GTest implementation
iignatyev
parents:
37402
diff
changeset
|
209 |
AC_MSG_RESULT([no, not found at $STLPORT_LIB]) |
8dd54c3bf02a
8148244: Finalize and integrate GTest implementation
iignatyev
parents:
37402
diff
changeset
|
210 |
AC_MSG_ERROR([Failed to find libstlport.so.1, cannot build Hotspot gtests]) |
8dd54c3bf02a
8148244: Finalize and integrate GTest implementation
iignatyev
parents:
37402
diff
changeset
|
211 |
fi |
8dd54c3bf02a
8148244: Finalize and integrate GTest implementation
iignatyev
parents:
37402
diff
changeset
|
212 |
AC_SUBST(STLPORT_LIB) |
8dd54c3bf02a
8148244: Finalize and integrate GTest implementation
iignatyev
parents:
37402
diff
changeset
|
213 |
fi |
8dd54c3bf02a
8148244: Finalize and integrate GTest implementation
iignatyev
parents:
37402
diff
changeset
|
214 |
]) |
8dd54c3bf02a
8148244: Finalize and integrate GTest implementation
iignatyev
parents:
37402
diff
changeset
|
215 |