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

common/autoconf/libraries.m4

Print this page




  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


  56   fi
  57 
  58   # A custom hook may have set this already
  59   if test "x$NEEDS_LIB_FREETYPE" = "x"; then
  60     NEEDS_LIB_FREETYPE=true
  61   fi
  62 
  63   # Check if alsa is needed
  64   if test "x$OPENJDK_TARGET_OS" = xlinux; then
  65     NEEDS_LIB_ALSA=true
  66   else
  67     NEEDS_LIB_ALSA=false
  68   fi
  69 
  70   # Check if ffi is needed
  71   if HOTSPOT_CHECK_JVM_VARIANT(zero) || HOTSPOT_CHECK_JVM_VARIANT(zeroshark); then
  72     NEEDS_LIB_FFI=true
  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




  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


  57   fi
  58 
  59   # A custom hook may have set this already
  60   if test "x$NEEDS_LIB_FREETYPE" = "x"; then
  61     NEEDS_LIB_FREETYPE=true
  62   fi
  63 
  64   # Check if alsa is needed
  65   if test "x$OPENJDK_TARGET_OS" = xlinux; then
  66     NEEDS_LIB_ALSA=true
  67   else
  68     NEEDS_LIB_ALSA=false
  69   fi
  70 
  71   # Check if ffi is needed
  72   if HOTSPOT_CHECK_JVM_VARIANT(zero) || HOTSPOT_CHECK_JVM_VARIANT(zeroshark); then
  73     NEEDS_LIB_FFI=true
  74   else
  75     NEEDS_LIB_FFI=false
  76   fi
  77 
  78   # Check if elf is needed (only for AOT build)
  79   if test "x$ENABLE_AOT" = "xtrue"; then
  80     NEEDS_LIB_JELFSHIM=true
  81   else
  82     NEEDS_LIB_JELFSHIM=false
  83   fi
  84 ])
  85 
  86 ################################################################################
  87 # Parse library options, and setup needed libraries
  88 ################################################################################
  89 AC_DEFUN_ONCE([LIB_SETUP_LIBRARIES],
  90 [
  91   LIB_SETUP_STD_LIBS
  92   LIB_SETUP_X11
  93   LIB_SETUP_CUPS
  94   LIB_SETUP_FREETYPE
  95   LIB_SETUP_ALSA
  96   LIB_SETUP_LIBFFI
  97   LIB_SETUP_LLVM
  98   LIB_SETUP_BUNDLED_LIBS
  99   LIB_SETUP_MISC_LIBS
 100   LIB_SETUP_SOLARIS_STLPORT
 101   LIB_SETUP_LIBELF
 102 ])
 103 
 104 ################################################################################
 105 # Setup llvm (Low-Level VM)
 106 ################################################################################
 107 AC_DEFUN_ONCE([LIB_SETUP_LLVM],
 108 [
 109   if HOTSPOT_CHECK_JVM_VARIANT(zeroshark); then
 110     AC_CHECK_PROG([LLVM_CONFIG], [llvm-config], [llvm-config])
 111 
 112     if test "x$LLVM_CONFIG" != xllvm-config; then
 113       AC_MSG_ERROR([llvm-config not found in $PATH.])
 114     fi
 115 
 116     llvm_components="jit mcjit engine nativecodegen native"
 117     unset LLVM_CFLAGS
 118     for flag in $("$LLVM_CONFIG" --cxxflags); do
 119       if echo "${flag}" | grep -q '^-@<:@ID@:>@'; then
 120         if test "${flag}" != "-D_DEBUG" ; then
 121           if test "${LLVM_CFLAGS}" != "" ; then


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