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