Skip to content

Commit

Permalink
build.sh: Always use --with-zlib=bundled for JDK21+
Browse files Browse the repository at this point in the history
Signed-off-by: Stewart X Addison <sxa@redhat.com>
  • Loading branch information
sxa committed Jun 21, 2023
1 parent bbc1ac6 commit 3bdb0ef
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions sbin/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,14 @@ configureFreetypeLocation() {
fi
}

configureZlibLocation() {
if [[ ! "${CONFIGURE_ARGS}" =~ "--with-zlib" ]]; then
if [[ "${BUILD_CONFIG[OPENJDK_FEATURE_NUMBER]}" -ge 21 ]]; then
addConfigureArg "--with-zlib=" "bundled"
fi
fi
}

# Configure the command parameters
configureCommandParameters() {
configureVersionStringParameter
Expand Down Expand Up @@ -526,6 +534,7 @@ configureCommandParameters() {
CONFIGURE_ARGS="${CONFIGURE_ARGS} ${BUILD_CONFIG[USER_SUPPLIED_CONFIGURE_ARGS]//temporary_speech_mark_placeholder/\"}"

configureFreetypeLocation
configureZlibLocation

echo "Completed configuring the version string parameter, config args are now: ${CONFIGURE_ARGS}"
}
Expand Down

0 comments on commit 3bdb0ef

Please sign in to comment.