Index: openacs-4/packages/acs-tcl/tcl/00-icanuse-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/00-icanuse-procs.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/acs-tcl/tcl/00-icanuse-procs.tcl 24 Oct 2024 14:09:09 -0000 1.4 +++ openacs-4/packages/acs-tcl/tcl/00-icanuse-procs.tcl 24 Oct 2024 16:53:24 -0000 1.5 @@ -101,7 +101,15 @@ # loading order. The commands are executed very early, this means # that, e.g., util::which is not yet available. # -::acs::register_icanuse "domDoc asTclValue" [expr {[apm_version_names_compare [package require tdom] 0.9.5] >= 0}] + +# +# Unfortunately, we cannot use for tDOM version comparison simply +# +# [apm_version_names_compare [package require tdom] 0.9.5] +# +# during startup. Therefore, we parse a minimal json expression and try the command on it +::acs::register_icanuse "domDoc asTclValue" [expr {[catch {[dom parse -json -- 1 doc] asTclValue}] == 0}] + ::acs::register_icanuse "gnugrep" [acs::cmd_error_contains [list exec grep -V] GNU] ::acs::register_icanuse "ns_asynclogfile" {[info commands ::ns_asynclogfile] ne ""} ::acs::register_icanuse "ns_baseunit" {[info commands ::ns_baseunit] ne ""}