common/autoconf/libraries.m4
author mlarsson
Tue, 29 Mar 2016 09:43:05 +0200
changeset 37201 928cf689af1a
parent 36050 f6590b6e5e97
child 37402 62b5f067032e
permissions -rw-r--r--
8151993: Remove inclusion of inline.hpp in log.hpp Reviewed-by: kbarrett, stefank
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
#
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])
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    34
32921
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    35
################################################################################
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    36
# Determine which libraries are needed for this configuration
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    37
################################################################################
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    38
AC_DEFUN_ONCE([LIB_DETERMINE_DEPENDENCIES],
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    39
[
32921
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    40
  # Check if X11 is needed
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    41
  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
    42
    # No X11 support on windows or macosx
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    43
    NEEDS_LIB_X11=false
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19524
diff changeset
    44
  else
32921
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    45
    if test "x$SUPPORT_HEADFUL" = xno; then
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    46
      # No X11 support if building headless-only
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    47
      NEEDS_LIB_X11=false
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    48
    else
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    49
      # All other instances need X11
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    50
      NEEDS_LIB_X11=true
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19524
diff changeset
    51
    fi
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19524
diff changeset
    52
  fi
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    53
32921
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    54
  # Check if cups is needed
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    55
  if test "x$OPENJDK_TARGET_OS" = xwindows; then
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    56
    # Windows have a separate print system
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    57
    NEEDS_LIB_CUPS=false
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    58
  else
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    59
    NEEDS_LIB_CUPS=true
26400
4d6c6f2df610 8057538: Build the freetype library during configure on Windows
simonis
parents: 25039
diff changeset
    60
  fi
4d6c6f2df610 8057538: Build the freetype library during configure on Windows
simonis
parents: 25039
diff changeset
    61
32921
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    62
  # Check if freetype is needed
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    63
  if test "x$OPENJDK" = "xtrue"; then
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    64
    NEEDS_LIB_FREETYPE=true
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_FREETYPE=false
27331
3947187af23d 8062816: Fix configure freetype detection on Mac OS X Yosemite
ihse
parents: 27330
diff changeset
    67
  fi
27595
cff167b3bfa2 8065914: Various improvements and cleanup of build system
ihse
parents: 27331
diff changeset
    68
32921
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    69
  # Check if alsa is needed
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    70
  if test "x$OPENJDK_TARGET_OS" = xlinux; then
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    71
    NEEDS_LIB_ALSA=true
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    72
  else
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    73
    NEEDS_LIB_ALSA=false
20654
2c17cbccf2ef 8001922: Improve freetype handling.
ihse
parents: 20649
diff changeset
    74
  fi
2c17cbccf2ef 8001922: Improve freetype handling.
ihse
parents: 20649
diff changeset
    75
32921
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    76
  # Check if ffi is needed
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    77
  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    78
    NEEDS_LIB_FFI=true
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    79
  else
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    80
    NEEDS_LIB_FFI=false
20654
2c17cbccf2ef 8001922: Improve freetype handling.
ihse
parents: 20649
diff changeset
    81
  fi
2c17cbccf2ef 8001922: Improve freetype handling.
ihse
parents: 20649
diff changeset
    82
])
2c17cbccf2ef 8001922: Improve freetype handling.
ihse
parents: 20649
diff changeset
    83
32921
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    84
################################################################################
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    85
# Parse library options, and setup needed libraries
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    86
################################################################################
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    87
AC_DEFUN_ONCE([LIB_SETUP_LIBRARIES],
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    88
[
32921
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    89
  LIB_SETUP_STD_LIBS
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    90
  LIB_SETUP_X11
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    91
  LIB_SETUP_CUPS
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    92
  LIB_SETUP_FREETYPE
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    93
  LIB_SETUP_ALSA
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    94
  LIB_SETUP_LIBFFI
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    95
  LIB_SETUP_LLVM
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    96
  LIB_SETUP_BUNDLED_LIBS
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
    97
  LIB_SETUP_MISC_LIBS
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    98
])
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    99
32921
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
   100
################################################################################
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
   101
# Setup llvm (Low-Level VM)
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
   102
################################################################################
8e0250dfa145 8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents: 31327
diff changeset
   103
