make/autoconf/libraries.m4
author dchuyko
Tue, 19 Jun 2018 18:18:46 +0300
changeset 50642 fff48b02d4a6
parent 50113 caf115bb98ad
child 50908 7c51db95ccb6
child 56726 3a9b7a1f9197
permissions -rw-r--r--
8198719: MethodHandleHelper.linkToStatic should drop MH arg Reviewed-by: vlivanov, dlong
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
     1
#
49120
c04d813140dc 8198724: Refactor FLAGS handling in configure
ihse
parents: 47701
diff changeset
     2
# Copyright (c) 2011, 2018, 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])
47507
5a270d2dfa5d 8170681: Remove fontconfig header files from JDK source tree
prr
parents: 47216
diff changeset
    34
m4_include([lib-fontconfig.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
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19524
diff changeset
    45
  else
41046
bee72dd4067b 8163102: Fix headless only configuration option
erikj
parents: 39384
diff changeset
    46
    # All other instances need X11, even if building headless only, libawt still
bee72dd4067b 8163102: Fix headless only configuration option
erikj
parents: 39384
diff changeset
    47
    # needs X11 headers.
bee72dd4067b 8163102: Fix headless only configuration option
erikj
parents: 39384
diff changeset
    48
    NEEDS_LIB_X11=true
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19524
diff changeset
    49
  fi
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    50
47507
5a270d2dfa5d 8170681: Remove fontconfig header files from JDK source tree
prr
parents: 47216
diff changeset
    51
  # Check if fontconfig is needed
5a270d2dfa5d 8170681: Remove fontconfig header files from JDK source tree
prr
parents: 47216
diff changeset
    52
  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
5a270d2dfa5d 8170681: Remove fontconfig header files from JDK source tree
prr
parents: 47216
diff changeset
    53
    # No fontconfig support on windows or macosx
5a270d2dfa5d 8170681: Remove fontconfig header files from JDK source tree
prr
parents: 47216
diff changeset
    54
    NEEDS_LIB_FONTCONFIG=false
5a270d2dfa5d 8170681: Remove fontconfig header files from JDK source tree
prr
parents: 47216
diff changeset
    55
  else
5a270d2dfa5d 8170681: Remove fontconfig header files from JDK source tree
prr
parents: 47216
diff changeset
    56
    # All other instances need fontconfig, even if building headless only,
5a270d2dfa5d 8170681: Remove fontconfig header files from JDK source tree
prr
parents: 47216
diff changeset
    57
    # libawt still needs fontconfig headers.
5a270d2dfa5d 8170681: Remove fontconfig header files from JDK source tree
prr
parents: 47216
diff changeset
    58
    NEEDS_LIB_FONTCONFIG=true
5a270d2dfa5d 8170681: Remove fontconfig header files from JDK source tree
prr
parents: 47216
diff changeset
    59
  fi
5a270d2dfa5d 8170681: Remove fontconfig header files from JDK source tree
prr
parents: 47216
diff changeset
    60
32921
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    61
  # Check if cups is needed
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    62
  if test "x$OPENJDK_TARGET_OS" = xwindows; then
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    63
    # Windows have a separate print system
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    64
    NEEDS_LIB_CUPS=false
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    65
  else
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    66
    NEEDS_LIB_CUPS=true
26400
4d6c6f2df610 8057538: Build the freetype library during configure on Windows
simonis
parents: 25039
diff changeset
    67
  fi
4d6c6f2df610 8057538: Build the freetype library during configure on Windows
simonis
parents: 25039
diff changeset
    68
39384
adde8cb7d01b 8003593: build-infra: Paths to optional platform-specific files should not be hardwired to src/closed
erikj
parents: 39194
diff changeset
    69
  # 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
    70
  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
    71
    NEEDS_LIB_FREETYPE=true
27331
3947187af23d 8062816: Fix configure freetype detection on Mac OS X Yosemite
ihse
parents: 27330
diff changeset
    72
  fi
27595
cff167b3bfa2 8065914: Various improvements and cleanup of build system
ihse
parents: 27331
diff changeset
    73
32921
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    74
  # Check if alsa is needed
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    75
  if test "x$OPENJDK_TARGET_OS" = xlinux; then
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    76
    NEEDS_LIB_ALSA=true
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    77
  else
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    78
    NEEDS_LIB_ALSA=false
20654
2c17cbccf2ef 8001922: Improve freetype handling.
ihse
parents: 20649
diff changeset
    79
  fi
2c17cbccf2ef 8001922: Improve freetype handling.
ihse
parents: 20649
diff changeset
    80
32921
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    81
  # Check if ffi is needed
47687
fb290fd1f9d4 8171853: Remove Shark compiler
rkennke
parents: 47216
diff changeset
    82
  if HOTSPOT_CHECK_JVM_VARIANT(zero); then
32921
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    83
    NEEDS_LIB_FFI=true
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    84
  else
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    85
    NEEDS_LIB_FFI=false
20654
2c17cbccf2ef 8001922: Improve freetype handling.
ihse
parents: 20649
diff changeset
    86
  fi
2c17cbccf2ef 8001922: Improve freetype handling.
ihse
parents: 20649
diff changeset
    87
])
2c17cbccf2ef 8001922: Improve freetype handling.
ihse
parents: 20649
diff changeset
    88
