From 3bdb0efa62ea9bdf76969a63d7f3790acb06f634 Mon Sep 17 00:00:00 2001 From: Stewart X Addison Date: Wed, 21 Jun 2023 15:25:57 +0100 Subject: [PATCH] build.sh: Always use --with-zlib=bundled for JDK21+ Signed-off-by: Stewart X Addison --- sbin/build.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sbin/build.sh b/sbin/build.sh index 23f524e4b..064eb86db 100755 --- a/sbin/build.sh +++ b/sbin/build.sh @@ -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 @@ -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}" }