AC_DEFUN_ONCE([LIB_SETUP_LLVM],
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   104
[
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19524
diff changeset
   105
  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
16581
b2cddec593f4 8011388: Support building zero and zeroshark with the new build
omajid
parents: 16424
diff changeset
   106
    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
   107
b2cddec593f4 8011388: Support building zero and zeroshark with the new build
omajid
parents: 16424
diff changeset
   108
    if test "x$LLVM_CONFIG" != xllvm-config; then
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19524
diff changeset
   109
      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
   110
    fi
b2cddec593f4 8011388: Support building zero and zeroshark with the new build
omajid
parents: 16424
diff changeset
   111
b2cddec593f4 8011388: Support building zero and zeroshark with the new build
omajid
parents: 16424
diff changeset
   112
    llvm_components="jit mcjit engine nativecodegen native"
b2cddec593f4 8011388: Support building zero and zeroshark with the new build
omajid
parents: 16424
diff changeset
   113
    unset LLVM_CFLAGS
b2cddec593f4 8011388: Support building zero and zeroshark with the new build
omajid
parents: 16424
diff changeset
   114
    for flag in $("$LLVM_CONFIG" --cxxflags); do
b2cddec593f4 8011388: Support building zero and zeroshark with the new build
omajid
parents: 16424
diff changeset
   115
      if echo "${flag}" | grep -q '^-@<:@ID@:>@'; then
b2cddec593f4 8011388: Support building zero and zeroshark with the new build
omajid
parents: 16424
diff changeset
   116
        if test "${flag}" != "-D_DEBUG" ; then
b2cddec593f4 8011388: Support building zero and zeroshark with the new build
omajid
parents: 16424
diff changeset
   117
          if test "${LLVM_CFLAGS}" != "" ; then
b2cddec593f4 8011388: Support building zero and zeroshark with the new build
omajid
parents: 16424
diff changeset
   118
            LLVM_CFLAGS="${LLVM_CFLAGS} "
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
          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
b2cddec593f4 8011388: Support building zero and zeroshark with the new build
omajid
parents: 16424
diff changeset
   121
        fi
b2cddec593f4 8011388: Support building zero and zeroshark with the new build
omajid
parents: 16424
diff changeset
   122
      fi
b2cddec593f4 8011388: Support building zero and zeroshark with the new build
omajid
parents: 16424
diff changeset
   123
    done
b2cddec593f4 8011388: Support building zero and zeroshark with the new build
omajid
parents: 16424
diff changeset
   124
    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
   125
    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
   126
b2cddec593f4 8011388: Support building zero and zeroshark with the new build
omajid
parents: 16424
diff changeset
   127
    unset LLVM_LDFLAGS
b2cddec593f4 8011388: Support building zero and zeroshark with the new build
omajid
parents: 16424
diff changeset
   128
    for flag in $("${LLVM_CONFIG}" --ldflags); do
b2cddec593f4 8011388: Support building zero and zeroshark with the new build
omajid
parents: 16424
diff changeset
   129
      if echo "${flag}" | grep -q '^-L'; then
b2cddec593f4 8011388: Support building zero and zeroshark with the new build
omajid
parents: 16424
diff changeset
   130
        if test "${LLVM_LDFLAGS}" != ""; then
b2cddec593f4 8011388: Support building zero and zeroshark with the new build
omajid
parents: 16424
diff changeset
   131
          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
b2cddec593f4 8011388: Support building zero and zeroshark with the new build
omajid
parents: 16424
diff changeset
   132
        fi
b2cddec593f4 8011388: Support building zero and zeroshark with the new build
omajid
parents: 16424
diff changeset
   133
        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
b2cddec593f4 8011388: Support building zero and zeroshark with the new build
omajid
parents: 16424
diff changeset
   134
      fi
b2cddec593f4 8011388: Support building zero and zeroshark with the new build
omajid
parents: 16424
diff changeset
   135
    done
b2cddec593f4 8011388: Support building zero and zeroshark with the new build
omajid
parents: 16424
diff changeset
   136
b2cddec593f4 8011388: Support building zero and zeroshark with the new build
omajid
parents: 16424
diff changeset
   137
    unset LLVM_LIBS
b2cddec593f4 8011388: Support building zero and zeroshark with the new build
omajid
parents: 16424
diff changeset
   138
    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
   139
      if echo "${flag}" | grep -q '^-l'; then
b2cddec593f4 8011388: Support building zero and zeroshark with the new build
omajid
parents: 16424
diff changeset
   140
        if test "${LLVM_LIBS}" != ""; then
b2cddec593f4 8011388: Support building zero and zeroshark with the new build
omajid
parents: 16424
diff changeset
   141
          LLVM_LIBS="${LLVM_LIBS} "
b2cddec593f4 8011388: Support building zero and zeroshark with the new build
omajid
parents: 16424
diff changeset
   142
        fi
b2cddec593f4 8011388: Support building zero and zeroshark with the new build
omajid
parents: 16424
diff changeset
   143
        LLVM_LIBS="${LLVM_LIBS}${flag}"
b2cddec593f4 8011388: Support building zero and zeroshark with the new build
omajid
parents: 16424
diff changeset
   144
      fi
b2cddec593f4 8011388: Support building zero and zeroshark with the new build
omajid
parents: 16424
diff changeset
   145
    done
b2cddec593f4 8011388: Support building zero and zeroshark with the new build
omajid
parents: 16424
diff changeset
   146
35370
f9b430645a18 8148120: Incremental update from build-infra project
ihse
parents: 32921
diff changeset
   147
    # 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
   148
    # always properly detect -ltinfo
f9b430645a18 8148120: Incremental update from build-infra project
ihse
parents: 32921
diff changeset
   149
    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
f9b430645a18 8148120: Incremental update from build-infra project
ihse
parents: 32921
diff changeset
   150
16581
b2cddec593f4 8011388: Support building zero and zeroshark with the new build
omajid
parents: 16424
diff changeset
   151
    AC_SUBST(LLVM_CFLAGS)
b2cddec593f4 8011388: Support building zero and zeroshark with the new build
omajid
parents: 16424
diff changeset
   152
    AC_SUBST(LLVM_LDFLAGS)
b2cddec593f4 8011388: Support building zero and zeroshark with the new build
omajid
parents: 16424
diff changeset
   153
    AC_SUBST(LLVM_LIBS)
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19524
diff changeset
   154
  fi
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   155
])
22721
63761da45392 8034788: Rewrite toolchain.m4 to support multiple toolchains per platform.
ihse
parents: 22710
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
])