32921
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    89
################################################################################
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    90
# Parse library options, and setup needed libraries
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    91
################################################################################
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    92
AC_DEFUN_ONCE([LIB_SETUP_LIBRARIES],
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    93
[
32921
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    94
  LIB_SETUP_STD_LIBS
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    95
  LIB_SETUP_X11
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    96
  LIB_SETUP_CUPS
47507
5a270d2dfa5d 8170681: Remove fontconfig header files from JDK source tree
prr
parents: 47216
diff changeset
    97
  LIB_SETUP_FONTCONFIG
32921
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    98
  LIB_SETUP_FREETYPE
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    99
  LIB_SETUP_ALSA
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
   100
  LIB_SETUP_LIBFFI
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
   101
  LIB_SETUP_BUNDLED_LIBS
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
   102
  LIB_SETUP_MISC_LIBS
37967
8dd54c3bf02a 8148244: Finalize and integrate GTest implementation
iignatyev
parents: 37402
diff changeset
   103
  LIB_SETUP_SOLARIS_STLPORT
49120
c04d813140dc 8198724: Refactor FLAGS handling in configure
ihse
parents: 47701
diff changeset
   104
c04d813140dc 8198724: Refactor FLAGS handling in configure
ihse
parents: 47701
diff changeset
   105
  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49241
de4b3a04feae 8199606: Set -lc as global LIBS on solstudio
ihse
parents: 49120
diff changeset
   106
    GLOBAL_LIBS="-lc"
49120
c04d813140dc 8198724: Refactor FLAGS handling in configure
ihse
parents: 47701
diff changeset
   107
  else
49241
de4b3a04feae 8199606: Set -lc as global LIBS on solstudio
ihse
parents: 49120
diff changeset
   108
    GLOBAL_LIBS=""
49120
c04d813140dc 8198724: Refactor FLAGS handling in configure
ihse
parents: 47701
diff changeset
   109
  fi
c04d813140dc 8198724: Refactor FLAGS handling in configure
ihse
parents: 47701
diff changeset
   110
c04d813140dc 8198724: Refactor FLAGS handling in configure
ihse
parents: 47701
diff changeset
   111
  BASIC_JDKLIB_LIBS=""
c04d813140dc 8198724: Refactor FLAGS handling in configure
ihse
parents: 47701
diff changeset
   112
  if test "x$TOOLCHAIN_TYPE" != xmicrosoft; then
c04d813140dc 8198724: Refactor FLAGS handling in configure
ihse
parents: 47701
diff changeset
   113
    BASIC_JDKLIB_LIBS="-ljava -ljvm"
c04d813140dc 8198724: Refactor FLAGS handling in configure
ihse
parents: 47701
diff changeset
   114
  fi
c04d813140dc 8198724: Refactor FLAGS handling in configure
ihse
parents: 47701
diff changeset
   115
c04d813140dc 8198724: Refactor FLAGS handling in configure
ihse
parents: 47701
diff changeset
   116
  # Math library
49640
dd76fcbda95f 8200383: Can't build on SPARC Hotspot with code which use math functions
kvn
parents: 49244
diff changeset
   117
  BASIC_JVM_LIBS="$LIBM"
49120
c04d813140dc 8198724: Refactor FLAGS handling in configure
ihse
parents: 47701
diff changeset
   118
c04d813140dc 8198724: Refactor FLAGS handling in configure
ihse
parents: 47701
diff changeset
   119
  # Dynamic loading library
c04d813140dc 8198724: Refactor FLAGS handling in configure
ihse
parents: 47701
diff changeset
   120
  if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
c04d813140dc 8198724: Refactor FLAGS handling in configure
ihse
parents: 47701
diff changeset
   121
    BASIC_JVM_LIBS="$BASIC_JVM_LIBS $LIBDL"
c04d813140dc 8198724: Refactor FLAGS handling in configure
ihse
parents: 47701
diff changeset
   122
  fi
c04d813140dc 8198724: Refactor FLAGS handling in configure
ihse
parents: 47701
diff changeset
   123
c04d813140dc 8198724: Refactor FLAGS handling in configure
ihse
parents: 47701
diff changeset
   124
  # Threading library
c04d813140dc 8198724: Refactor FLAGS handling in configure
ihse
parents: 47701
diff changeset
   125
  if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xaix; then
c04d813140dc 8198724: Refactor FLAGS handling in configure
ihse
parents: 47701
diff changeset
   126
    BASIC_JVM_LIBS="$BASIC_JVM_LIBS -lpthread"
c04d813140dc 8198724: Refactor FLAGS handling in configure
ihse
parents: 47701
diff changeset
   127
  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
c04d813140dc 8198724: Refactor FLAGS handling in configure
ihse
parents: 47701
diff changeset
   128
    BASIC_JVM_LIBS="$BASIC_JVM_LIBS -lthread"
c04d813140dc 8198724: Refactor FLAGS handling in configure
ihse
parents: 47701
diff changeset
   129
  fi
c04d813140dc 8198724: Refactor FLAGS handling in configure
ihse
parents: 47701
diff changeset
   130
c04d813140dc 8198724: Refactor FLAGS handling in configure
ihse
parents: 47701
diff changeset
   131
  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
c04d813140dc 8198724: Refactor FLAGS handling in configure
ihse
parents: 47701
diff changeset
   132
    BASIC_JVM_LIBS="$BASIC_JVM_LIBS -lsocket -lsched -ldoor -ldemangle -lnsl \
50113
caf115bb98ad 8199712: Flight Recorder
egahlin
parents: 49640
diff changeset
   133
        -lrt -lkstat"
49120
c04d813140dc 8198724: Refactor FLAGS handling in configure
ihse
parents: 47701
diff changeset
   134
    BASIC_JVM_LIBS="$BASIC_JVM_LIBS $LIBCXX_JVM"
c04d813140dc 8198724: Refactor FLAGS handling in configure
ihse
parents: 47701
diff changeset
   135
  fi
c04d813140dc 8198724: Refactor FLAGS handling in configure
ihse
parents: 47701
diff changeset
   136
c04d813140dc 8198724: Refactor FLAGS handling in configure
ihse
parents: 47701
diff changeset
   137
  if test "x$OPENJDK_TARGET_OS" = xwindows; then
c04d813140dc 8198724: Refactor FLAGS handling in configure
ihse
parents: 47701
diff changeset
   138
    BASIC_JVM_LIBS="$BASIC_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
c04d813140dc 8198724: Refactor FLAGS handling in configure
ihse
parents: 47701
diff changeset
   139
        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
c04d813140dc 8198724: Refactor FLAGS handling in configure
ihse
parents: 47701
diff changeset
   140
        wsock32.lib winmm.lib version.lib psapi.lib"
c04d813140dc 8198724: Refactor FLAGS handling in configure
ihse
parents: 47701
diff changeset
   141
  fi
c04d813140dc 8198724: Refactor FLAGS handling in configure
ihse
parents: 47701
diff changeset
   142
c04d813140dc 8198724: Refactor FLAGS handling in configure
ihse
parents: 47701
diff changeset
   143
  JDKLIB_LIBS="$BASIC_JDKLIB_LIBS"
c04d813140dc 8198724: Refactor FLAGS handling in configure
ihse
parents: 47701
diff changeset
   144
  JDKEXE_LIBS=""
c04d813140dc 8198724: Refactor FLAGS handling in configure
ihse
parents: 47701
diff changeset
   145
  JVM_LIBS="$BASIC_JVM_LIBS"
c04d813140dc 8198724: Refactor FLAGS handling in configure
ihse
parents: 47701
diff changeset
   146
  OPENJDK_BUILD_JDKLIB_LIBS="$BASIC_JDKLIB_LIBS"
c04d813140dc 8198724: Refactor FLAGS handling in configure
ihse
parents: 47701
diff changeset
   147
  OPENJDK_BUILD_JVM_LIBS="$BASIC_JVM_LIBS"
c04d813140dc 8198724: Refactor FLAGS handling in configure
ihse
parents: 47701
diff changeset
   148
c04d813140dc 8198724: Refactor FLAGS handling in configure
ihse
parents: 47701
diff changeset
   149
  AC_SUBST(JDKLIB_LIBS)
c04d813140dc 8198724: Refactor FLAGS handling in configure
ihse
parents: 47701
diff changeset
   150
  AC_SUBST(JDKEXE_LIBS)
c04d813140dc 8198724: Refactor FLAGS handling in configure
ihse
parents: 47701
diff changeset
   151
  AC_SUBST(JVM_LIBS)
c04d813140dc 8198724: Refactor FLAGS handling in configure
ihse
parents: 47701
diff changeset
   152
  AC_SUBST(OPENJDK_BUILD_JDKLIB_LIBS)
c04d813140dc 8198724: Refactor FLAGS handling in configure
ihse
parents: 47701
diff changeset
   153
  AC_SUBST(OPENJDK_BUILD_JVM_LIBS)
49241
de4b3a04feae 8199606: Set -lc as global LIBS on solstudio
ihse
parents: 49120
diff changeset
   154
  AC_SUBST(GLOBAL_LIBS)
13133
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
32921
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
   157
################################################################################
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
   158
# Setup various libraries, typically small system libraries
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
   159
################################################################################
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
   160
AC_DEFUN_ONCE([LIB_SETUP_MISC_LIBS],
22721
63761da45392 8034788: Rewrite toolchain.m4 to support multiple toolchains per platform.
ihse
parents: 22710
diff changeset
   161
[
32921
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
   162
  # Setup libm (the maths library)
36050
f6590b6e5e97 8150203: Incremental update from build-infra project
ihse
parents: 35370
diff changeset
   163
  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
f6590b6e5e97 8150203: Incremental update from build-infra project
ihse
parents: 35370
diff changeset
   164
    AC_CHECK_LIB(m, cos, [], [
f6590b6e5e97 8150203: Incremental update from build-infra project
ihse
parents: 35370
diff changeset
   165
        AC_MSG_NOTICE([Maths library was not found])
f6590b6e5e97 8150203: Incremental update from build-infra project
ihse
parents: 35370
diff changeset
   166
    ])
f6590b6e5e97 8150203: Incremental update from build-infra project
ihse
parents: 35370
diff changeset
   167
    LIBM="-lm"
f6590b6e5e97 8150203: Incremental update from build-infra project
ihse
parents: 35370
diff changeset
   168
  else
f6590b6e5e97 8150203: Incremental update from build-infra project
ihse
parents: 35370
diff changeset
   169
    LIBM=""
f6590b6e5e97 8150203: Incremental update from build-infra project
ihse
parents: 35370
diff changeset
   170
  fi
32921
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
   171
  AC_SUBST(LIBM)
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
   172
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
   173
  # Setup libdl (for dynamic library loading)
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
   174
  save_LIBS="$LIBS"
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
   175
  LIBS=""
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
   176
  AC_CHECK_LIB(dl, dlopen)
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
   177
  LIBDL="$LIBS"
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
   178
  AC_SUBST(LIBDL)
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
   179
  LIBS="$save_LIBS"
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
   180
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
   181
  # 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
   182
  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
63761da45392 8034788: Rewrite toolchain.m4 to support multiple toolchains per platform.
ihse
parents: 22710
diff changeset
   183
    BASIC_DEPRECATED_ARG_WITH([dxsdk])
63761da45392 8034788: Rewrite toolchain.m4 to support multiple toolchains per platform.
ihse
parents: 22710
diff changeset
   184
    BASIC_DEPRECATED_ARG_WITH([dxsdk-lib])
63761da45392 8034788: Rewrite toolchain.m4 to support multiple toolchains per platform.
ihse
parents: 22710
diff changeset
   185
    BASIC_DEPRECATED_ARG_WITH([dxsdk-include])
63761da45392 8034788: Rewrite toolchain.m4 to support multiple toolchains per platform.
ihse
parents: 22710
diff changeset
   186
  fi
32921
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
   187
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
   188
  # 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
   189
  LIBZIP_CAN_USE_MMAP=true
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
   190
  AC_SUBST(LIBZIP_CAN_USE_MMAP)
22721
63761da45392 8034788: Rewrite toolchain.m4 to support multiple toolchains per platform.
ihse
parents: 22710
diff changeset
   191
])
37967
8dd54c3bf02a 8148244: Finalize and integrate GTest implementation
iignatyev
parents: 37402
diff changeset
   192
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
# 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
   195
# redistribute it in the test image.
8dd54c3bf02a 8148244: Finalize and integrate GTest implementation
iignatyev
parents: 37402
diff changeset
   196
################################################################################
8dd54c3bf02a 8148244: Finalize and integrate GTest implementation
iignatyev
parents: 37402
diff changeset
   197
AC_DEFUN_ONCE([LIB_SETUP_SOLARIS_STLPORT],
8dd54c3bf02a 8148244: Finalize and integrate GTest implementation
iignatyev
parents: 37402
diff changeset
   198
[
39193
7f9e6818a957 8158763: --disable-hotspot-gtest not working on Solaris
simonis
parents: 37967
diff changeset
   199
  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
   200
    # Find the root of the Solaris Studio installation from the compiler path
8dd54c3bf02a 8148244: Finalize and integrate GTest implementation
iignatyev
parents: 37402
diff changeset
   201
    SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
8dd54c3bf02a 8148244: Finalize and integrate GTest implementation
iignatyev
parents: 37402
diff changeset
   202
    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
   203
    AC_MSG_CHECKING([for libstlport.so.1])
39193
7f9e6818a957 8158763: --disable-hotspot-gtest not working on Solaris
simonis
parents: 37967
diff changeset
   204
    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
   205
      # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
7f9e6818a957 8158763: --disable-hotspot-gtest not working on Solaris
simonis
parents: 37967
diff changeset
   206
      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
   207
    fi
37967
8dd54c3bf02a 8148244: Finalize and integrate GTest implementation
iignatyev
parents: 37402
diff changeset
   208
    if test -f "$STLPORT_LIB"; then
8dd54c3bf02a 8148244: Finalize and integrate GTest implementation
iignatyev
parents: 37402
diff changeset
   209
      AC_MSG_RESULT([yes, $STLPORT_LIB])
8dd54c3bf02a 8148244: Finalize and integrate GTest implementation
iignatyev
parents: 37402
diff changeset
   210
      BASIC_FIXUP_PATH([STLPORT_LIB])
8dd54c3bf02a 8148244: Finalize and integrate GTest implementation
iignatyev
parents: 37402
diff changeset
   211
    else
8dd54c3bf02a 8148244: Finalize and integrate GTest implementation
iignatyev
parents: 37402
diff changeset
   212
      AC_MSG_RESULT([no, not found at $STLPORT_LIB])
8dd54c3bf02a 8148244: Finalize and integrate GTest implementation
iignatyev
parents: 37402
diff changeset
   213
      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
   214
    fi
8dd54c3bf02a 8148244: Finalize and integrate GTest implementation
iignatyev
parents: 37402
diff changeset
   215
    AC_SUBST(STLPORT_LIB)
8dd54c3bf02a 8148244: Finalize and integrate GTest implementation
iignatyev
parents: 37402
diff changeset
   216
  fi
8dd54c3bf02a 8148244: Finalize and integrate GTest implementation
iignatyev
parents: 37402
diff changeset
   217
])
8dd54c3bf02a 8148244: Finalize and integrate GTest implementation
iignatyev
parents: 37402
diff changeset
   218