--- lib/critcl/Config.in.orig 2025-02-17 00:15:58 +++ lib/critcl/Config.in 2025-02-17 00:27:16 @@ -85,6 +85,21 @@ set osxmin $::env(osxmin) } elseif {[info exists ::env(MACOSX_DEPLOYMENT_TARGET)] && $::env(MACOSX_DEPLOYMENT_TARGET) ne ""} { set osxmin $::env(MACOSX_DEPLOYMENT_TARGET) + } else { + # use the current platform + set v1 [lindex [split $::tcl_platform(osVersion) .] 0] + # Darwin 19 and earlier are macOS 10.x. Darwin 20-24 are macOS + # 11-15. Darwin 25 is macOS 26. + if {$v1 >= 25} { + incr v1 + set osxmin ${v1}.0 + } elseif {$v1 >= 20} { + incr v1 -9 + set osxmin ${v1}.0 + } else { + incr v1 -4 + set osxmin 10.$v1 + } } if {[info exists ::env(SDKROOT)] && $::env(SDKROOT) ne ""} { set SDKROOT $::env(SDKROOT) @@ -117,51 +129,6 @@ } } } - if {![info exists osxmin]} { - if {$SDKROOT ne ""} { - # get the SDKsettings for the min OSX value supported - set info "" - if {[catch { - set osxmin [exec plutil -extract DefaultProperties.MACOSX_DEPLOYMENT_TARGET \ - raw $SDKROOT/SDKSettings.plist] - }]} { - - if {[catch { - set info [exec defaults read $SDKROOT/SDKSettings buildSettings] - }]} { - catch { - set info [exec defaults read $SDKROOT/SDKSettings DefaultProperties \ - -dict MACOSX_DEPLOYMENT_TARGET] - } - } - if {$info eq ""} { - puts stderr "SDKROOT isn't configured correctly on this host" - puts stderr "current setting $SDKROOT needs updating" - exit 1 - } - set info [string trim $info] - regsub -all {[\n"\;=\{\}]+} $info "" info ;#" help emacs hilighting - regsub -all {\s+} $info " " info - set osxmin [lindex $info 1] - } - } else { - # use the current platform - foreach {v1 v2 v3} [split $::tcl_platform(osVersion) .] break - # Darwin 19 and earlier are macOS 10.x. Darwin 20 and later are macOS - # 11, macOS 12, etc. - if {$v1 >= 20} { - incr v1 -9 - set osxmin ${v1}.0 - } else { - incr v1 -4 - set osxmin 10.$v1 - } - # do we actually need to check if universal is supported, given the - # gcc check below will do it for us? - # set info [exec lipo -info /usr/lib/libSystem.dylib] - # set plats [split [string trim [lindex [split $info :] 2]]] - } - } if {$SDKROOT eq ""} { set SDKROOT / }