192 [AC_LANG_PROGRAM([#include "zlib.h"], [ 193 #if ZLIB_VERNUM >= 0x1281 194 inflateValidate(NULL, 0); 195 #endif 196 ])], 197 [AC_MSG_RESULT([ok])], 198 [ 199 AC_MSG_RESULT([not ok]) 200 AC_MSG_ERROR([System zlib not working correctly]) 201 ] 202 ) 203 fi 204 else 205 AC_MSG_RESULT([system not found]) 206 AC_MSG_ERROR([--with-zlib=system specified, but no zlib found!]) 207 fi 208 else 209 AC_MSG_ERROR([Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled']) 210 fi 211 212 AC_SUBST(USE_EXTERNAL_LIBZ) 213 ]) 214 215 ################################################################################ 216 # Setup lcms (Little CMS) 217 ################################################################################ 218 AC_DEFUN_ONCE([LIB_SETUP_LCMS], 219 [ 220 AC_ARG_WITH(lcms, [AS_HELP_STRING([--with-lcms], 221 [use lcms2 from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])]) 222 223 AC_MSG_CHECKING([for which lcms to use]) 224 225 DEFAULT_LCMS=bundled 226 # If user didn't specify, use DEFAULT_LCMS 227 if test "x${with_lcms}" = "x"; then 228 with_lcms=${DEFAULT_LCMS} 229 fi 230 231 if test "x${with_lcms}" = "xbundled"; then 232 USE_EXTERNAL_LCMS=false | 192 [AC_LANG_PROGRAM([#include "zlib.h"], [ 193 #if ZLIB_VERNUM >= 0x1281 194 inflateValidate(NULL, 0); 195 #endif 196 ])], 197 [AC_MSG_RESULT([ok])], 198 [ 199 AC_MSG_RESULT([not ok]) 200 AC_MSG_ERROR([System zlib not working correctly]) 201 ] 202 ) 203 fi 204 else 205 AC_MSG_RESULT([system not found]) 206 AC_MSG_ERROR([--with-zlib=system specified, but no zlib found!]) 207 fi 208 else 209 AC_MSG_ERROR([Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled']) 210 fi 211 212 if test "x$USER_EXTERNAL_LIBZ" = "xfalse"; then 213 LIBZ_CFLAGS="$LIBZ_CFLAGS -I$TOPDIR/src/java.base/share/native/libzip/zlib" 214 else 215 LIBZ_LIBS="-lz" 216 fi 217 218 AC_SUBST(USE_EXTERNAL_LIBZ) 219 AC_SUBST(LIBZ_CFLAGS) 220 AC_SUBST(LIBZ_LIBS) 221 ]) 222 223 ################################################################################ 224 # Setup lcms (Little CMS) 225 ################################################################################ 226 AC_DEFUN_ONCE([LIB_SETUP_LCMS], 227 [ 228 AC_ARG_WITH(lcms, [AS_HELP_STRING([--with-lcms], 229 [use lcms2 from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])]) 230 231 AC_MSG_CHECKING([for which lcms to use]) 232 233 DEFAULT_LCMS=bundled 234 # If user didn't specify, use DEFAULT_LCMS 235 if test "x${with_lcms}" = "x"; then 236 with_lcms=${DEFAULT_LCMS} 237 fi 238 239 if test "x${with_lcms}" = "xbundled"; then 240 USE_EXTERNAL_LCMS=false |