16 #
17 # You should have received a copy of the GNU General Public License version
18 # 2 along with this work; if not, write to the Free Software Foundation,
19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 #
21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 # or visit www.oracle.com if you need additional information or have any
23 # questions.
24 #
25
26 # Major library component reside in separate files.
27 m4_include([lib-alsa.m4])
28 m4_include([lib-bundled.m4])
29 m4_include([lib-cups.m4])
30 m4_include([lib-ffi.m4])
31 m4_include([lib-freetype.m4])
32 m4_include([lib-std.m4])
33 m4_include([lib-x11.m4])
34 m4_include([lib-fontconfig.m4])
35 m4_include([lib-tests.m4])
36
37 ################################################################################
38 # Determine which libraries are needed for this configuration
39 ################################################################################
40 AC_DEFUN_ONCE([LIB_DETERMINE_DEPENDENCIES],
41 [
42 # Check if X11 is needed
43 if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
44 # No X11 support on windows or macosx
45 NEEDS_LIB_X11=false
46 else
47 # All other instances need X11, even if building headless only, libawt still
48 # needs X11 headers.
49 NEEDS_LIB_X11=true
50 fi
51
52 # Check if fontconfig is needed
53 if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
54 # No fontconfig support on windows or macosx
55 NEEDS_LIB_FONTCONFIG=false
62 # Check if cups is needed
63 if test "x$OPENJDK_TARGET_OS" = xwindows; then
64 # Windows have a separate print system
65 NEEDS_LIB_CUPS=false
66 else
67 NEEDS_LIB_CUPS=true
68 fi
69
70 # A custom hook may have set this already
71 if test "x$NEEDS_LIB_FREETYPE" = "x"; then
72 NEEDS_LIB_FREETYPE=true
73 fi
74
75 # Check if alsa is needed
76 if test "x$OPENJDK_TARGET_OS" = xlinux; then
77 NEEDS_LIB_ALSA=true
78 else
79 NEEDS_LIB_ALSA=false
80 fi
81
82 # Check if ffi is needed
83 if HOTSPOT_CHECK_JVM_VARIANT(zero); then
84 NEEDS_LIB_FFI=true
85 else
86 NEEDS_LIB_FFI=false
87 fi
88 ])
89
90 ################################################################################
91 # Parse library options, and setup needed libraries
92 ################################################################################
93 AC_DEFUN_ONCE([LIB_SETUP_LIBRARIES],
94 [
95 LIB_SETUP_STD_LIBS
96 LIB_SETUP_X11
97 LIB_SETUP_CUPS
98 LIB_SETUP_FONTCONFIG
99 LIB_SETUP_FREETYPE
100 LIB_SETUP_ALSA
101 LIB_SETUP_LIBFFI
102 LIB_SETUP_BUNDLED_LIBS
103 LIB_SETUP_MISC_LIBS
104 LIB_SETUP_SOLARIS_STLPORT
105 LIB_TESTS_SETUP_GRAALUNIT
106
107 if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
108 GLOBAL_LIBS="-lc"
109 else
110 GLOBAL_LIBS=""
111 fi
112
113 BASIC_JDKLIB_LIBS=""
114 if test "x$TOOLCHAIN_TYPE" != xmicrosoft; then
115 BASIC_JDKLIB_LIBS="-ljava -ljvm"
116 fi
117
118 # Math library
119 BASIC_JVM_LIBS="$LIBM"
120
|
16 #
17 # You should have received a copy of the GNU General Public License version
18 # 2 along with this work; if not, write to the Free Software Foundation,
19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 #
21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 # or visit www.oracle.com if you need additional information or have any
23 # questions.
24 #
25
26 # Major library component reside in separate files.
27 m4_include([lib-alsa.m4])
28 m4_include([lib-bundled.m4])
29 m4_include([lib-cups.m4])
30 m4_include([lib-ffi.m4])
31 m4_include([lib-freetype.m4])
32 m4_include([lib-std.m4])
33 m4_include([lib-x11.m4])
34 m4_include([lib-fontconfig.m4])
35 m4_include([lib-tests.m4])
36 m4_include([lib-softfloat.m4])
37
38 ################################################################################
39 # Determine which libraries are needed for this configuration
40 ################################################################################
41 AC_DEFUN_ONCE([LIB_DETERMINE_DEPENDENCIES],
42 [
43 # Check if X11 is needed
44 if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
45 # No X11 support on windows or macosx
46 NEEDS_LIB_X11=false
47 else
48 # All other instances need X11, even if building headless only, libawt still
49 # needs X11 headers.
50 NEEDS_LIB_X11=true
51 fi
52
53 # Check if fontconfig is needed
54 if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
55 # No fontconfig support on windows or macosx
56 NEEDS_LIB_FONTCONFIG=false
63 # Check if cups is needed
64 if test "x$OPENJDK_TARGET_OS" = xwindows; then
65 # Windows have a separate print system
66 NEEDS_LIB_CUPS=false
67 else
68 NEEDS_LIB_CUPS=true
69 fi
70
71 # A custom hook may have set this already
72 if test "x$NEEDS_LIB_FREETYPE" = "x"; then
73 NEEDS_LIB_FREETYPE=true
74 fi
75
76 # Check if alsa is needed
77 if test "x$OPENJDK_TARGET_OS" = xlinux; then
78 NEEDS_LIB_ALSA=true
79 else
80 NEEDS_LIB_ALSA=false
81 fi
82
83 if (test "x$OPENJDK_TARGET_CPU" == xarm &&
84 (test "x$ARM_FLOAT_TYPE" = "xsflt" || test "x$ARM_FLOAT_TYPE" = "xvfp-sflt" )); then
85 USES_LIB_SOFTFLOAT=true
86 else
87 USES_LIB_SOFTFLOAT=false
88 fi
89
90 # Check if ffi is needed
91 if HOTSPOT_CHECK_JVM_VARIANT(zero); then
92 NEEDS_LIB_FFI=true
93 else
94 NEEDS_LIB_FFI=false
95 fi
96 ])
97
98 ################################################################################
99 # Parse library options, and setup needed libraries
100 ################################################################################
101 AC_DEFUN_ONCE([LIB_SETUP_LIBRARIES],
102 [
103 LIB_SETUP_STD_LIBS
104 LIB_SETUP_X11
105 LIB_SETUP_CUPS
106 LIB_SETUP_FONTCONFIG
107 LIB_SETUP_FREETYPE
108 LIB_SETUP_ALSA
109 LIB_SETUP_SOFTFLOAT
110 LIB_SETUP_LIBFFI
111 LIB_SETUP_BUNDLED_LIBS
112 LIB_SETUP_MISC_LIBS
113 LIB_SETUP_SOLARIS_STLPORT
114 LIB_TESTS_SETUP_GRAALUNIT
115
116 if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
117 GLOBAL_LIBS="-lc"
118 else
119 GLOBAL_LIBS=""
120 fi
121
122 BASIC_JDKLIB_LIBS=""
123 if test "x$TOOLCHAIN_TYPE" != xmicrosoft; then
124 BASIC_JDKLIB_LIBS="-ljava -ljvm"
125 fi
126
127 # Math library
128 BASIC_JVM_LIBS="$LIBM"
129
|