< prev index next >

make/autoconf/lib-bundled.m4

Print this page


   1 #
   2 # Copyright (c) 2011, 2019, 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 ################################################################################
  27 # Setup bundled libraries.
  28 #
  29 # For libjpeg, giflib, libpng, lcms2 and zlib the source is present in the
  30 # OpenJDK repository (referred to as "bundled"). Default is to use libjpeg,
  31 # giflib, libpng and lcms2 libraries as "bundled". The default for zlib is
  32 # to use the bundled zlib on Windows and AIX, otherwise the external ("system")
  33 # zlib, if present. However the libs may be replaced by an external ("system")
  34 # version by the user.
  35 ################################################################################
  36 AC_DEFUN_ONCE([LIB_SETUP_BUNDLED_LIBS],
  37 [
  38   LIB_SETUP_LIBJPEG
  39   LIB_SETUP_GIFLIB
  40   LIB_SETUP_LIBPNG
  41   LIB_SETUP_ZLIB
  42   LIB_SETUP_LCMS
  43 ])
  44 
  45 ################################################################################
  46 # Setup libjpeg
  47 ################################################################################
  48 AC_DEFUN_ONCE([LIB_SETUP_LIBJPEG],
  49 [
  50   AC_ARG_WITH(libjpeg, [AS_HELP_STRING([--with-libjpeg],
  51       [use libjpeg from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])])
  52 
  53   AC_MSG_CHECKING([for which libjpeg to use])
  54   # default is bundled


 147   AC_SUBST(USE_EXTERNAL_LIBPNG)
 148   AC_SUBST(PNG_CFLAGS)
 149   AC_SUBST(PNG_LIBS)
 150 ])
 151 
 152 ################################################################################
 153 # Setup zlib
 154 ################################################################################
 155 AC_DEFUN_ONCE([LIB_SETUP_ZLIB],
 156 [
 157   AC_ARG_WITH(zlib, [AS_HELP_STRING([--with-zlib],
 158       [use zlib from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])])
 159 
 160   AC_CHECK_LIB(z, compress,
 161       [ ZLIB_FOUND=yes ],
 162       [ ZLIB_FOUND=no ])
 163 
 164   AC_MSG_CHECKING([for which zlib to use])
 165 
 166   DEFAULT_ZLIB=system
 167   if test "x$OPENJDK_TARGET_OS" = xwindows -o "x$OPENJDK_TARGET_OS" = xaix; then
 168     # On windows and aix default is bundled, on others default is system
 169     DEFAULT_ZLIB=bundled
 170   fi
 171 
 172   if test "x${ZLIB_FOUND}" != "xyes"; then
 173     # If we don't find any system...set default to bundled
 174     DEFAULT_ZLIB=bundled
 175   fi
 176 
 177   # If user didn't specify, use DEFAULT_ZLIB
 178   if test "x${with_zlib}" = "x"; then
 179     with_zlib=${DEFAULT_ZLIB}
 180   fi
 181 
 182   if test "x${with_zlib}" = "xbundled"; then
 183     USE_EXTERNAL_LIBZ=false
 184     AC_MSG_RESULT([bundled])
 185   elif test "x${with_zlib}" = "xsystem"; then
 186     if test "x${ZLIB_FOUND}" = "xyes"; then
 187       USE_EXTERNAL_LIBZ=true
 188       AC_MSG_RESULT([system])


   1 #
   2 # Copyright (c) 2011, 2018, 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 ################################################################################
  27 # Setup bundled libraries.
  28 #
  29 # For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
  30 # OpenJDK repository. Default is to use these libraries as bundled, but they
  31 # might be replaced by en external version by the user.



  32 ################################################################################
  33 AC_DEFUN_ONCE([LIB_SETUP_BUNDLED_LIBS],
  34 [
  35   LIB_SETUP_LIBJPEG
  36   LIB_SETUP_GIFLIB
  37   LIB_SETUP_LIBPNG
  38   LIB_SETUP_ZLIB
  39   LIB_SETUP_LCMS
  40 ])
  41 
  42 ################################################################################
  43 # Setup libjpeg
  44 ################################################################################
  45 AC_DEFUN_ONCE([LIB_SETUP_LIBJPEG],
  46 [
  47   AC_ARG_WITH(libjpeg, [AS_HELP_STRING([--with-libjpeg],
  48       [use libjpeg from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])])
  49 
  50   AC_MSG_CHECKING([for which libjpeg to use])
  51   # default is bundled


 144   AC_SUBST(USE_EXTERNAL_LIBPNG)
 145   AC_SUBST(PNG_CFLAGS)
 146   AC_SUBST(PNG_LIBS)
 147 ])
 148 
 149 ################################################################################
 150 # Setup zlib
 151 ################################################################################
 152 AC_DEFUN_ONCE([LIB_SETUP_ZLIB],
 153 [
 154   AC_ARG_WITH(zlib, [AS_HELP_STRING([--with-zlib],
 155       [use zlib from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])])
 156 
 157   AC_CHECK_LIB(z, compress,
 158       [ ZLIB_FOUND=yes ],
 159       [ ZLIB_FOUND=no ])
 160 
 161   AC_MSG_CHECKING([for which zlib to use])
 162 
 163   DEFAULT_ZLIB=system
 164   if test "x$OPENJDK_TARGET_OS" = xwindows; then
 165     # On windows default is bundled...on others default is system
 166     DEFAULT_ZLIB=bundled
 167   fi
 168 
 169   if test "x${ZLIB_FOUND}" != "xyes"; then
 170     # If we don't find any system...set default to bundled
 171     DEFAULT_ZLIB=bundled
 172   fi
 173 
 174   # If user didn't specify, use DEFAULT_ZLIB
 175   if test "x${with_zlib}" = "x"; then
 176     with_zlib=${DEFAULT_ZLIB}
 177   fi
 178 
 179   if test "x${with_zlib}" = "xbundled"; then
 180     USE_EXTERNAL_LIBZ=false
 181     AC_MSG_RESULT([bundled])
 182   elif test "x${with_zlib}" = "xsystem"; then
 183     if test "x${ZLIB_FOUND}" = "xyes"; then
 184       USE_EXTERNAL_LIBZ=true
 185       AC_MSG_RESULT([system])


< prev index next >