common/autoconf/libraries.m4
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File jdk10-hs Sdiff common/autoconf

common/autoconf/libraries.m4

Print this page


   1 #
   2 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
   3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4 #
   5 # This code is free software; you can redistribute it and/or modify it
   6 # under the terms of the GNU General Public License version 2 only, as
   7 # published by the Free Software Foundation.  Oracle designates this
   8 # particular file as subject to the "Classpath" exception as provided
   9 # by Oracle in the LICENSE file that accompanied this code.
  10 #
  11 # This code is distributed in the hope that it will be useful, but WITHOUT
  12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14 # version 2 for more details (a copy is included in the LICENSE file that
  15 # accompanied this code).
  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-elf.m4])
  35 
  36 ################################################################################
  37 # Determine which libraries are needed for this configuration
  38 ################################################################################
  39 AC_DEFUN_ONCE([LIB_DETERMINE_DEPENDENCIES],
  40 [
  41   # Check if X11 is needed
  42   if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
  43     # No X11 support on windows or macosx
  44     NEEDS_LIB_X11=false
  45   else
  46     # All other instances need X11, even if building headless only, libawt still
  47     # needs X11 headers.
  48     NEEDS_LIB_X11=true
  49   fi
  50 
  51   # Check if cups is needed
  52   if test "x$OPENJDK_TARGET_OS" = xwindows; then
  53     # Windows have a separate print system
  54     NEEDS_LIB_CUPS=false


  74   else
  75     NEEDS_LIB_FFI=false
  76   fi
  77 ])
  78 
  79 ################################################################################
  80 # Parse library options, and setup needed libraries
  81 ################################################################################
  82 AC_DEFUN_ONCE([LIB_SETUP_LIBRARIES],
  83 [
  84   LIB_SETUP_STD_LIBS
  85   LIB_SETUP_X11
  86   LIB_SETUP_CUPS
  87   LIB_SETUP_FREETYPE
  88   LIB_SETUP_ALSA
  89   LIB_SETUP_LIBFFI
  90   LIB_SETUP_LLVM
  91   LIB_SETUP_BUNDLED_LIBS
  92   LIB_SETUP_MISC_LIBS
  93   LIB_SETUP_SOLARIS_STLPORT
  94   LIB_SETUP_LIBELF
  95 ])
  96 
  97 ################################################################################
  98 # Setup llvm (Low-Level VM)
  99 ################################################################################
 100 AC_DEFUN_ONCE([LIB_SETUP_LLVM],
 101 [
 102   if HOTSPOT_CHECK_JVM_VARIANT(zeroshark); then
 103     AC_CHECK_PROG([LLVM_CONFIG], [llvm-config], [llvm-config])
 104 
 105     if test "x$LLVM_CONFIG" != xllvm-config; then
 106       AC_MSG_ERROR([llvm-config not found in $PATH.])
 107     fi
 108 
 109     llvm_components="jit mcjit engine nativecodegen native"
 110     unset LLVM_CFLAGS
 111     for flag in $("$LLVM_CONFIG" --cxxflags); do
 112       if echo "${flag}" | grep -q '^-@<:@ID@:>@'; then
 113         if test "${flag}" != "-D_DEBUG" ; then
 114           if test "${LLVM_CFLAGS}" != "" ; then


   1 #
   2 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
   3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4 #
   5 # This code is free software; you can redistribute it and/or modify it
   6 # under the terms of the GNU General Public License version 2 only, as
   7 # published by the Free Software Foundation.  Oracle designates this
   8 # particular file as subject to the "Classpath" exception as provided
   9 # by Oracle in the LICENSE file that accompanied this code.
  10 #
  11 # This code is distributed in the hope that it will be useful, but WITHOUT
  12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14 # version 2 for more details (a copy is included in the LICENSE file that
  15 # accompanied this code).
  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 
  35 ################################################################################
  36 # Determine which libraries are needed for this configuration
  37 ################################################################################
  38 AC_DEFUN_ONCE([LIB_DETERMINE_DEPENDENCIES],
  39 [
  40   # Check if X11 is needed
  41   if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
  42     # No X11 support on windows or macosx
  43     NEEDS_LIB_X11=false
  44   else
  45     # All other instances need X11, even if building headless only, libawt still
  46     # needs X11 headers.
  47     NEEDS_LIB_X11=true
  48   fi
  49 
  50   # Check if cups is needed
  51   if test "x$OPENJDK_TARGET_OS" = xwindows; then
  52     # Windows have a separate print system
  53     NEEDS_LIB_CUPS=false


  73   else
  74     NEEDS_LIB_FFI=false
  75   fi
  76 ])
  77 
  78 ################################################################################
  79 # Parse library options, and setup needed libraries
  80 ################################################################################
  81 AC_DEFUN_ONCE([LIB_SETUP_LIBRARIES],
  82 [
  83   LIB_SETUP_STD_LIBS
  84   LIB_SETUP_X11
  85   LIB_SETUP_CUPS
  86   LIB_SETUP_FREETYPE
  87   LIB_SETUP_ALSA
  88   LIB_SETUP_LIBFFI
  89   LIB_SETUP_LLVM
  90   LIB_SETUP_BUNDLED_LIBS
  91   LIB_SETUP_MISC_LIBS
  92   LIB_SETUP_SOLARIS_STLPORT

  93 ])
  94 
  95 ################################################################################
  96 # Setup llvm (Low-Level VM)
  97 ################################################################################
  98 AC_DEFUN_ONCE([LIB_SETUP_LLVM],
  99 [
 100   if HOTSPOT_CHECK_JVM_VARIANT(zeroshark); then
 101     AC_CHECK_PROG([LLVM_CONFIG], [llvm-config], [llvm-config])
 102 
 103     if test "x$LLVM_CONFIG" != xllvm-config; then
 104       AC_MSG_ERROR([llvm-config not found in $PATH.])
 105     fi
 106 
 107     llvm_components="jit mcjit engine nativecodegen native"
 108     unset LLVM_CFLAGS
 109     for flag in $("$LLVM_CONFIG" --cxxflags); do
 110       if echo "${flag}" | grep -q '^-@<:@ID@:>@'; then
 111         if test "${flag}" != "-D_DEBUG" ; then
 112           if test "${LLVM_CFLAGS}" != "" ; then


common/autoconf/libraries.m4
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File