From ed111062a9c6e0fec31f0b064cf0ab56221852ad Mon Sep 17 00:00:00 2001 From: Cameron White Date: Fri, 22 Dec 2023 16:43:59 -0500 Subject: [PATCH] Improve the dotnet version checks in configure.ac - The minimum version should have been updated to 7.0 to go along with PR #595 - Use the target framework for whichever newer dotnet version is found, instead of hardcoding only net8.0. This allows for more forward compatibility if more dotnet versions are released before a newer Pinta release Fixes: #616 --- configure.ac | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index d87157130..aa1c4700a 100644 --- a/configure.ac +++ b/configure.ac @@ -14,7 +14,7 @@ if test "x$DOTNET" = "xno"; then fi # Check dotnet version -DOTNET_MINIMUM_VERSION=6.0 +DOTNET_MINIMUM_VERSION=7.0 DOTNET_VERSION=$($DOTNET --version) AX_COMPARE_VERSION([$DOTNET_VERSION], [ge], [$DOTNET_MINIMUM_VERSION], AC_MSG_NOTICE([Found dotnet $DOTNET_VERSION]), @@ -22,9 +22,8 @@ AX_COMPARE_VERSION([$DOTNET_VERSION], [ge], [$DOTNET_MINIMUM_VERSION], ) # Select target framework based on the dotnet version. -DOTNET_TARGET_FRAMEWORK=net7.0 -AX_COMPARE_VERSION([$DOTNET_VERSION], [ge], [8.0], - [DOTNET_TARGET_FRAMEWORK=net8.0], []) +DOTNET_MAJOR_VERSION=$(echo $DOTNET_VERSION | cut -d '.' -f 1,2) +DOTNET_TARGET_FRAMEWORK="net$DOTNET_MAJOR_VERSION" AC_MSG_NOTICE([Using target framework $DOTNET_TARGET_FRAMEWORK]) DOTNET_CMD="env TargetFramework=$DOTNET_TARGET_FRAMEWORK $DOTNET"